Method, device, equipment and readable storage medium for dynamically updating renewal duration

By determining the validity of the request based on the current time point and the validity time of the target interface when receiving the client request, and determining the renewal time based on the preset dynamic update process, the problem of difficult to adjust the fixed validity period or renewal time is solved, and the flexibility and adaptability of the interface renewal is achieved.

CN112256713BActive Publication Date: 2025-02-28WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011143974.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-22
Publication Date
2025-02-28
Estimated Expiration
2040-10-22

AI Technical Summary

Technical Problem

In the prior art, it is difficult to flexibly adjust the fixed validity period or renewal period, and it cannot meet the renewal requirements of different interfaces.

Method used

When receiving client requests, the target interface is determined and the current time point is recorded, and the validity of the request is determined based on the current time point and the validity time of the target interface. If it is valid, the renewal time of the target interface is determined based on the preset dynamic update process and returned to the client.

Benefits of technology

It realizes flexible adjustment of the renewal time, meets the renewal requirements of various interfaces, and improves the flexibility and adaptability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention relates to the field of information management technology of financial technology, and discloses a method, device, equipment and computer-readable storage medium for dynamically updating renewal duration. When any interface receives a request initiated by a client, the target interface is determined and the current time point is recorded; the validity of the request is determined based on the current time point and the effective duration of the target interface; if the request is valid, the renewal duration of the target interface is determined based on a preset dynamic update process, and the renewal duration is returned to the client. Thus, the required duration of the valid request is re-determined based on the preset dynamic update process, and the flexible adjustment of the renewal duration is achieved, meeting the renewal requirements of various interfaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information management technology of financial technology (Fintech), and in particular to a method, device, equipment and computer-readable storage medium for dynamically updating renewal duration. Background Art

[0002] With the development of computer technology, more and more technologies are being applied in the financial field. The traditional financial industry is gradually transforming into financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on technology.

