Web application control method and device, equipment and storage medium
Monitor user operations through the behavior monitor and control the timeout processing of web applications based on time difference and status, which solves the security risks caused by forgetting to exit web applications, establishes unified management rules, and improves user experience and security.
Patent Information
- Application Number
- CN202310945914.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2024-08-30
AI Technical Summary
Existing web applications may forget to exit when users leave, resulting in security risks during subsequent use, and the lack of unified user operation monitoring and management rules affects security.
Monitor user operations through the behavior monitor, obtain the current time and status controller parameters, decide whether to execute the timeout process or update the last operation time based on the time difference and web application status, and establish unified management rules based on user operations.
It improves the security of web applications, ensures users' privacy protection when using it, and enhances users' willingness and experience to use.
Smart Images

Figure CN118568688A
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and specifically relates to a web application control method, device, equipment and storage medium. Background Art
[0002] As people's awareness of security and privacy continues to strengthen, the security of Internet devices has also received widespread attention. When users run web applications through public Internet devices, they may forget to log out when they leave. If other users use it later, there will be great risks.
[0003] In the face of the above-mentioned problem of forgetting to log out of a web application, the existing web application usually uses a front-end framework and h5API and other technologies to determine the user's status, and controls the web application to automatically perform corresponding operations according to the user's status.
[0004] However, existing web applications do not have unified management rules for judging and monitoring user operations, and the security of web application usage is still an issue to be resolved. Summary of the invention
[0005] In order to solve the above problems in the prior art, the present application provides a web application control method, apparatus, device and storage medium.
[0006] In a first aspect, the present application provides a web application control method, the method comprising:
[0007] When the behavior supervisor detects that the user operates the web application through a preset behavior, a first current time and a parameter of a state controller are obtained, wherein the preset behavior is a behavior preset by the behavior controller, and the parameters of the state controller include: a web application state and a last operation time of the web application, and the web application state is used to indicate whether the web application is locked;
[0008] Obtain a first time difference between the first current time and the last operation time;
[0009] Determine whether to execute a timeout processing flow according to the first time difference and the web application state.
[0010] In a possible implementation manner, determining whether to execute a timeout processing flow according to the first time difference and the web application state includes:
[0011] When the first time difference is greater than or equal to a time difference threshold, and the web application state is used to indicate that the web application is not locked, determining to execute a timeout processing flow;
[0012] When the first time difference is greater than or equal to a time difference threshold, and the web application state is used to indicate that the web application is locked, the state processor is controlled to update the last operation time according to the first current time.
[0013] In a possible implementation, the method further includes:
[0014] When the web application state is used to indicate that the web application is not locked, obtaining a second current time according to a preset time interval;
[0015] Acquire a second time difference according to the second current time and the last operation time;
[0016] If the second time difference is greater than or equal to the time difference threshold, the timeout processing flow is executed.
[0017] In a possible implementation manner, before obtaining the first current time and the parameters of the state controller, the method further includes:
[0018] Obtaining a behavior control instruction, wherein the behavior control instruction is used to instruct to enable or disable a preset behavior managed by the behavior controller;
[0019] According to the control instruction, each preset behavior and its corresponding enable or disable flag are stored in association, wherein the behavior supervisor is used to monitor the enabled preset behavior.
[0020] In a possible implementation manner, before obtaining the first current time and the parameters of the state controller, the method further includes:
[0021] Obtaining a locking instruction, wherein the locking instruction is used to instruct to enable or disable locking of the web application;
[0022] According to the locking instruction, the web application state stored in the state controller is changed.
[0023] In a possible implementation, the method further includes:
[0024] Obtaining a passive update instruction, wherein the passive update instruction is used to indicate the last operation time of updating the state memory storage;
[0025] A third current time is obtained, and the state processor is controlled to update the last operation time according to the third current time.
[0026] In a possible implementation manner, before obtaining the second current time at a preset time interval, the method further includes:
[0027] Obtaining a time setting instruction, wherein the time setting instruction is used to indicate a preset time interval;
[0028] The preset time interval is stored.
[0029] In a second aspect, the present application provides a web application control device, including: a judgment module, an acquisition module and a control module, wherein:
[0030] The judgment module is used to obtain a first current time and a parameter of a state controller when the behavior supervisor detects that the user operates the web application through a preset behavior, wherein the preset behavior is a behavior preset by the behavior controller, and the parameters of the state controller include: a web application state and a last operation time of the web application, and the web application state is used to indicate whether the web application is locked;
[0031] The acquisition module acquires a first time difference between the first current time and the last operation time;
[0032] The control module is used to determine whether to execute a timeout processing flow according to the first time difference and the web application state.
[0033] In a possible implementation manner, the determination module is further configured to:
[0034] When the first time difference is greater than or equal to a time difference threshold, and the web application state is used to indicate that the web application is not locked, determining to execute a timeout processing flow;
[0035] When the first time difference is greater than or equal to a time difference threshold, and the web application state is used to indicate that the web application is locked, the state processor is controlled to update the last operation time according to the first current time.
[0036] In a possible implementation manner, the control module is further used to:
[0037] When the web application state is used to indicate that the web application is not locked, obtaining a second current time according to a preset time interval;
[0038] Acquire a second time difference according to the second current time and the last operation time;
[0039] If the second time difference is greater than or equal to the time difference threshold, the timeout processing flow is executed.
[0040] In a possible implementation manner, the control module is further used to:
[0041] Obtaining a behavior control instruction, wherein the behavior control instruction is used to instruct to enable or disable a preset behavior managed by the behavior controller;
[0042] According to the control instruction, each preset behavior and its corresponding enable or disable flag are stored in association, wherein the behavior supervisor is used to monitor the enabled preset behavior.
[0043] In a possible implementation manner, the control module is further used to:
[0044] Obtaining a locking instruction, wherein the locking instruction is used to instruct to enable or disable locking of the web application;
[0045] According to the locking instruction, the web application state stored in the state controller is changed.
[0046] In a possible implementation manner, the control module is further used to:
[0047] Obtaining a passive update instruction, wherein the passive update instruction is used to indicate the last operation time of updating the state memory storage;
[0048] A third current time is obtained, and the state processor is controlled to update the last operation time according to the third current time.
[0049] In a possible implementation manner, the control module is further used to:
[0050] Obtaining a time setting instruction, wherein the time setting instruction is used to indicate a preset time interval;
[0051] The preset time interval is stored.
[0052] In a third aspect, the present application provides an electronic device, including: at least one processor and a memory, wherein:
[0053] The memory is used to store computer-executable instructions;
[0054] The at least one processor is used to execute the computer-executable instructions stored in the memory, so that the at least one processor executes the web application control method as described in any one of the first aspects.
[0055] In a fourth aspect, the present application provides a computer storage medium, wherein the computer storage medium stores computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the web application control method as described in any one of the above.
[0056] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, can implement the steps of the web application control method as described in any of the above items.
[0057] The present application provides a web application control method, device, equipment and storage medium. When a behavior supervisor detects that a user triggers a behavior controller, the current time and state controller parameters are obtained, and the execution of the timeout processing flow or the last operation time is updated with the current time is determined according to the state controller parameters. Through the above method, a unified web application management rule based on user operation is established, making users safer when using web applications and improving their willingness to use. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0059] Figure 1 A schematic diagram of a web application control method provided in an embodiment of the present application Figure 1 ;
[0060] Figure 2 A schematic diagram of a web application control method provided in an embodiment of the present application Figure 2 ;
[0061] Figure 3 A schematic diagram of a web application control method provided in an embodiment of the present application Figure 3 ;
[0062] Figure 4 A schematic diagram of a web application management rule provided in an embodiment of the present application;
[0063] Figure 5 A schematic diagram of the structure of a web application control device provided in an embodiment of the present application;
[0064] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0065] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0067] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein, for example.
[0068] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0069] When a user is using a web application, if the user leaves and forgets to log out, the web application still maintains the login interface, which poses a great risk when other users use it later.
[0070] In the face of the above problem of forgetting to log out of web applications, existing web applications usually use front-end frameworks and h5API and other technologies to determine the user's status and control the web application to automatically perform corresponding operations according to the user's status. However, there is no unified management rule for the determination and monitoring of user operations in existing web applications, and the security of web application use is still an issue to be solved.
[0071] The present application provides a web application control method. When a behavior supervisor detects that a user triggers a behavior controller, the current time and state controller parameters are obtained, and the timeout processing flow is executed or the last operation time is updated with the current time only according to the state controller parameters. In the above manner, a unified web application management rule based on user operations is established, making users safer when using web applications and improving their willingness to use.
[0072] Next, the technical solution shown in the present application is described in detail through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be described repeatedly in different embodiments.
[0073] Figure 1 A schematic diagram of a web application control method provided in an embodiment of the present application Figure 1 .like Figure 1 As shown, the method includes:
[0074] S101. When the behavior supervisor detects that a user operates a web application through a preset behavior, a first current time and a parameter of a state controller are obtained.
[0075] In this step, some web applications involve user privacy and other related information. Therefore, when no user operation is detected for a long time, or when the interval between two consecutive user operations is long, in order to protect the user's privacy information, corresponding protection measures need to be taken for the web application.
[0076] Specifically, this embodiment mainly focuses on how the web application operates when the system detects that the interval between two consecutive user operations is long.
[0077] The preset behavior is a behavior preset by a behavior controller, and the parameters of the state controller include: a web application state and a last operation time of the web application, and the web application state is used to indicate whether the web application is locked.
[0078] Furthermore, the first current time is the current time when the user operates the web application through a preset behavior, and is used to determine whether the time interval between the current user operation and the last user operation is too long.
[0079] Specifically, when the behavior supervisor detects that the behavior controller is triggered by a preset behavior operation of the user, the parameters of the first current time and state controller are obtained, and whether to control the web application to perform timeout processing is determined according to the parameters of the first current time and state controller.
[0080] S102: Obtain a first time difference between the first current time and the last operation time.
[0081] In this step, the last operation time is the current time when the behavior supervisor detects that the user operates the web application through the preset behavior. The first time difference is used to determine whether the time interval between the current user operation and the last user operation is too long.
[0082] Specifically, when the first current time and the last operation time are obtained, a first time difference between the first current time and the last operation time is obtained, and it is determined whether the time interval between the current user operation and the last user operation is too long according to the first time difference.
[0083] S103: Determine whether to execute a timeout processing flow according to the first time difference and the web application state.
[0084] In this step, the web application state is used to indicate whether the web application is locked. When the web application is locked, it means that when the user operates the web application again, he needs to pass the verification to unlock the web application before he can use it normally, which protects the security of the user's use of the web application to a certain extent.
[0085] Further, it is determined whether the time interval between the current user operation and the last user operation is too long based on the first time difference. If the first time difference is long, it is considered that the time interval between the current user operation and the last user operation is long, that is, the current operation may not be performed by the user himself, and it is necessary to further determine whether to perform timeout processing based on the web application state.
[0086] Specifically, when the web application state is unlocked, the operator can directly operate the web application, and the user's privacy security cannot be protected. Therefore, it is necessary to control the web application to perform timeout processing to ensure the user's web application use security.
[0087] Optionally, this embodiment does not impose any limitation on the timeout processing. Exemplarily, the timeout processing may be logging out of the web application interface, controlling the web application interface to lock, etc. If the web application performs the timeout processing, when it is detected that the user unlocks the lock operation performed by the timeout processing, the last operation time is updated according to the current time corresponding to the unlocking.
[0088] For example, the first current time is 18:30, the last operation time is 18:00, and the web application state is unlocked. The first time difference is 30 minutes, the first time difference is long, and the web application state is unlocked, so the web application needs to be controlled to perform timeout processing.
[0089] The present application provides a web application control method. When a behavior supervisor detects that a user triggers a behavior controller, the current time and state controller parameters are obtained, and the timeout processing flow is executed or the last operation time is updated with the current time only according to the state controller parameters. In the above manner, a unified web application management rule based on user operations is established, making users safer when using web applications and improving their willingness to use.
[0090] Figure 2 A schematic diagram of a web application control method provided in an embodiment of the present application Figure 2 This embodiment describes in detail how to determine the operation steps of executing the timeout processing flow according to the first time difference and the web application state. Figure 2 As shown, the method includes:
[0091] S201. Obtain a first time difference between the first current time and the last operation time, and a web application state.
[0092] In this step, when the behavior supervisor detects that the user operates the web application through the preset behavior, it is necessary to determine whether the user can use the web application normally this time, that is, whether to control the web application to perform timeout processing.
[0093] Specifically, the parameters of the first current time and state controller, namely, the last operation time of the web application and the web application state, are obtained. A first time difference is obtained according to the first current time and the last operation time, and it is determined whether the web application needs to be controlled to perform timeout processing according to the first time difference and the web application state.
[0094] S202: When the first time difference is greater than or equal to a time difference threshold, and the web application state is used to indicate that the web application is not locked, determine to execute a timeout processing flow.
[0095] In this step, the time difference threshold is used to determine whether the time interval between the current user operation and the previous user operation is long.
[0096] Specifically, when the first time difference is greater than or equal to the time difference threshold, it means that the time interval between the current user operation and the previous user operation is long, and it is impossible to determine whether the current operation is performed by the user himself, and the security of the web application needs to be ensured. Therefore, it is necessary to further determine according to the web application status.
[0097] Furthermore, when the web application state is unlocked, it is necessary to control the web application to perform a timeout process. The timeout process has been described in detail in the previous embodiment and will not be described separately here.
[0098] Optionally, when the first time difference is less than the time threshold, it means that the current operation is performed by the user himself, and there is no need to further obtain the web application state, and only the last operation time of the web application is updated according to the first current time.
[0099] Optionally, since the user may not operate for a long time, in order to further ensure the safety of the web application, a regular inspection process is added. The specific steps of the process are:
[0100] When the web application state is used to indicate that the web application is not locked, obtaining a second current time according to a preset time interval;
[0101] Acquire a second time difference according to the second current time and the last operation time;
[0102] If the second time difference is greater than or equal to the time difference threshold, the timeout processing flow is executed.
[0103] Furthermore, the preset time interval can be set according to user selection, and the setting steps are:
[0104] A time setting instruction is obtained, where the time setting instruction is used to indicate a preset time interval, and the preset time interval is stored.
[0105] S203: When the first time difference is greater than or equal to a time difference threshold, and the web application state is used to indicate that the web application is locked, control the state processor to update the last operation time according to the first current time.
[0106] In this step, when it is determined that the first time difference is greater than or equal to the time difference threshold, the web application state is further obtained.
[0107] Specifically, when the web application status is locked, it means that the user needs to go through a verification and unlock before using the web application normally. The verification can be changed to determine whether the operation is performed by the user himself. Therefore, in order to ensure the user experience, there is no need to control the web application to execute timeout processing. It is only necessary to update the last operation time according to the first current time.
[0108] For example, the first current time is 18:30, the last operation time is 18:00, the web application state is unlocked, and the time difference threshold is 23 minutes. The first time difference is 30 minutes, the first time difference of 30 minutes is greater than the time difference threshold of 23 minutes, and the web application state is unlocked, then the web application is controlled to perform timeout processing.
[0109] The present application provides a web application control method, when the first time difference is greater than or equal to the time difference threshold, according to whether the web application indicated by the web application state is locked, it is determined whether to execute the timeout processing flow or only update the last operation time with the first current time. Through the above method, when the interval between two user operations is long, a layer of protection is added before the normal use of the web application to ensure the safety of the user's use of the web application.
[0110] Figure 3 A schematic diagram of a web application control method provided in an embodiment of the present application Figure 3 This embodiment describes in detail the operation steps of other management rules of web applications. Figure 3 As shown, the method includes:
[0111] S301. Obtain a behavior control instruction, where the behavior control instruction is used to instruct to enable or disable a preset behavior managed by the behavior controller.
[0112] In this step, since different web applications may have different preset operations for users to start different functions, the preset behaviors managed by the behavior controller cannot be immutable and need to be adjusted according to the actual user situation or the type of web application.
[0113] Furthermore, the control instructions may be designed by the developer of the web application, and the corresponding control instructions may be set according to the possible operations of the user of different functions of the web application, and the web application may be controlled to manage the preset behaviors managed by the behavior controller according to one or more control instructions.
[0114] Similarly, in order to facilitate user operation, control instructions also come from users. Users set control instructions according to their own usage habits, and then control the web application to manage the preset behaviors managed by the behavior controller according to the control instructions.
[0115] S302. According to the control instruction, each preset behavior and its corresponding enable or disable flag are stored in association, wherein the behavior supervisor is used to monitor the enabled preset behavior.
[0116] In this step, the web application developer creates multiple event listeners according to the user's possible preset operations. The event listeners correspond to the preset operations one by one, and the event listeners are stored in the behavior controller. At the same time, in order to facilitate the management of event listeners, that is, to manage preset operations, multiple flags are set in the behavior controller. The flag is used to enable or disable the event listener, that is, the flag is used to enable or disable the preset operation, and each preset behavior and its corresponding enable or disable flag are associated and stored according to the corresponding relationship.
[0117] Furthermore, the identifier may be a user operation or a function of a web application triggered by a user operation. This embodiment does not impose any limitation on the specific type of the identifier, which may be selected according to actual conditions.
[0118] Specifically, when an identifier is detected, a corresponding control instruction is obtained according to information corresponding to the identifier, and a corresponding preset behavior managed in the behavior controller is enabled or disabled according to the control instruction.
[0119] Optionally, when the user is using some time-consuming functions in the web application, such as reading instructions, watching explanation videos, etc., if the timeout processing flow is determined or the timed check processing flow is performed according to the above method, the user's use will be interrupted and the user's experience will be affected. Therefore, this embodiment also determines whether to execute the locking process and the passive update process according to the business logic triggered by the user operation monitored by the behavior supervisor.
[0120] Specifically, the detailed steps of the locking process are:
[0121] Obtaining a locking instruction, wherein the locking instruction is used to instruct to enable or disable locking of the web application;
[0122] According to the locking instruction, the web application state stored in the state controller is changed.
[0123] Furthermore, the detailed steps of the passive update process are:
[0124] When it is detected that a specific service logic is triggered, a passive update instruction is obtained, where the passive update instruction is used to indicate the last operation time stored in the state memory to be updated;
[0125] A third current time is obtained, and the state processor is controlled to update the last operation time according to the third current time.
[0126] The present application provides a web application control method, which determines whether to execute other web application rules according to the business logic type of the user operation monitored by the behavior supervisor. Through the above method, a unified web application management rule based on user operation is established, making it more convenient for users to use web applications and improving the user experience.
[0127] Figure 4 A schematic diagram of a web application management rule provided in an embodiment of the present application. Figure 4 As shown, the web application management rules include: timeout processing determination process, locking process, passive update process, regular inspection process and modification behavior control process.
[0128] Specifically, the timeout processing determination process is used to determine whether to control the web application to execute the timeout processing process according to the first time difference and the web application state. In combination with the timed check process, when no user operation is detected and the web application is not locked, the web application is controlled to intermittently determine whether the second time difference is greater than the time threshold, and determine whether to execute the timeout processing process according to the determination result, thereby further protecting the use security of the web application.
[0129] Further, according to the business logic to which the behavior supervisor monitors the user operation, it is determined whether to close or enable the lock of the web application through the lock process, and whether to update the last operation time with the third current time.
[0130] Optionally, the user may also adjust the preset behavior of enabling or disabling the behavior controller by modifying the behavior control process according to the functions and properties of the web application.
[0131] Figure 5 A schematic diagram of the structure of a web application control device provided in an embodiment of the present application. Figure 5As shown, the control device includes: a judgment module 501, an acquisition module 502 and a control module 503, wherein:
[0132] The judgment module 501 is used to obtain a first current time and a parameter of a state controller when the behavior monitor detects that the user operates the web application through a preset behavior, wherein the preset behavior is a behavior pre-set by the behavior controller, and the parameters of the state controller include: a web application state and a last operation time of the web application, and the web application state is used to indicate whether the web application is locked;
[0133] The acquisition module 502 acquires a first time difference between the first current time and the last operation time;
[0134] The control module 503 is used to determine whether to execute a timeout processing flow according to the first time difference and the web application state.
[0135] In a possible implementation manner, the determining module 501 is further configured to:
[0136] When the first time difference is greater than or equal to a time difference threshold, and the web application state is used to indicate that the web application is not locked, determining to execute a timeout processing flow;
[0137] When the first time difference is greater than or equal to a time difference threshold, and the web application state is used to indicate that the web application is locked, the state processor is controlled to update the last operation time according to the first current time.
[0138] In a possible implementation manner, the control module 503 is further configured to:
[0139] When the web application state is used to indicate that the web application is not locked, obtaining a second current time according to a preset time interval;
[0140] Acquire a second time difference according to the second current time and the last operation time;
[0141] If the second time difference is greater than or equal to the time difference threshold, the timeout processing flow is executed.
[0142] In a possible implementation manner, the control module 503 is further configured to:
[0143] Obtaining a behavior control instruction, wherein the behavior control instruction is used to instruct to enable or disable a preset behavior managed by the behavior controller;
[0144] According to the control instruction, each preset behavior and its corresponding enable or disable flag are stored in association, wherein the behavior supervisor is used to monitor the enabled preset behavior.
[0145] In a possible implementation manner, the control module 503 is further configured to:
[0146] Obtaining a locking instruction, wherein the locking instruction is used to instruct to enable or disable locking of the web application;
[0147] According to the locking instruction, the web application state stored in the state controller is changed.
[0148] In a possible implementation manner, the control module 503 is further configured to:
[0149] Obtaining a passive update instruction, wherein the passive update instruction is used to indicate the last operation time of updating the state memory storage;
[0150] A third current time is obtained, and the state processor is controlled to update the last operation time according to the third current time.
[0151] In a possible implementation manner, the control module 503 is further configured to:
[0152] Obtaining a time setting instruction, wherein the time setting instruction is used to indicate a preset time interval;
[0153] The preset time interval is stored.
[0154] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the device 60 includes: at least one processor 601 and a memory 602, wherein:
[0155] The memory 602 is used to store computer-executable instructions;
[0156] The at least one processor 601 is used to execute the computer-executable instructions stored in the memory 602, so that the at least one processor 601 executes any of the web application control methods described above.
[0157] Among them, at least one processor 601 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0158] Optionally, in a specific implementation, the processor 601 and the memory 602 are implemented independently, and the processor 601 and the memory 602 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0159] Optionally, in a specific implementation, if the processor 601 and the memory 602 are integrated on a chip, the processor 601 and the memory 602 can communicate through an internal interface.
[0160] The present application also provides a computer storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the technical solution of the aforementioned web application control method is implemented.
[0161] The computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The computer-readable storage medium may be any available medium that can be accessed by a general or special purpose computer.
[0162] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the control device of the clothing processing device.
[0163] The division of the units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.
[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0166] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0167] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0168] So far, the technical solution of the present application has been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments, and the above embodiments are only used to illustrate the technical solution of the present application rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A web application control method, characterized in that: The method comprises: When the behavior supervisor detects that the user operates the web application through a preset behavior, a first current time and a parameter of a state controller are obtained, wherein the preset behavior is a behavior preset by the behavior controller, and the parameters of the state controller include: a web application state and a last operation time of the web application, and the web application state is used to indicate whether the web application is locked; Obtain a first time difference between the first current time and the last operation time; Determine whether to execute a timeout processing flow according to the first time difference and the web application state.
2. The method according to claim 1, characterized in that The determining whether to execute a timeout processing flow according to the first time difference and the web application state includes: When the first time difference is greater than or equal to a time difference threshold, and the web application state is used to indicate that the web application is not locked, determining to execute a timeout processing flow; When the first time difference is greater than or equal to a time difference threshold, and the web application state is used to indicate that the web application is locked, the state processor is controlled to update the last operation time according to the first current time.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: When the web application state is used to indicate that the web application is not locked, obtaining a second current time according to a preset time interval; Acquire a second time difference according to the second current time and the last operation time; If the second time difference is greater than or equal to the time difference threshold, the timeout processing flow is executed.
4. The method according to claim 1, characterized in that: Before obtaining the first current time and the parameters of the state controller, the method further includes: Obtaining a behavior control instruction, wherein the behavior control instruction is used to instruct to enable or disable a preset behavior managed by the behavior controller; According to the control instruction, each preset behavior and its corresponding enable or disable flag are stored in association, wherein the behavior supervisor is used to monitor the enabled preset behavior.
5. The method according to claim 1, characterized in that Before obtaining the first current time and the parameters of the state controller, the method further includes: Obtaining a locking instruction, wherein the locking instruction is used to instruct to enable or disable locking of the web application; According to the locking instruction, the web application state stored in the state controller is changed.
6. The method according to claim 3, characterized in that The method further comprises: Obtaining a passive update instruction, wherein the passive update instruction is used to indicate the last operation time of updating the state memory storage; A third current time is obtained, and the state processor is controlled to update the last operation time according to the third current time.
7. The method according to claim 3, characterized in that Before obtaining the second current time according to the preset time interval, the method further includes: Obtaining a time setting instruction, wherein the time setting instruction is used to indicate a preset time interval; The preset time interval is stored.
8. A web application control device, characterized in that: include: Judgment module, acquisition module and control module, where: The judgment module is used to obtain a first current time and a parameter of a state controller when the behavior supervisor detects that the user operates the web application through a preset behavior, wherein the preset behavior is a behavior preset by the behavior controller, and the parameters of the state controller include: a web application state and a last operation time of the web application, and the web application state is used to indicate whether the web application is locked; The acquisition module acquires a first time difference between the first current time and the last operation time; The control module is used to determine whether to execute a timeout processing flow according to the first time difference and the web application state.
9. An electronic device, characterized in that: include: at least one processor and memory, wherein: The memory is used to store computer-executable instructions; The at least one processor is configured to execute the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
