Session aging method and device, equipment, storage medium and program product

By detecting the response message of the target session and determining its current number of responsive times, the problem that session aging only occurs when the connection timeout in the prior art is solved, and the effective usage rate of the session and the reliability of the aging are improved.

CN119520579AActive Publication Date: 2025-02-25CHINA TELECOM CLOUD TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411753517.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-02-25
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

The existing session aging method only ages when the session connection timeout, resulting in a large number of idle time when there are a large number of short-connected sessions, reducing the effective usage of the session.

Method used

By detecting the response message of the target session, the number of times it can be answered is determined, and the aging result is determined based on the number of times, and the corresponding processing is performed after the response message is processed.

Benefits of technology

Improves the effective usage of the session, ensures the reliability of session aging, and effectively intercepts attack traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520579A_ABST
    Figure CN119520579A_ABST
Patent Text Reader

Abstract

The invention relates to a session aging method and device, equipment, a storage medium and a program product. The method comprises the following steps: when a response message for a target session is detected, determining the current reply times of the target session, determining the aging result of the target session according to the current reply times, and after the response message is processed, processing the target session according to the aging result. By adopting the method, the reliability of session aging can be ensured, and the effective utilization rate of the session is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a session aging method, apparatus, device, storage medium and program product. Background Art

[0002] The session aging mechanism is a mechanism that automatically manages and maintains the life cycle of network sessions, ensuring that inactive sessions within a certain period of time can be automatically identified and closed. The session aging mechanism has the following advantages: on the one hand, the session aging mechanism can optimize resource allocation and improve system efficiency; on the other hand, the session aging mechanism can prevent unauthorized access and potential security threats. In the existing session aging methods, the session is generally aged by judging whether the session connection has timed out.

[0003] However, in the existing session aging method, session aging can only be achieved when the session connection times out. When there are a large number of short-connected sessions, a large amount of idle time will occur in the session, thereby reducing the effective usage rate of the session. Summary of the invention

[0004] Based on this, it is necessary to provide a session aging method, device, equipment, storage medium and program product that can improve the effective utilization rate of sessions in response to the above technical problems.

[0005] In a first aspect, the present application provides a session aging method, comprising:

[0006] When a response message for the target session is detected, determining a current available response number for the target session;

[0007] Determine the aging result of the target session according to the current number of available responses;

[0008] After the response message is processed, the target session is processed according to the aging result.

[0009] In one embodiment, determining the current available answer count for the target session includes:

[0010] According to the business scenario of the target session, determine the standard possible answering times of the target session; according to the historical answering records of the target session, determine the historical answering times of the target session; and use the difference between the standard possible answering times and the historical answering times as the current possible answering times of the target session.

[0011] In one embodiment, determining a standard available answering number of the target session according to a service scenario of the target session includes:

[0012] Based on the business setting information, network protocol setting information under each candidate business scenario, and the negotiation information in the messages between the two business parties, a corresponding relationship between each candidate business scenario and the standard number of responses that can be made is constructed; the business scenario of the target session is used as an index to search in the corresponding relationship to obtain the standard number of responses that can be made for the target session.

[0013] In one embodiment, when a response message for a target session is detected, determining a current available response number of the target session includes:

[0014] When a response message for a target session is detected and it is identified that the target session is a session configured with an aging mechanism identifier, the current available response times of the target session are determined.

[0015] In one embodiment, the method further comprises:

[0016] When the aging result of the target session is that the session has not been aged, the current connection duration of the target session is obtained; when the current connection duration reaches the standard session duration of the target session, aging processing is performed on the target session.

[0017] In one embodiment, the method further comprises:

[0018] The session configuration interface corresponding to the target session is displayed to the user; and the standard number of possible responses for the target session is determined according to the user's input information in the session configuration interface.

[0019] In a second aspect, the present application also provides a session aging device, including:

[0020] A times determination module, used to determine the current available times of responses for the target session when a response message for the target session is detected;

[0021] A result determination module, used to determine the aging result of the target session according to the current number of available responses;