[0003] Generally, websites set a fixed validity period in cookies (data stored on the user's local terminal) and / or set a fixed renewal period in sessions and databases. However, the validity period or renewal period of fixed duration cannot be flexibly adjusted, making it difficult to meet the renewal requirements of different interfaces. Summary of the invention

[0004] The present invention provides a method, device, equipment and computer-readable storage medium for dynamically updating the renewal duration, aiming to achieve flexible adjustment of the renewal duration and meet the renewal requirements of various interfaces.

[0005] To achieve the above object, the present invention provides a method for dynamically updating the renewal duration, the method comprising:

[0006] When any interface receives a request initiated by a client, it determines the target interface and records the current time point;

[0007] Determining the validity of the request based on the current time point and the validity duration of the target interface;

[0008] The request is valid, a renewal duration of the target interface is determined based on a preset dynamic update process, and the renewal duration is returned to the client.

[0009] Optionally, the determining the renewal duration of the target interface based on a preset dynamic update process includes:

[0010] Query the request records saved in the database;

[0011] If there is no historical request record of the target interface in the request record, the renewal duration of the target interface is set to a specified duration;

[0012] The request record contains a historical request record of the target interface, a time interval in the historical request record is obtained, and a renewal duration of the target interface is determined based on the time interval according to a preset dynamic update process.

[0013] Optionally, the obtaining of the time interval in the historical request record, and determining the renewal duration of the target interface according to a preset dynamic update process based on the time interval, includes:

[0014] Acquire the historical time interval queue of the target interface from the historical request record, and mark the time interval from accessing the target interface to the next access to any interface as the new time interval of the target interface;

[0015] The new time interval is stored in a new time interval queue, and the renewal duration of the target interface is determined based on the time interval queue, wherein the time interval queue includes the historical time interval queue and the new time interval queue.

[0016] Optionally, the determining the renewal duration of the target interface based on the time interval queue includes:

[0017] calculating a mean interval and a standard deviation of the time intervals in the time interval queue;

[0018] The sum of the average interval and three times the standard deviation is determined as the renewal duration of the target interface.

[0019] Optionally, the determining the renewal duration of the target interface based on the time interval queue includes:

[0020] Sorting each interval in the time interval queue to obtain a sorting result;

[0021] Based on the ranking result, the interval of the specified ranking is determined as the renewal duration of the target interface.

[0022] Optionally, after determining the validity of the request based on the current time point and the validity duration of the target interface, the method further includes:

[0023] The request is invalid, and a prompt message indicating that the request is invalid is issued or the webpage corresponding to the request is logged out; or

[0024] The request is valid, and the operation corresponding to the request is executed.

[0025] Optionally, when any interface receives a request initiated by a client, after determining a target interface and recording a current time point, the method further includes:

[0026] The time interval between the current time point of the request and the last request time of the corresponding client access is recorded, wherein the interface accessed by the last request is the target interface.

[0027] In addition, to achieve the above-mentioned purpose, the present invention also provides a device for dynamically updating the renewal duration, and the device for dynamically updating the renewal duration includes:

[0028] A first determination module, used to determine a target interface and record a current time point when any interface receives a request initiated by a client;

[0029] A second determination module, configured to determine the validity of the request based on the current time point and the validity duration of the target interface;

[0030] The third determination module is used to determine the renewal time of the target interface based on a preset dynamic update process if the request is valid, and return the renewal time to the client.

[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides a device for dynamically updating renewal duration, which includes a processor, a memory, and a dynamically updating renewal duration program stored in the memory. When the dynamically updating renewal duration program is executed by the processor, the steps of the method for dynamically updating renewal duration as described above are implemented.

[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a dynamic update renewal duration program is stored. When the dynamic update renewal duration program is executed by a processor, the steps of the method for dynamically updating the renewal duration as described above are implemented.

[0033] Compared with the prior art, the present invention proposes a method, device, equipment and computer-readable storage medium for dynamically updating the renewal duration. When any interface receives a request initiated by a client, it determines the target interface and records the current time point; determines the validity of the request based on the current time point and the effective duration of the target interface; if the request is valid, determines the renewal duration of the target interface based on a preset dynamic update process, and returns the renewal duration to the client. Thus, the required duration of the valid request is re-determined based on the preset dynamic update process, realizing flexible adjustment of the renewal duration and meeting the renewal requirements of various interfaces. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 Schematic diagram of the hardware structure of the device for dynamically updating the renewal duration involved in various embodiments of the present invention;

[0035] Figure 2 It is a flowchart of a first embodiment of a method for dynamically updating a renewal duration of the present invention;

[0036] Figure 3 It is a functional module diagram of the first embodiment of the device for dynamically updating the renewal duration of the present invention.

[0037] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0038] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0039] The dynamically updating renewal duration device mainly involved in the embodiments of the present invention refers to a network connection device that can achieve network connection. The dynamically updating renewal duration device can be a server, a cloud platform, etc.

[0040] Reference Figure 1 , Figure 1 : is a schematic diagram of the hardware structure of the device for dynamically updating the renewal duration involved in each embodiment of the present invention. In the embodiment of the present invention, the device for dynamically updating the renewal duration may include a processor 1001 (such as a central processing unit, CPU), a communication bus 1002, an input port 1003, an output port 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components; the input port 1003 is used for data input; the output port 1004 is used for data output, and the memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 can optionally be a storage device independent of the aforementioned processor 1001. Those skilled in the art can understand that Figure 1 The hardware structure shown in the figure does not constitute a limitation of the present invention, and may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.

[0041] Continue to refer to Figure 1 , Figure 1 The memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, an application module, and a dynamic renewal duration program. Figure 1 In the embodiment, the network communication module is mainly used to connect to the server and perform data communication with the server; and the processor 1001 can call the dynamic update renewal duration program stored in the memory 1005, and execute the method for dynamically updating the renewal duration provided in the embodiment of the present invention.

[0042] The embodiment of the present invention provides a method for dynamically updating the renewal duration.

[0043] Reference Figure 2 , Figure 2 It is a flowchart of the first embodiment of the method for dynamically updating the renewal duration of the present invention.

[0044] In this embodiment, the method for dynamically updating the renewal duration is applied to a device for dynamically updating the renewal duration, and the method includes:

[0045] Step S101, when any interface receives a request initiated by a client, it determines the target interface and records the current time point;

[0046] The arbitrary interface in this embodiment can be any one of the multiple interfaces set by a website, application, etc. For example, a website set by a bank includes a login interface, a verification interface, a query interface, a transfer interface, a payment interface, etc. The request involved in this embodiment corresponds to the interface, that is, the request may include a login request and a verification request. The client includes intelligent interactive devices such as computers and mobile terminals, wherein the mobile terminal includes a mobile phone, an iPad, a laptop, etc.

[0047] Generally, a request is generated by a client based on a user's interactive operation, and the request is sent to a device for dynamically updating renewal duration. After receiving the request sent by the client, the device for dynamically updating renewal duration determines a target interface for sending the request and records the current time point, wherein the target interface is one of the arbitrary interfaces.

[0048] Step S102, determining the validity of the request based on the current time point and the validity duration of the target interface;

[0049] The request includes a cookie uploaded by the client, wherein the cookie is a small text file stored by the server on the client (the content in the cookie is usually encrypted), and the cookie may also contain relevant user information. That is, a cookie is a small piece of text stored by the server on the local machine, and when the client sends a request to the server, it also sends the cookie previously returned by the server. The original renewal duration of the client is stored in the cookie. After the original renewal duration is obtained based on the cookie, the effective duration is determined based on the modification time of the cookie and the original renewal duration, and the effective duration is equal to the sum of the modification time and the original renewal duration.

[0050] After determining the valid duration, determine whether the current time is within the valid duration. If the current time is within the valid duration, determine that the request is valid; otherwise, if the current time is not within the valid duration, determine that the request is invalid.

[0051] Step S103: If the request is valid, a renewal duration of the target interface is determined based on a preset dynamic update process, and the renewal duration is returned to the client.

[0052] In this embodiment, in order to flexibly adjust the renewal time and meet the renewal requirements of various interfaces, a dynamic update process is pre-set. It can be understood that the editing time of the pages corresponding to different interfaces is different, the security requirements of different interfaces are also different, and the access frequency of different interfaces is also different. For example, the login interface takes longer than the verification interface, and the security requirements of the payment interface are higher than the security requirements of the query interface. If all interfaces are set with the same renewal time, it is difficult to meet the needs of each interface. In this way, a solution for dynamically updating the renewal time is urgently needed.

[0053] Specifically, query the request records saved in the database; in this embodiment, each time the dynamic renewal duration device receives a request sent by the client, it generates a corresponding historical request record and saves the historical request record in the database. The historical request record includes the request time and the time interval between the request and the previous request corresponding to the request. The previous request can be a request issued by any client to any interface. For example, if the system includes four interfaces A, B, C, and D, and interface A receives request 1 sent by a client at a certain historical moment, the request time 1 of request 1 is recorded, and based on the request time 0 of the previous request of request 1 (for example, represented as request 0), the corresponding time interval of the previous request is determined according to the request time 1 and the request time 0, and the time interval is the difference between the request time 1 and the request time 0. The time interval and the request time are marked as historical request records and saved in the database.

[0054] If there is no historical request record of the target interface in the request record, the renewal duration of the target interface is set to the specified duration; if there is no historical request record of the target interface, the target interface may be a new interface that is accessed for the first time, or the corresponding request record has been cleared by the administrator, so the specified duration can be determined as the renewal duration, and the specified duration can be set as needed, for example, the specified duration can be set to 15 minutes, 20 minutes, 30 minutes, etc.

[0055] If there is a historical request record of the target interface in the request record, the time interval in the historical request record is obtained, and the renewal duration of the target interface is determined according to the preset dynamic update process based on the time interval. If there is a historical request record of the target interface, it means that there is data for determining the renewal duration according to the preset dynamic update process, so the time interval in the historical request record is obtained, and the renewal duration of the target interface is determined according to the preset dynamic update process based on the time interval. The time intervals in the historical request record can be more than three or even a large number.

[0056] Specifically, a historical time interval queue of the target interface is obtained from the historical request record, and a time interval from accessing the target interface to the next access to any interface is marked as a new time interval of the target interface;

[0057] Generally, since the system generally executes the initialization process, and the historical request records before and after the initialization are generally saved as two files, the time interval can be divided into the historical time interval and the new time interval based on the initialization time point. The historical time interval is the time interval between each historical request received by the target interface before the initialization time point and the next request received by any interface corresponding to each historical request; the new time interval is the time interval between each historical request received by the target interface after the initialization time point and the next request received by any interface corresponding to each historical request.

[0058] Based on this, each time an interface request is received, the time interval between the current time point of the request and the last request time of the corresponding client access is recorded, wherein the interface accessed by the last request is the target interface, so as to generate a time interval queue based on the time interval.

[0059] For example, Q represents the time interval queue, Q ix represents the historical time interval of interface i, i represents the interface number, x represents the request sequence number, for example, if interface i is interface A, the first time interval of interface A before the system initialization time point (x-1) can be represented as Q A1 ,Q A2 ...QA (x-1) , that is, before the system initialization time point, interface A has x-1 historical request records.

[0060] Q ij It indicates the time interval for the jth time that the ith interface sends the next request to any other interface after the system initialization time point, where i is the number of interfaces and j is the number of times a certain interface sends the next request.

[0061] Assume that a website system has only four interfaces A, B, C, and D. A client logs in to interface A at 10:00 and then accesses interface B at 10:05. Then the first time interval of interface A is 10:05-10:00=5 minutes, that is, Q A1 , recorded in the database;

[0062] If a client logs in to interface A at 11:00 and then accesses interface C at 10:01, then the second first time interval of interface A is 11:01-11:00 = 1 minute, that is, Q A2 , recorded in the database;

[0063] A client logs in to interface A at 10:00 and then accesses interface D at 10:10. Then the third first time interval of interface A is 10:10-10:00=10 minutes, that is, Q A3 , recorded in the database;

[0064] A client accesses port C at 10:01, and then accesses port B at 10:08. Then the first time interval of port C is 10:08-10:01=7 minutes, that is, Q C1 , recorded in the database;

[0065] A client accesses port C at 10:08 and then accesses port C again at 10:09. Then the second first time interval of port C is 10:09-10:08=1 minute, that is, Q C2 , recorded in the database;

[0066] The above is the historical request record, which initializes the historical time interval queue of each interface: Q A ,Q B ,Q C ,Q D , where Q A The queue has 3 records, Q B The queue has 0 records, Q C The queue has 2 records, Q D The queue has 0 records.

[0067] After the website system is initialized, a client logs in to interface A at 10:00 and then accesses interface B at 10:03. ij , where i is interface A, j is the first new time interval of interface A, recorded as Q A① .

[0068] The new time interval is stored in a new time interval queue, and the renewal time length of the target interface is determined based on the new time interval queue. In this embodiment, the interface A is determined as the target interface, and the historical time interval Q of the interface A is stored in a new time interval queue. A1 , Q A2 , Q A3 and the new time interval Q A① Join the time interval queue Q, that is, the queue time interval Q includes Q A1 , Q A2 , Q A3 , Q A① .

[0069] This embodiment provides two methods for determining the renewal duration of the target interface based on the time interval queue. Method 1:

[0070] Calculating the average interval and standard deviation of the time intervals in the time interval queue;

[0071] The average interval is the average value of the time intervals. The average interval is expressed as μ, and the calculation formula of the average interval is:

[0072]

[0073] Where n represents the number of time intervals.

[0074] Standard Deviation The calculation formula is:

[0075]

[0076] After determining the average interval and the standard deviation, three times the standard deviation 3σ is determined based on the three sigma criterion, and the sum of the average interval and the three times the standard deviation is determined as the renewal duration of the target interface.

[0077] The three sigma criterion is also known as the Laida criterion. It first assumes that a set of test data contains only random errors, calculates and processes them to obtain the standard deviation, and determines an interval according to a certain probability. It is believed that any error exceeding this interval is not a random error but a gross error, and the data containing this error should be eliminated. Based on the three sigma criterion, in this implementation, the probability that each time interval is distributed in (μ-3σ, μ+3σ) is 0.9974, and the probability that each time interval is distributed in (0, μ-3σ] is 0.0013, and the total probability is 0.9987. Therefore, the time interval of historical requests can be better used to determine the renewal length of the target interface.

[0078] Method 2: Sort the intervals in the time interval queue to obtain a sorting result; based on the sorting result, determine the interval of the specified ranking as the renewal duration of the target interface. For example, sort the time intervals from large to small, and take the data duration of the first certain proportion. For example, if the time queue is 100s, 99s, 98s, ..., 2s, 1s, if the duration of the first 5% is taken as the renewal duration, then the duration of 96s at the 5th place is taken as the renewal duration of the target interface.

[0079] Furthermore, after determining the renewal duration of the target interface, the renewal duration is compared with the maximum and minimum values ​​of the preset renewal durations. If the renewal duration is greater than or equal to the minimum value and less than or equal to the maximum value, the renewal duration is judged to be a valid renewal duration, and the renewal duration is returned to the client that sent the request, so that the client can save the renewal duration in a cookie.

[0080] Further, after determining the validity of the request based on the current time point and the valid duration of the target interface, the method further includes:

[0081] The request is invalid, and a prompt message indicating that the request is invalid is issued or the web page corresponding to the request is logged out; it can be understood that if the request is invalid, the corresponding request operation will not be executed based on security considerations.

[0082] The request is valid, and the operation corresponding to the request is performed. For example, if the request is a query, the corresponding query result is returned to the client for the user to view.

[0083] This embodiment is based on the above scheme. When any interface receives a request initiated by a client, it determines the target interface and records the current time point; determines the validity of the request based on the current time point and the effective duration of the target interface; if the request is valid, determines the renewal duration of the target interface based on a preset dynamic update process, and returns the renewal duration to the client. Thus, the required duration of the valid request is re-determined based on the preset dynamic update process, and the renewal duration is flexibly adjusted to meet the renewal requirements of various interfaces.

[0084] In addition, this embodiment also provides a device for dynamically updating the renewal duration. Figure 3 , Figure 3 It is a schematic diagram of the functional modules of the first embodiment of the device for dynamically updating the renewal duration of the present invention.

[0085] In this embodiment, the dynamic renewal duration device is a virtual device stored in Figure 1 The memory 1005 of the dynamic update renewal duration device shown is used to implement all functions of the dynamic update renewal duration program: when any interface receives a request initiated by a client, it is used to determine the target interface and record the current time point; it is used to determine the validity of the request based on the current time point and the effective duration of the target interface; when the request is valid, it is used to determine the renewal duration of the target interface based on a preset dynamic update process, and return the renewal duration to the client.

[0086] Specifically, the dynamic renewal duration updating device includes:

[0087] A first determination module 10 is used to determine a target interface and record a current time point when any interface receives a request initiated by a client;

[0088] A second determination module 20, configured to determine the validity of the request based on the current time point and the validity duration of the target interface;

[0089] The third determination module 30 is used to determine the renewal time of the target interface based on a preset dynamic update process if the request is valid, and return the renewal time to the client.

[0090] Query the request records saved in the database;

[0091] If there is no historical request record of the target interface in the request record, the renewal duration of the target interface is set to a specified duration;

[0092] The request record contains a historical request record of the target interface, a time interval in the historical request record is obtained, and a renewal duration of the target interface is determined based on the time interval according to a preset dynamic update process.

[0093] The third determination module is further used for:

[0094] Acquire the historical time interval queue of the target interface from the historical request record, and mark the time interval from accessing the target interface to the next access to any interface as the new time interval of the target interface;

[0095] The new time interval is stored in a new time interval queue, and the renewal duration of the target interface is determined based on the time interval queue, wherein the time interval queue includes the historical time interval queue and the new time interval queue.

[0096] The third determination module is further used for:

[0097] calculating a mean interval and a standard deviation of the time intervals in the time interval queue;

[0098] The sum of the average interval and three times the standard deviation is determined as the renewal duration of the target interface.

[0099] The third determination module is further used for:

[0100] Sorting each interval in the time interval queue to obtain a sorting result;

[0101] Based on the ranking result, the interval of the specified ranking is determined as the renewal duration of the target interface.

[0102] The second determining module is further used for:

[0103] The request is invalid, and a prompt message indicating that the request is invalid is issued or the webpage corresponding to the request is logged out; or

[0104] The request is valid, and the operation corresponding to the request is executed.

[0105] The first determining module is further used for:

[0106] The time interval between the current time point of the request and the last request time of the corresponding client access is recorded, wherein the interface accessed by the last request is the target interface.

[0107] In addition, an embodiment of the present invention also provides a computer-readable storage medium, on which a program for dynamically updating renewal duration is stored. When the program for dynamically updating renewal duration is executed by a processor, the steps of the method for dynamically updating renewal duration as described above are implemented, which will not be repeated here.

[0108] Compared with the prior art, the present invention proposes a method, device, equipment and computer-readable storage medium for dynamically updating the renewal duration. When any interface receives a request initiated by a client, it determines the target interface and records the current time point; determines the validity of the request based on the current time point and the effective duration of the target interface; if the request is valid, determines the renewal duration of the target interface based on a preset dynamic update process, and returns the renewal duration to the client. Thus, the required duration of the valid request is re-determined based on the preset dynamic update process, realizing flexible adjustment of the renewal duration and meeting the renewal requirements of various interfaces.

[0109] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0110] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0111] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present invention.

