CN116546074A - Login timeout duration setting method, device, computing equipment and storage medium - Google Patents

Login timeout duration setting method, device, computing equipment and storage medium Download PDF

Info

Publication number
CN116546074A
CN116546074A CN202310667338.1A CN202310667338A CN116546074A CN 116546074 A CN116546074 A CN 116546074A CN 202310667338 A CN202310667338 A CN 202310667338A CN 116546074 A CN116546074 A CN 116546074A
Authority
CN
China
Prior art keywords
user
login
timeout duration
request
login timeout
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.)
Pending
Application number
CN202310667338.1A
Other languages
Chinese (zh)
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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202310667338.1A priority Critical patent/CN116546074A/en
Publication of CN116546074A publication Critical patent/CN116546074A/en
Pending legal-status Critical Current

Links

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/01Protocols
    • H04L67/1396Protocols specially adapted for monitoring users' activity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/08Protocols specially adapted for terminal emulation, e.g. Telnet
    • 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
    • H04L67/141Setup of application sessions
    • 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
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/535Tracking the activity of the user
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a login timeout duration setting method, a login timeout duration setting device, computing equipment and a storage medium, and relates to the technical field of computers. Monitoring interface calling events of a target application program in the application; when a first interface of a target application program is called by a first request, judging whether the first request carries login state information of a first user or not; under the condition that the first request carries login state information of a first user, acquiring a first login timeout duration associated with the first user; setting the login timeout duration of the first user as the first login timeout duration. The method provided by the invention can respectively set the associated login timeout duration for each user. Under the scene that the testers need to test the application program after the login overtime, the waiting time of the testers can be reduced, so that the testing efficiency is improved.

Description