[0022] The session processing module is used to process the target session according to the aging result after processing the response message.

[0023] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0024] When a response message for the target session is detected, determining a current available response number for the target session;

[0025] Determine the aging result of the target session according to the current number of available responses;

[0026] After the response message is processed, the target session is processed according to the aging result.

[0027] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0028] When a response message for the target session is detected, determining a current available response number for the target session;

[0029] Determine the aging result of the target session according to the current number of available responses;

[0030] After the response message is processed, the target session is processed according to the aging result.

[0031] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0032] When a response message for the target session is detected, determining a current available response number for the target session;

[0033] Determine the aging result of the target session according to the current number of available responses;

[0034] After the response message is processed, the target session is processed according to the aging result.

[0035] The above session aging method, device, equipment, storage medium and program product determine the current available answer times of the target session by detecting the answer message for the target session, and then determine the aging result of the target session according to the current available answer times, and after processing the answer message, process the target session according to the aging result. Compared with the related art, which can only realize session aging when the session connection times out, the above method can ensure the reliability of session aging and improve the effective use rate of the session by determining the aging result of the target session according to the current available answer times. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A flow chart of a session aging method in one embodiment;

[0038] Figure 2 is a schematic diagram of aging time in the related art;

[0039] Figure 3 A schematic diagram of a process for determining the current number of available responses in one embodiment;

[0040] Figure 4 A flow chart of a session aging method in another embodiment;

[0041] Figure 5 is a structural block diagram of a session aging device in one embodiment;

[0042] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] The session aging mechanism is a mechanism that automatically manages and maintains the life cycle of network sessions, ensuring that inactive sessions within a certain period of time can be automatically identified and closed. The session aging mechanism has the following advantages: on the one hand, the session aging mechanism can optimize resource allocation and improve system efficiency; on the other hand, the session aging mechanism can prevent unauthorized access and potential security threats. In the existing session aging methods, the session is generally aged by judging whether the session connection has timed out.

[0045] However, in the existing session aging method, session aging can only be achieved when the session connection times out. When there are a large number of short-connected sessions, a large amount of idle time will occur in the session, thereby reducing the effective usage rate of the session.

[0046] Based on this, in an exemplary embodiment, Figure 1 As shown, a session aging method is provided, which is described by taking the method applied to a session device as an example, and specifically includes the following steps:

[0047] S101, when a response message for a target session is detected, determining the current available response times for the target session.

[0048] The session is used to record the connection status between the server and the client in the network; the current number of responses is the number of responses that the target session can accept if it has not accepted the response message at the current moment.

[0049] In the present application, the session device generates a session based on the session initiation request sent by the requesting end, and sends a request message to the responding end; then, the responding end can send a response message to the session device based on the request message, and the session device feeds back the response message to the requesting end after receiving the response message.

[0050] In one possible implementation, when a response message for a target session is detected, the current available response times of the target session may be queried based on the session identifier of the target session.

[0051] It is understandable that in the session device, some sessions may not have aging requirements. Therefore, in order to ensure the reliability of aging processing, it is necessary to determine the current number of possible responses of the target session when a response message for the target session is detected and the target session is identified as a session configured with an aging mechanism identifier. The aging mechanism identifier is used to indicate that the aging mechanism has been enabled for the session.

[0052] In one possible implementation, when a response message to a target session is detected, identification information of the target session at a preset position may be obtained. If the identification information includes an aging mechanism identifier, the current number of possible responses for the target session is determined. If the identification information does not include an aging mechanism identifier, no subsequent processing is performed.

[0053] S102: Determine an aging result of the target session according to the current number of available responses.

[0054] The aging result may include session aging and session non-aging.

[0055] It is understandable that in each business scenario, the number of session hits can be estimated. For example, in the Domain Name System (DNS) scenario, the DNS client generates a session by sending a request message to the network element device / firewall device. Since a DNS request message can only correspond to one response message, it can be determined that in the DNS scenario, the session will age after receiving a response message.