[0112] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for dynamically updating the renewal duration, characterized in that: The method comprises: When any interface receives a request initiated by a client, it determines the target interface and records the current time point; Determining the validity of the request based on the current time point and the validity duration of the target interface; If the request is valid, determining the renewal duration of the target interface based on a preset dynamic update process, and returning the renewal duration to the client; determining the renewal duration of the target interface based on the preset dynamic update process includes: Query the request records saved in the database; If there is no historical request record of the target interface in the request record, setting the renewal duration of the target interface to a specified duration; In the case where there is a historical request record of the target interface in the request record, obtaining a time interval in the historical request record, and determining a renewal duration of the target interface based on the time interval according to a preset dynamic update process; the obtaining of the time interval in the historical request record, and determining a renewal duration of the target interface based on the time interval according to a preset dynamic update process, includes: Acquire the historical time interval queue of the target interface from the historical request record, and mark the time interval from accessing the target interface to the next access to any interface as the new time interval of the target interface; The new time interval is stored in a new time interval queue, and the renewal duration of the target interface is determined based on the time interval queue, wherein the time interval queue includes the historical time interval queue and the new time interval queue.

2. The method according to claim 1, characterized in that The determining the renewal duration of the target interface based on the time interval queue includes: calculating a mean interval and a standard deviation of the time intervals in the time interval queue; The sum of the average interval and three times the standard deviation is determined as the renewal duration of the target interface.