Login timeout duration setting method, device, computing equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a computing device, and a storage medium for setting a login timeout period.
Background
Before a user uses an application, the application typically requires the user to perform an account login in order to identify the user's identity. In practical application, after the user successfully logs in the page of the application program, in order to improve user experience, the user does not need to log in again when using the application program next time. However, in order to ensure security, after a certain period of time, the application program will make the login state of the user be login timeout, and at this time, the user needs to log in again. The application program judges whether the user logs in the time-out time length or not, namely the login time-out time length.
During routine testing, a tester may need to test an application after a login timeout. However, since the login timeout duration of the application program is generally set to be longer, the tester needs to wait for a long time to achieve the login timeout, which has a problem of low test efficiency.
Disclosure of Invention
The application provides a login timeout duration setting method, a login timeout duration setting device, a computing device and a storage medium, which can set the login timeout duration of an application program, and can reduce the waiting time of a tester under the scene that the tester needs to test the application program after the login timeout, thereby improving the testing efficiency.
The technical scheme of the embodiment of the application is as follows:
according to a first aspect of an embodiment of the present application, there is provided a login timeout duration setting method, including: monitoring an interface call event of a target application program; when a first interface of a target application program is called by a first request, judging whether the first request carries login state information of a first user or not; under the condition that the first request carries login state information of a first user, acquiring a first login timeout duration associated with the first user; setting the login timeout duration of the first user as the first login timeout duration.
Optionally, the login state information includes a first user identifier, and acquiring a first login timeout duration associated with the first user includes: judging whether a first login timeout duration associated with a first user identifier exists in a preset data list or not; the preset data list comprises a plurality of user identifiers and login timeout duration associated with each user identifier; and under the condition that a first login timeout duration associated with the first user exists in the preset data list, acquiring the first login timeout duration.
Optionally, the method further comprises: and storing the first user identification in the preset data list under the condition that the first login timeout duration associated with the first user does not exist in the preset data list.
Optionally, under the condition that the first request does not carry login state information of the first user, judging whether the first request is a login request of the first user; judging whether a first login timeout duration associated with a first user identifier exists in a preset data list or not under the condition that the first request is a login request of a first user and the login is successful; acquiring a first user identifier under the condition that a first login timeout duration associated with a first user does not exist in a preset data list; the first user identification is stored in a preset data list.
Optionally, the method further comprises: receiving a second request, wherein the second request is used for setting the login timeout duration associated with the first user, and the second request carries the first user identification and the first login timeout duration; and responding to the second request, and storing the first login timeout duration associated with the first user identifier in a preset data list.
Optionally, the preset data list further includes status information corresponding to each user identifier, where the status information includes modified or unmodified status information: the method comprises the steps that under the condition that a first user identifier is stored in a preset data list and a first login timeout duration associated with the first user identifier is not stored, state information corresponding to the first user identifier is unmodified, and under the condition that the first user identifier is stored in the preset data list and the first login timeout duration associated with the first user identifier is stored, the state information corresponding to the first user identifier is modified.
Optionally, monitoring the interface call event of the target application program includes: receiving a third request, wherein the third request carries the identification of the target application program; in response to the third request, an interface call event of the target application is monitored.
Optionally, monitoring the interface call event of the target application program includes: monitoring interface functions corresponding to each interface of the target application program; and determining that the first interface is called under the condition that a first interface function corresponding to the first interface of the target application program is called by the first request.
According to a second aspect of embodiments of the present application, there is provided a block diagram of a login timeout period setting device. The device comprises: the monitoring module is used for monitoring an interface calling event of the target application program; the judging module is used for judging whether the first request carries login state information of the first user or not when the first interface of the target application program is called by the first request; the acquisition module is used for acquiring a first login timeout duration associated with the first user under the condition that the first request carries login state information of the first user; and the processing module is used for setting the login timeout duration of the first user as the first login timeout duration.
Optionally, the login state information includes a first user identifier, and the obtaining module is specifically configured to determine whether a first login timeout duration associated with the first user identifier exists in the preset data list; the preset data list comprises a plurality of user identifiers and login timeout duration associated with each user identifier; and under the condition that a first login timeout duration associated with the first user exists in the preset data list, acquiring the first login timeout duration.
Optionally, the processing module is further configured to store the first user identifier in the preset data list when the first login timeout duration associated with the first user does not exist in the preset data list.
Optionally, the processing module is further configured to determine, when the first request does not carry login status information of the first user, whether the first request is a login request of the first user; judging whether a first login timeout duration associated with a first user identifier exists in a preset data list or not under the condition that the first request is a login request of a first user and the login is successful; acquiring a first user identifier under the condition that a first login timeout duration associated with a first user does not exist in a preset data list; the first user identification is stored in a preset data list.
Optionally, the processing module is further configured to receive a second request, where the second request is used to set a login timeout duration associated with the first user, and the second request carries the first user identifier and the first login timeout duration; and responding to the second request, and storing the first login timeout duration associated with the first user identifier in a preset data list.
Optionally, the preset data list further includes status information corresponding to each user identifier, where the status information includes modified or unmodified status information: the method comprises the steps that under the condition that a first user identifier is stored in a preset data list and a first login timeout duration associated with the first user identifier is not stored, state information corresponding to the first user identifier is unmodified, and under the condition that the first user identifier is stored in the preset data list and the first login timeout duration associated with the first user identifier is stored, the state information corresponding to the first user identifier is modified.
Optionally, the monitoring module is specifically configured to receive a third request, where the third request carries an identifier of the target application program; in response to the third request, an interface call event of the target application is monitored.
Optionally, the monitoring module is specifically configured to monitor an interface function corresponding to each interface of the target application program; and determining that the first interface is called under the condition that a first interface function corresponding to the first interface of the target application program is called by the first request.
According to a third aspect of embodiments of the present application, there is provided a computing device, which may include: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement any of the optional account opening methods of the first aspect described above.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium having instructions stored thereon, which when executed by a processor of a computing device, enable the computing device to perform any one of the above-described optional account opening methods of the first aspect.
According to a fifth aspect of embodiments of the present application, there is provided a computer program product, which when executed by a processor, implements an account opening method as in any of the alternative implementations of the first aspect.
The beneficial effects that this application embodiment provided are: by monitoring the interface calling event of the target application program, the login timeout duration associated with each user can be determined when the interface of the target application program is called, and then the associated login timeout duration is respectively set for each user. Therefore, in the scene that the tester needs to test the application program after the login overtime, the waiting time of the tester can be reduced, and the testing efficiency is improved.
The technical effects caused by any one of the design manners of the second aspect to the fifth aspect may refer to the technical effects caused by different implementation manners of the first aspect, which are not described herein.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application and do not constitute an undue limitation on the application.
Fig. 1 shows an application scenario diagram of a login timeout duration setting device provided in the present application;
FIG. 2 illustrates a schematic diagram of a computing device provided herein;
fig. 3 is a schematic flow chart of a method for setting a login timeout duration provided in the present application;
FIG. 4 shows a schematic view of a first interface provided herein;
fig. 5 is a flowchart of another method for setting a login timeout duration provided in the present application;
FIG. 6 is a flowchart of another method for setting a login timeout duration according to the present application;
FIG. 7 is a schematic flow chart of a second interface provided in the present application;
fig. 8 shows a schematic structural diagram of a device for setting a login timeout duration.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, and/or components.
Before a user uses an application, the application typically requires the user to perform an account login in order to identify the user's identity. In practical application, after the user successfully logs in the page of the application program, in order to improve user experience, the user does not need to log in again when using the application program next time. However, in order to ensure security, after a certain period of time, the application program will make the login state of the user be login timeout, and at this time, the user needs to log in again. The application program judges whether the user logs in the time-out time length or not, namely the login time-out time length.
During routine testing, a tester may need to test an application after a login timeout. However, since the login timeout duration of the application program is generally set to be longer, the tester needs to wait for a long time to achieve the login timeout, which has a problem of low test efficiency.
In view of this, the embodiment of the present application provides a method for setting a login timeout duration, in this application, an interface call event of a target application is monitored; when a first interface of a target application program is called by a first request, judging whether the first request carries login state information of a first user or not; under the condition that the first request carries login state information of a first user, acquiring a first login timeout duration associated with the first user; setting the login timeout duration of the first user as the first login timeout duration. The method provided by the embodiment of the invention can monitor the interface calling event, further can determine the login timeout duration associated with each user when the interface of the target application program is called, and then respectively set the associated login timeout duration for each user. Therefore, in the scene that the tester needs to test the application program after the login overtime, the waiting time of the tester can be reduced, and the testing efficiency is improved.
The embodiment of the application provides a device for setting a login timeout duration, which is used for executing the login timeout duration setting method provided by the embodiment of the application. Referring to fig. 1, fig. 1 shows an application scenario diagram of a device for setting a login timeout duration according to an embodiment of the present application. The login timeout duration setting device 100 receives a first request sent by the terminal device 110, where the first request is used to invoke a first interface of the login timeout duration setting device 100. The setting device 100 of the login timeout duration monitors an interface call event of the target application; when the first interface of the target application program is called by a first request sent by the terminal equipment 110, judging whether the first request carries login state information of a first user; under the condition that the first request carries login state information of a first user, acquiring a first login timeout duration associated with the first user; setting the login timeout duration of the first user as the first login timeout duration. The terminal device 110 is configured to send a first request to the login timeout duration setting device 100, where the first request is used to invoke a first interface of the login timeout duration setting device 100.
It should be appreciated that the device for setting a login timeout 100 may be any computing device having computing processing capabilities, or a functional module in the computing device.
The setting means 100 as an example login timeout period may be a computing device with arbitrary computing processing capabilities or a functional module in the computing device. By way of example, the computing device may be a general purpose computer, a notebook computer, a server, or the like.
The following exemplifies the setting apparatus 100 of the login timeout period as a computing device.
Fig. 2 shows a schematic structural diagram of a computing device 200 provided in an embodiment of the present application. The computing device 200 includes a processor 210, a memory 220, and at least one communication interface 230.
Processor 210 may include one or more processing cores. The processor 210 utilizes various interfaces and lines to connect various portions of the computing device 200, execute various functions of the computing device 200 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 220, and invoking data stored in the memory 220. Alternatively, the processor 210 may be implemented in at least one hardware form of digital signal processing (digital signal processing, DSP), field-programmable gate array (field-programmable gate array, FPGA), programmable logic array (programmable logic array, PLA). The processor 210 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (graphics processing unit, GPU), and a modem, etc. It will be appreciated that the modem may not be integrated into the processor 210 and may be implemented solely by a single communication chip.
Memory 220 may be used to store instructions, programs, code, sets of codes, or sets of instructions. Memory 220 may include a memory program area. The storage program area may store therein instructions for implementing an operating system, instructions for implementing at least one function (such as a request receiving function, a duration setting function, etc.), instructions for implementing the various method embodiments below, etc.
A communication interface 230 for communicating with a communication network or devices in a communication network, such as an ethernet, a Radio Access Network (RAN), a wireless local area network (wireless local area networks, WLAN), or an AP in a WLAN network, etc. For example, the communication interface 230 of the computing device 200 communicates with other computing devices or terminal devices.
In particular implementations, in physical implementation, the various devices described above (e.g., processor 210, memory 220, and communication interface 230) may be devices in the same computing device; alternatively, at least two of the devices may be disposed in the same computing device, i.e., as different devices in one computing device, such as in a manner similar to the deployment of devices or devices in a distributed system.
It should be appreciated that the architecture illustrated in this embodiment is not intended to constitute a particular limitation on the computing device 200. In some embodiments, computing device 200 may include more or fewer components than shown, or may combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Fig. 3 is a flowchart of a method for setting a login timeout duration according to an embodiment of the present application, as shown in fig. 3, where the method may be performed by the login timeout duration setting apparatus 100 shown in fig. 1, that is, the computing device 200 with the hardware structure shown in fig. 2. The method may comprise the steps of:
s301, monitoring an interface calling event of a target application program.
Specifically, the computing device monitors interface call events of the target application based on the dynamic tracking monitoring tool. For example, the target application may be a Java virtual machine (Java virtual machine, JVM), and the dynamic trace monitor tool may be a JVM-sadbox tool or btrace tool, or the like. In the case that the dynamic tracking and monitoring tool may be a jvm-sadbox tool, the program code corresponding to the setting device of the login timeout duration provided in the embodiment of the present application may be installed in a module directory under an installation directory of the jvm-sadbox tool. It should be noted that, the computing device may monitor the interface call event of the target application program in other manners, which is not limited in particular in the embodiment of the present application.
In one possible implementation manner, S301 specifically includes: monitoring interface functions corresponding to each interface of the target application program; and determining that the first interface is called under the condition that a first interface function corresponding to the first interface of the target application program is called by the first request.
Specifically, the interface function corresponding to each interface of the target application program is a function based on the spring development specification. In other words, when a certain interface of the target application is called, the interface function corresponding to the interface is called, so that the interface function corresponding to each interface of the target application is monitored, and the interface calling event of the target application can be monitored.
In some embodiments, before the computing device performs S301, the computing device receives a third request, where the third request is used to instruct the computing device to monitor an interface call event of the target application program.
Specifically, the third request carries the identifier of the target application program.
In one example, the third request may include a plurality of fields "sadbox-p 12330-d mon ITor/start," where the sadbox field indicates that the computing device monitors interface call events of the target application using the jvm-sadbox tool, the 12330 field is an identification of the target application, and the computing device may determine the target application from the plurality of applications based on the identification of the target application. The monitor/start field is an identifier of a device for setting a login timeout duration, and the computing device may start the device for setting the login timeout duration based on the identifier of the device for setting the login timeout duration.
In response. The computing device monitors for interface call events for a target application identified as 12330 via the jvm-sadbox tool in response to the third request.
In a possible implementation manner, referring to fig. 4, fig. 4 is a schematic diagram of a first interface provided in the embodiment of the present application, and a user may input a third request through the first interface displayed by the terminal device. A first control 401 and a second control 402 are included in the first interface, wherein the first control 401 is for a user to enter a plurality of fields in the third request, and the second control 402 is for sending the third request to the computing device.
S302, when the first interface of the target application program is called by the first request, judging whether the first request carries login state information of the first user.
Specifically, the login state information of the first user includes a first user identifier, a time when the first user successfully logs in last time, and a login timeout duration of the first user. The login state information is information which is generated after the computing device determines that the user is successfully logged in and returned to the terminal device after the user sends a request for logging in the target application program through the terminal device.
Based on the login state information, when the first user needs to call the service interface of the target application program again, the request of logging in the target application program is not required to be sent again, the login state information is only required to be sent to the computing equipment, the computing equipment only needs to verify whether the time from the last successful login exceeds the login timeout period again, and therefore the user does not need to log in again when calling the service interface of the target application program every time, and can call the service interface of the target application program within the login timeout period only based on the login state information.
In one example, where the first request is a first interface that invokes a target application, the computing device determines whether jsesionid is present in HttpServletRequest req objects of a pass parameter in the first request, determines that the first request carries login state information for the first user if jsesionid is present in the pass parameter, and determines that the first request does not carry login state information for the first user if jsesionid is not present in the pass parameter.
S303, under the condition that the first request carries login state information of the first user, acquiring a first login timeout duration associated with the first user.
Specifically, the first login timeout duration associated with the first user is a preset login timeout duration corresponding to the first user. It should be appreciated that the target application is typically provided with a default login timeout duration, i.e. all users use the same login timeout duration, which is typically added to the login state information when the computing device generates the login state information, and since each user uses the same default login timeout duration, in order to differentiate users, the computing device may receive an instruction for configuring the login timeout duration input by the first user, where the instruction is used to set the login timeout duration of the first user from the default login timeout duration to a target value, where the target value is the first login timeout duration associated with the first user.
In one possible implementation manner, referring to fig. 5, the login state information includes a first user identifier, and the acquiring a first login timeout duration associated with the first user includes:
s501, judging whether a first login timeout duration associated with a first user identifier exists in a preset data list.
Specifically, the preset data list includes a plurality of user identifiers and login timeout duration associated with each user identifier.
Optionally, the preset data list further includes a time of last login success corresponding to each user identifier in the plurality of user identifiers.
For example, referring to table 1 below, table 1 shows a data table of a preset data list for the embodiment of the present application. The user identifier may be a value of jsesionid in a HttpServletRequest req object in the login request of each user.
TABLE 1
User identification Last login success time Time-out duration
001 2023.01.01.00:00:00 60s
002 2023.01.01.00:05:46 30s
Further, when the first user identifier of the first user is 001, the computing device determines whether the first login timeout duration associated with the first user identifier exists in table 1.
S502, acquiring a first login timeout duration under the condition that the first login timeout duration associated with the first user exists in a preset data list.
In combination with the above example, since the first login timeout period associated with the first user identifier exists in the above table 1, the first login period managed by the first user identifier is acquired to be 60s.
S503, storing the first user identification in the preset data list under the condition that the first login timeout duration associated with the first user does not exist in the preset data list.
Illustratively, when the first user identifier of the first user is 003, the computing device determines whether the first login timeout period associated with the first user identifier exists in table 1. Since the first login timeout period associated with the first user id does not exist in the above table 1, 003 is stored in the preset data list, so as to obtain the following table 2.
TABLE 2
User identification Last login success time Time-out duration
001 2023.01.01.00:00:00 60s
002 2023.01.01.00:05:46 30s
003
In one possible implementation manner, referring to fig. 6, the method provided in the embodiment of the present application further includes the following steps:
s601, receiving a second request, wherein the second request is used for setting the login timeout duration associated with the first user, and the second request carries the first user identification and the first login timeout duration.
In particular, the second request may be sent by the user through the terminal device.
In an example, a user may input a second request through a second interface displayed by a terminal device, referring to fig. 7, fig. 7 is a schematic diagram of a second interface provided by an embodiment of the present application, and the second interface includes a third control 701 and a fourth control 702, where the third control is used for inputting a first user identifier and a first login timeout period associated with the first user identifier by the user, and the fourth control is used for sending the second request to the computing device in response to an operation of the user.
S602, responding to a second request, and storing a first login timeout duration associated with the first user identifier in a preset data list.
Specifically, referring to table 3 in conjunction with table 2, when the first user identifier is 001, and the first login timeout period associated with the first user identifier in the second request is 10s, the computing device modifies the first login timeout period associated with the user identifier 001 from 60s to 10s based on the second request.
TABLE 3 Table 3
User identification Last login success time Time-out duration
001 2023.01.01.00:00:00 10s
002 2023.01.01.00:05:46 30s
003
Optionally, the preset data list further includes status information corresponding to each user identifier, where the status information includes modified or unmodified status information: the method comprises the steps that under the condition that a first user identifier is stored in a preset data list and a first login timeout duration associated with the first user identifier is not stored, state information corresponding to the first user identifier is unmodified, and under the condition that the first user identifier is stored in the preset data list and the first login timeout duration associated with the first user identifier is stored, the state information corresponding to the first user identifier is modified.
Specifically, the first user identifier is stored in the preset data list, and the first login timeout duration associated with the first user identifier is stored in the preset data list, which can be understood as that the first login timeout duration associated with the first user identifier is modified by a second request sent by a user through the terminal device. The first user identifier is stored in the preset data list, and the first login timeout duration associated with the first user identifier is not stored can be understood as that the user does not send the second request modification through the terminal device.
For example, referring to table 4, table 4 is a data table of a preset data list provided in the embodiment of the present application, and on the basis of table 2, the data table further includes status information corresponding to each user identifier. The state information corresponding to the user identifiers 001 and 002 is modified, and the state information corresponding to the user identifier 003 is unmodified.
TABLE 4 Table 4
User identification Last login success time Time-out duration Status information
001 2023.01.01.00:00:00 60s Modified
002 2023.01.01.00:05:46 30s Modified
003 Unmodified
Further, after the user sends the second request through the second interface, the method further includes displaying a third interface on the terminal device, where the third interface includes a preset data list, and the preset data list includes login timeout duration and state information associated with the first user identifier.
S304, setting the login timeout duration of the first user as the first login timeout duration.
As can be seen from S301 to S304, the method provided in the embodiment of the present application can monitor the interface call event, further determine the login timeout duration associated with each user when the interface of the target application is called, and then set the associated login timeout duration for each user respectively. Therefore, in the scene that the tester needs to test the application program after the login overtime, the waiting time of the tester can be reduced, and the testing efficiency is improved.
In some embodiments, the method provided in the embodiments of the present application further includes the following steps: and judging whether the first request is a login request of the first user or not under the condition that the login state information of the first user is not carried in the first request. And judging whether a first login timeout duration associated with the first user identifier exists in the preset data list or not under the condition that the first request is a login request of the first user and the login is successful. And under the condition that the first login timeout duration associated with the first user does not exist in the preset data list, acquiring the first user identification. The first user identification is stored in a preset data list.
In one example, when the first request does not carry login state information of the first user, the computing device calls a session object acquired by getSession () of an httpservletrequesteq object in a transfer parameter of the first request, then acquires a user attribute value from the session object, and determines that the first request is a login request of the first user and login is successful if the user attribute value can be acquired.
As can be seen from the foregoing, in the method provided in the embodiment of the present application, when the first request is a login request, the first user identifier is stored in the preset data list, so that when the user modifies the login timeout duration associated with the first user identifier through the second request, the first login timeout duration associated with the first user identifier is added to the preset data list, so as to complete modification of the first login timeout duration associated with the first user identifier.
The foregoing description of the embodiments of the present application has been presented primarily from a method perspective. It is to be understood that the above-described computing device, in order to implement the above-described functions, includes at least one of a corresponding hardware structure and software module that performs the respective functions. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The embodiment of the present application may divide the functional units of the login timeout period setting device according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated in one processing unit. The integrated units may be implemented in hardware or in software functional units. It should be noted that, in the embodiment of the present application, the division of the units is schematic, which is merely a logic function division, and other division manners may be implemented in actual practice.
Fig. 8 is a block diagram illustrating a configuration of a login timeout period setting device according to an embodiment of the present application. The device comprises: a monitoring module 810 for monitoring interface call events of the target application; a judging module 820, configured to judge whether the first request carries login state information of the first user when the first interface of the target application is called by the first request; an obtaining module 830, configured to obtain a first login timeout duration associated with the first user when the first request carries login status information of the first user; a processing module 840 is configured to set a login timeout duration of the first user to the first login timeout duration.
Optionally, the login state information includes a first user identifier, and the obtaining module 830 is specifically configured to determine whether a first login timeout duration associated with the first user identifier exists in the preset data list; the preset data list comprises a plurality of user identifiers and login timeout duration associated with each user identifier; and under the condition that a first login timeout duration associated with the first user exists in the preset data list, acquiring the first login timeout duration.
Optionally, the processing module 840 is further configured to store the first user identifier in the preset data list if the first login timeout period associated with the first user does not exist in the preset data list.
Optionally, the processing module 840 is further configured to determine whether the first request is a login request of the first user if the first request does not carry login status information of the first user; judging whether a first login timeout duration associated with a first user identifier exists in a preset data list or not under the condition that the first request is a login request of a first user and the login is successful; acquiring a first user identifier under the condition that a first login timeout duration associated with a first user does not exist in a preset data list; the first user identification is stored in a preset data list.
Optionally, the processing module 840 is further configured to receive a second request, where the second request is used to set a login timeout duration associated with the first user, and the second request carries the first user identifier and the first login timeout duration; and responding to the second request, and storing the first login timeout duration associated with the first user identifier in a preset data list.
Optionally, the preset data list further includes status information corresponding to each user identifier, where the status information includes modified or unmodified status information: the method comprises the steps that under the condition that a first user identifier is stored in a preset data list and a first login timeout duration associated with the first user identifier is not stored, state information corresponding to the first user identifier is unmodified, and under the condition that the first user identifier is stored in the preset data list and the first login timeout duration associated with the first user identifier is stored, the state information corresponding to the first user identifier is modified.
Optionally, the monitoring module 810 is specifically configured to receive a third request, where the third request carries an identifier of the target application program; in response to the third request, an interface call event of the target application is monitored.
Optionally, the monitoring module 810 is specifically configured to monitor an interface function corresponding to each interface of the target application; and determining that the first interface is called under the condition that a first interface function corresponding to the first interface of the target application program is called by the first request.
For a specific description of the above alternative modes, reference may be made to the foregoing method embodiments, and details are not repeated here. In addition, any explanation and description of the login timeout duration setting device provided above may refer to the corresponding method embodiments, and will not be repeated.
Embodiments of the present application also provide a computer readable storage medium having stored therein at least one computer instruction that is loaded and executed by a processor to implement the data storage method of the above embodiments. For the explanation of the relevant content and the description of the beneficial effects in any of the above-mentioned computer-readable storage media, reference may be made to the above-mentioned corresponding embodiments, and the description thereof will not be repeated here.
The embodiment of the application also provides a chip. The chip has integrated therein a control circuit and one or more ports for implementing the functions of the processing means of the sequence messages described above. Optionally, the functions supported by the chip may be referred to above, and will not be described herein. Those of ordinary skill in the art will appreciate that all or a portion of the steps implementing the above-described embodiments may be implemented by a program to instruct associated hardware. The program may be stored in a computer readable storage medium. The above-mentioned storage medium may be a read-only memory, a random access memory, or the like. The processing unit or processor may be a central processing unit, a general purpose processor, a specific circuit configuration (application specific integrated circuit, ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic device, transistor logic device, hardware components, or any combination thereof.
Embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the methods of the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, a website, computer, server, or data center via a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriberline, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices including one or more servers, data centers, etc. that can be integrated with the media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., SSD), etc.
It should be noted that the above-mentioned devices for storing computer instructions or computer programs, such as, but not limited to, the above-mentioned memories, computer-readable storage media, communication chips, and the like, provided in the embodiments of the present application all have non-volatility (non-transparency). Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable storage medium. Computer-readable storage media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing description of the preferred embodiments is merely exemplary in nature and is not intended to limit the invention, thus, any modification, equivalent replacement, improvement, etc. that comes within the spirit and principles of the present application are intended to be included in the scope of the present application.