[0056] Based on this, after determining the current available answering times of the target session, the aging result of the target session can be determined based on the current available answering times. For example, when there are multiple answering messages for the target session at the same time, if the number of answering messages is greater than or equal to the current available answering times, the aging result of the target session is determined to be session aging; if the number of answering messages is less than the current available answering times, the aging result of the target session is determined to be session non-aging.

[0057] S103, after the response message is processed, the target session is processed according to the aging result.

[0058] In one possible implementation, when the aging result is session aging, the target session can be deleted after the response message is processed; when the aging result is that the session is not aged, the session connection can be maintained and wait for the next response message for the target session until the target session ages.

[0059] Understandably, reference Figure 2 As shown in the connection time diagram, in the related art, it is necessary to set a session aging time for the session in advance (i.e., a fixed time during which the session must remain connected). If the actual required connection time of the session is short, a large amount of session invalid time will be reserved. On the one hand, the effective utilization rate of the session will be reduced; on the other hand, since the session may be attacked during the session invalid time, the security of the session will also be reduced.

[0060] Based on this, in the present application, session aging is performed based on the number of possible responses. On the one hand, this can shorten the session time. On the other hand, when there is attack traffic targeting the session, the aging result of the session is determined based on the current number of possible responses of the session, which can effectively intercept the attack traffic.

[0061] For example, when 100 response messages are sent to session A at the same time, if the current number of possible responses of session A is 2, session A will only feed back 2 response messages out of the 100 response messages to the requesting end.

[0062] In the above session aging method, by detecting a response message for the target session, the current available response times of the target session are determined, and then the aging result of the target session is determined according to the current available response times, and after the response message is processed, the target session is processed according to the aging result. Compared with the related art, which can only realize session aging when the session connection times out, the above method can ensure the reliability of session aging and improve the effective use rate of the session by determining the aging result of the target session according to the current available response times.

[0063] In order to improve the accuracy of the current number of available answers, based on the above embodiments, in the embodiments of the present application, an optional method for determining the current number of available answers is provided, such as Figure 3 As shown, the specific steps include:

[0064] S301, determining a standard possible number of responses for a target session according to a business scenario of the target session.

[0065] The standard possible number of responses is the number of responses that can be provided during the session connection process. For example, in a DNS scenario, the standard possible number of responses for a session is 1.

[0066] In one possible implementation, the standard available answering times of the previous session in the service scenario of the target session may be used as the standard available answering times of the target session.

[0067] In another possible implementation method, a correspondence between each candidate business scenario and the standard number of responses is constructed based on the business setting information, network protocol setting information, and negotiation information in the messages between the two business parties under each candidate business scenario; the business scenario of the target session is used as an index to search in the correspondence to obtain the standard number of responses for the target session.

[0068] The candidate business scenario is used to represent any business scenario that may occur.

[0069] Specifically, for any candidate business scenario, the standard number of responses for the session under the candidate business scenario can be determined based on the business setting information, network protocol setting information, and negotiation information in the messages between the two business parties under the candidate business scenario, and then a corresponding relationship between each candidate business scenario and the standard number of responses can be constructed.

[0070] Accordingly, the scenario identifier of the business scenario of the target session may be used as an index to search in the pre-built corresponding relationship to obtain the standard available answering number of the target session.

[0071] In another possible implementation, a session configuration interface corresponding to the target session may be displayed to the user, and the standard number of possible responses for the target session may be determined based on the user's input information in the session configuration interface, wherein the session configuration interface is used to configure relevant parameters of the target session.

[0072] Specifically, a session configuration interface may be displayed to the user's terminal, at which point the user may directly input session configuration related information (including the standard number of responses for the target session) in the session configuration interface and click upload; correspondingly, after obtaining the input information in the session configuration interface sent by the user's terminal, the standard number of responses for the target session may be extracted from the input information.

[0073] S302: Determine the historical response times of the target session according to the historical response records of the target session.