3. The method according to claim 1, characterized in that The determining the renewal duration of the target interface based on the time interval queue includes: Sorting each interval in the time interval queue to obtain a sorting result; Based on the ranking result, the interval of the specified ranking is determined as the renewal duration of the target interface.

4. The method according to any one of claims 1 to 3, characterized in that: After determining the validity of the request based on the current time point and the valid duration of the target interface, the method further includes: The request is invalid, and a prompt message indicating that the request is invalid is issued or the webpage corresponding to the request is logged out; or The request is valid, and the operation corresponding to the request is executed.

5. The method according to any one of claims 1 to 3, characterized in that: After any interface receives a request initiated by a client, determines the target interface and records the current time point, it also includes: The time interval between the current time point of the request and the last request time of the corresponding client access is recorded, wherein the interface accessed by the last request is the target interface.

6. A device for dynamically updating the renewal duration, characterized in that: The dynamic renewal duration device comprises: A first determination module, used to determine a target interface and record a current time point when any interface receives a request initiated by a client; A second determination module, configured to determine the validity of the request based on the current time point and the validity duration of the target interface; A third determination module is used to determine the renewal time of the target interface based on a preset dynamic update process when the request is valid, and return the renewal time to the client; The third determination module is further used to query the request record stored in the database; If there is no historical request record of the target interface in the request record, setting the renewal duration of the target interface to a specified duration; In the case where there is a historical request record of the target interface in the request record, obtaining the time interval in the historical request record, and determining the renewal duration of the target interface according to a preset dynamic update process based on the time interval; The third determination module is further used for: Acquire the historical time interval queue of the target interface from the historical request record, and mark the time interval from accessing the target interface to the next access to any interface as the new time interval of the target interface; The new time interval is stored in a new time interval queue, and the renewal duration of the target interface is determined based on the time interval queue, wherein the time interval queue includes the historical time interval queue and the new time interval queue.

7. A device for dynamically updating renewal duration, characterized in that: The dynamically updating renewal duration device includes a processor, a memory, and a dynamically updating renewal duration program stored in the memory. When the dynamically updating renewal duration program is executed by the processor, the steps of the method for dynamically updating the renewal duration as described in any one of claims 1-5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program for dynamically updating a renewal duration, and when the program is executed by a processor, the program implements the steps of the method for dynamically updating a renewal duration as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Token renewal determination method and device, electronic device and storage medium

    CN110381078A