Claims (11)

1. A method for setting a login timeout period, the method comprising:
monitoring an interface calling event of the target application program;
when a first interface of the target application program is called by a first request, judging whether the first request carries login state information of a first user or not;
acquiring a first login timeout duration associated with the first user under the condition that the first request carries login state information of the first user;
setting the login timeout duration of the first user as the first login timeout duration.
2. The method of claim 1, wherein the login status information includes a first user identification, and wherein the obtaining a first login timeout duration associated with the first user comprises:
judging whether a first login timeout duration associated with the first user identifier exists in a preset data list or not; the preset data list comprises a plurality of user identifiers and login timeout duration associated with each user identifier;
and under the condition that the first login timeout duration associated with the first user exists in the preset data list, acquiring the first login timeout duration.
3. The method according to claim 2, wherein the method further comprises:
and storing the first user identification in the preset data list under the condition that the first login timeout duration associated with the first user does not exist in the preset data list.
4. A method according to claim 3, wherein if the first request does not carry login status information of the first user, determining whether the first request is a login request of the first user;
judging whether a first login timeout duration associated with the first user identifier exists in a preset data list or not under the condition that the first request is a login request of a first user and the login is successful;
acquiring the first user identification under the condition that a first login timeout duration associated with the first user does not exist in the preset data list;
and storing the first user identification in the preset data list.
5. The method according to claim 3 or 4, characterized in that the method further comprises:
receiving a second request, wherein the second request is used for setting the login timeout duration associated with the first user, and the second request carries a first user identifier and the first login timeout duration;
And responding to the second request, and storing a first login timeout duration associated with the first user identifier in the preset data list.
6. The method of claim 5, wherein the preset data list further includes status information corresponding to each user identifier, and the status information includes modified or unmodified status information: the state information corresponding to the first user identifier is unmodified when the first user identifier is stored in the preset data list and the first login timeout duration associated with the first user identifier is not stored, and the state information corresponding to the first user identifier is modified when the first user identifier is stored in the preset data list and the first login timeout duration associated with the first user identifier is stored.
7. The method of any of claims 1-6, wherein monitoring the target application for interface call events comprises:
receiving a third request, wherein the third request carries an identifier of a target application program;
and in response to the third request, monitoring an interface call event of the target application program.
8. The method of claim 7, wherein monitoring the interface call event of the target application program comprises:
monitoring an interface function corresponding to each interface of the target application program;
and determining that the first interface is called under the condition that a first interface function corresponding to the first interface of the target application program is called by the first request.
9. A device for setting a login timeout period, the device comprising:
the monitoring module is used for monitoring the interface calling event of the target application program;
the judging module is used for judging whether the first request carries login state information of a first user or not when the first interface of the target application program is called by the first request;
the acquisition module is used for acquiring a first login timeout duration associated with the first user under the condition that the first request carries login state information of the first user;
and the processing module is used for setting the login timeout duration of the first user as the first login timeout duration.
10. A computing device, comprising:
a processor; a memory for storing the processor-executable instructions;
Wherein the processor is configured to execute the instructions to implement the method of setting a login timeout duration according to any of claims 1-8.
11. A computer readable storage medium, wherein instructions in the computer readable storage medium, when executed by a processor of a computing device, enable the computing device to perform the method of setting a login timeout duration according to any one of claims 1-8.
CN202310667338.1A 2023-06-06 2023-06-06 Login timeout duration setting method, device, computing equipment and storage medium Pending CN116546074A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310667338.1A CN116546074A (en) 2023-06-06 2023-06-06 Login timeout duration setting method, device, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310667338.1A CN116546074A (en) 2023-06-06 2023-06-06 Login timeout duration setting method, device, computing equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116546074A true CN116546074A (en) 2023-08-04