[0074] The historical response record is used to represent the response record of the target session in the historical period; the historical response number is the number of responses that have been completed in the session.

[0075] In one possible implementation, the historical response record of the target session may be acquired according to the session identification information of the target session; then, the number of historical responses of the target session that have been completed may be counted according to the historical response record.

[0076] S303: The difference between the standard possible answering times and the historical answering times is used as the current possible answering times of the target session.

[0077] In one possible implementation, the difference between the standard available answering times and the historical answering times may be directly used as the current available answering times of the target session.

[0078] In an embodiment of the present application, by determining the standard possible answering times and the historical answering times, and using the difference between the standard possible answering times and the historical answering times as the current possible answering times for the target session, the accuracy of the current possible answering times can be guaranteed.

[0079] In order to avoid the problem of session aging failure caused by response end abnormality or network packet loss, based on the above embodiments, an optional method of aging processing is provided in the embodiments of the present application. Specifically, when the aging result of the target session is that the session has not aged, the current connection duration of the target session is obtained; when the current connection duration reaches the standard session duration of the target session, the target session is aged.

[0080] The current connection duration is the duration that the target session has been connected at the current moment; the standard session duration is the duration that a pre-set session can be connected, that is, when the session reaches the standard session duration, aging processing is required.

[0081] It is understandable that in actual applications, there may be a problem of response message loss, which may cause the session message to fail to age. Therefore, when the aging result of the target session is that the session has not aged, it is necessary to obtain the current connection duration of the target session. For example, the current connection duration of the target session is obtained through a timing device in the session device.

[0082] Furthermore, it can be determined whether the current connection duration reaches the standard session duration. If so, the target session is directly aged; if not, the connection of the target session is maintained.

[0083] In addition to the above scenarios, the target session can also be aged directly according to the standard session duration. Specifically, there is no need to calculate the current number of responses of the target session, and the current connection duration of the target session can be directly obtained through the timing device in the session device; then, when the current connection duration reaches the standard session duration, the target session is aged.

[0084] In the embodiment of the present application, when the target session has not aged, the target session is aged by determining whether the current connection duration reaches the standard session duration, thereby ensuring the reliability of session aging.

[0085] Figure 4FIG. 2 is a flow chart of a session aging method in another embodiment. Based on the above embodiment, this embodiment provides an optional example of a session aging method. Figure 4 The specific implementation process is as follows:

[0086] S401, when a response message for a target session is detected and the target session is identified as a session configured with an aging mechanism identifier, a correspondence between each candidate business scenario and the standard number of responses is constructed based on the business setting information, network protocol setting information, and negotiation information in the messages between the two business parties under each candidate business scenario.

[0087] S402: Using the business scenario of the target session as an index, searching in the corresponding relationship to obtain a standard available answering number of the target session.

[0088] In addition, a session configuration interface corresponding to the target session may be displayed to the user; and the standard possible number of responses for the target session may be determined based on the user's input information in the session configuration interface.

[0089] S403: Determine the historical response times of the target session according to the historical response records of the target session.

[0090] S404: The difference between the standard possible answering times and the historical answering times is used as the current possible answering times of the target session.

[0091] S405, judging whether the target session is aged according to the current number of available responses, if so, executing S406; if not, executing S407.

[0092] S406: After the response message is processed, the target session is aged.

[0093] S407: Obtain the current connection duration of the target session.

[0094] S408: When the current connection duration reaches the standard session duration of the target session, an aging process is performed on the target session.

[0095] The specific process of S401-S408 above can refer to the description of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0096] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0097] Based on the same inventive concept, the embodiment of the present application also provides a session aging device for implementing the above-mentioned session aging method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more session aging device embodiments provided below can refer to the limitations of the session aging method above, and will not be repeated here.

[0098] In an exemplary embodiment, Figure 5 As shown, a session aging device 1 is provided, comprising: a times determination module 10, a result determination module 20 and a session processing module 30, wherein:

[0099] The number determination module 10 is used to determine the current number of possible responses for the target session when a response message for the target session is detected;

[0100] A result determination module 20, for determining an aging result of a target session according to the current number of available responses;

[0101] The session processing module 30 is used to process the target session according to the aging result after processing the response message.

[0102] In an exemplary embodiment, the number determination module 10 includes:

[0103] A first determining unit, configured to determine a standard possible number of responses for a target session according to a service scenario of the target session;

[0104] A second determining unit, configured to determine a historical number of responses of a target session according to a historical response record of the target session;

[0105] The third determining unit is configured to use the difference between the standard available answering times and the historical answering times as the current available answering times of the target session.

[0106] In an exemplary embodiment, the first determining unit is specifically configured to:

[0107] Based on the business setting information, network protocol setting information under each candidate business scenario, and the negotiation information in the messages between the two business parties, a corresponding relationship between each candidate business scenario and the standard number of responses that can be made is constructed; the business scenario of the target session is used as an index to search in the corresponding relationship to obtain the standard number of responses that can be made for the target session.

[0108] In an exemplary embodiment, the number determination module 10 is further configured to:

[0109] When a response message for a target session is detected and it is identified that the target session is a session configured with an aging mechanism identifier, the current available response times of the target session are determined.

[0110] In an exemplary embodiment, the session aging device 1 further includes a duration detection module, wherein the duration detection module is specifically used to:

[0111] When the aging result of the target session is that the session has not been aged, the current connection duration of the target session is obtained; when the current connection duration reaches the standard session duration of the target session, aging processing is performed on the target session.

[0112] In an exemplary embodiment, the first determining unit is further configured to:

[0113] The session configuration interface corresponding to the target session is displayed to the user; and the standard number of possible responses for the target session is determined according to the user's input information in the session configuration interface.

[0114] Each module in the above session aging device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0115] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store session data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a session aging method is implemented.

[0116] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0117] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0118] When a response message for the target session is detected, determining a current available response number for the target session;

[0119] Determine the aging result of the target session according to the current number of available responses;

[0120] After the response message is processed, the target session is processed according to the aging result.

[0121] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0122] According to the business scenario of the target session, determine the standard possible answering times of the target session; according to the historical answering records of the target session, determine the historical answering times of the target session; and use the difference between the standard possible answering times and the historical answering times as the current possible answering times of the target session.

[0123] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0124] Based on the business setting information, network protocol setting information under each candidate business scenario, and the negotiation information in the messages between the two business parties, a corresponding relationship between each candidate business scenario and the standard number of responses that can be made is constructed; the business scenario of the target session is used as an index to search in the corresponding relationship to obtain the standard number of responses that can be made for the target session.

[0125] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0126] When a response message for a target session is detected and it is identified that the target session is a session configured with an aging mechanism identifier, the current available response times of the target session are determined.

[0127] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0128] When the aging result of the target session is that the session has not been aged, the current connection duration of the target session is obtained; when the current connection duration reaches the standard session duration of the target session, aging processing is performed on the target session.

[0129] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0130] The session configuration interface corresponding to the target session is displayed to the user; and the standard number of possible responses for the target session is determined according to the user's input information in the session configuration interface.

[0131] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0132] When a response message for the target session is detected, determining a current available response number for the target session;

[0133] Determine the aging result of the target session according to the current number of available responses;

[0134] After the response message is processed, the target session is processed according to the aging result.

[0135] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0136] According to the business scenario of the target session, determine the standard possible answering times of the target session; according to the historical answering records of the target session, determine the historical answering times of the target session; and use the difference between the standard possible answering times and the historical answering times as the current possible answering times of the target session.

[0137] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0138] Based on the business setting information, network protocol setting information under each candidate business scenario, and the negotiation information in the messages between the two business parties, a corresponding relationship between each candidate business scenario and the standard number of responses that can be made is constructed; the business scenario of the target session is used as an index to search in the corresponding relationship to obtain the standard number of responses that can be made for the target session.

[0139] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0140] When a response message for a target session is detected and it is identified that the target session is a session configured with an aging mechanism identifier, the current available response times of the target session are determined.