Family

ID=87447185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310667338.1A Pending CN116546074A (en) 2023-06-06 2023-06-06 Login timeout duration setting method, device, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116546074A (en)

Similar Documents

Publication Publication Date Title
CN107832100B (en) APK plug-in loading method and terminal thereof
CN108256118B (en) Data processing method, device, system, computing equipment and storage medium
CN109495306B (en) Method and equipment for expanding capacity of service network
CN107135279B (en) Method and device for processing long connection establishment request
CN108924274B (en) Domain name system DNS processing method and device, storage medium and electronic equipment
CN107862091B (en) Control method and device for realizing webpage access
CN109271172B (en) Host performance expansion method and device of sweep cluster
CN110381043B (en) SSL-based server health detection method and device and electronic equipment
CN110661673B (en) Heartbeat detection method and device
CN108519935B (en) Board card testing method and device, readable storage medium and computer equipment
CN107992386A (en) A kind of router memory method for testing pressure and system
CN112398689A (en) Network recovery method and device, storage medium and electronic equipment
CN110896362B (en) Fault detection method and device
CN106992893A (en) The management method and device of router
CN116546074A (en) Login timeout duration setting method, device, computing equipment and storage medium
CN109726564B (en) Information processing method and information processing system applied to encryption machine
CN115276844B (en) Communication module testing method and device, storage medium and electronic equipment
CN115454896A (en) SMBUS-based SSD MCTP control message verification method and device, computer equipment and storage medium
CN110798381B (en) Method, device and equipment for verifying KCS channel communication stability
CN109981365B (en) Data monitoring method and device, user equipment and storage medium
CN109104321B (en) Method for improving Web _ HDFS availability under Hadoop dual-computer cluster
CN113392028A (en) Distributed test system and control method
CN113438749A (en) Multi-public-network connection driving method and device, computer equipment and storage medium
CN114116544A (en) Method, device and equipment for acquiring slot information and storage medium
CN112134749A (en) Dynamic network access management method and system

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