[0141] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0142] When the aging result of the target session is that the session has not been aged, the current connection duration of the target session is obtained; when the current connection duration reaches the standard session duration of the target session, aging processing is performed on the target session.

[0143] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0144] The session configuration interface corresponding to the target session is displayed to the user; and the standard number of possible responses for the target session is determined according to the user's input information in the session configuration interface.

[0145] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0146] When a response message for the target session is detected, determining a current available response number for the target session;

[0147] Determine the aging result of the target session according to the current number of available responses;

[0148] After the response message is processed, the target session is processed according to the aging result.

[0149] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0150] According to the business scenario of the target session, determine the standard possible answering times of the target session; according to the historical answering records of the target session, determine the historical answering times of the target session; and use the difference between the standard possible answering times and the historical answering times as the current possible answering times of the target session.

[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0152] Based on the business setting information, network protocol setting information under each candidate business scenario, and the negotiation information in the messages between the two business parties, a corresponding relationship between each candidate business scenario and the standard number of responses that can be made is constructed; the business scenario of the target session is used as an index to search in the corresponding relationship to obtain the standard number of responses that can be made for the target session.

[0153] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0154] When a response message for a target session is detected and it is identified that the target session is a session configured with an aging mechanism identifier, the current available response times of the target session are determined.

[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0156] When the aging result of the target session is that the session has not been aged, the current connection duration of the target session is obtained; when the current connection duration reaches the standard session duration of the target session, aging processing is performed on the target session.

[0157] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0158] The session configuration interface corresponding to the target session is displayed to the user; and the standard number of possible responses for the target session is determined according to the user's input information in the session configuration interface.

[0159] It should be noted that the data involved in this application (including but not limited to session data, etc.) are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0160] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0161] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0162] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A session aging method, characterized in that: The method comprises: When a response message for a target session is detected, determining a current available response number of the target session; Determining an aging result of the target session according to the current available number of answers; After the response message is processed, the target session is processed according to the aging result.

2. The method according to claim 1, characterized in that The determining the current available answering number of the target session includes: Determining a standard number of possible responses for the target session according to a business scenario of the target session; Determining the historical number of responses of the target session according to the historical response record of the target session; The difference between the standard available answering times and the historical answering times is used as the current available answering times of the target session.

3. The method according to claim 2, characterized in that The determining, according to the business scenario of the target session, a standard available answering number of the target session includes: According to the service setting information and network protocol setting information under each candidate service scenario, and the negotiation information in the message between the two parties of the service, a corresponding relationship between each candidate service scenario and the standard number of possible responses is established; The business scenario of the target session is used as an index and searched in the corresponding relationship to obtain the standard available answering number of the target session.

4. The method according to claim 1, characterized in that: In the case where a response message for a target session is detected, determining a current possible response number of the target session includes: When a response message for a target session is detected and it is identified that the target session is a session configured with an aging mechanism identifier, the current available response times of the target session are determined.

5. The method according to claim 1, characterized in that The method further comprises: When the aging result of the target session is that the session has not aged, obtaining the current connection duration of the target session; When the current connection duration reaches the standard session duration of the target session, an aging process is performed on the target session.

6. The method according to claim 1, characterized in that The method further comprises: Displaying a session configuration interface corresponding to the target session to the user; According to the input information of the user in the session configuration interface, a standard available number of answers for the target session is determined.

7. A session aging device, characterized in that: The device comprises: A times determination module, configured to determine a current available times of responses for the target session when a response message for the target session is detected; A result determination module, used for determining an aging result of the target session according to the current number of available responses; The session processing module is used to process the target session according to the aging result after processing the response message.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and apparatus for limiting session number

    CN101083665A

  • Session information processing method, device and system

    CN106506669A

  • Method and apparatus for preventing packet loss

    CN109327398A

  • Session detection method, session system and storage medium

    CN111327562A

  • Session management method and device, terminal equipment and computer readable storage medium

    CN112492704A