CN107835454B - WebApp-based timeout processing method and device and storage medium - Google Patents

WebApp-based timeout processing method and device and storage medium Download PDF

Info

Publication number
CN107835454B
CN107835454B CN201711069391.2A CN201711069391A CN107835454B CN 107835454 B CN107835454 B CN 107835454B CN 201711069391 A CN201711069391 A CN 201711069391A CN 107835454 B CN107835454 B CN 107835454B
Authority
CN
China
Prior art keywords
webapp
timeout
time point
detected
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711069391.2A
Other languages
Chinese (zh)
Other versions
CN107835454A (en
Inventor
黑建业
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Electric 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 Hisense Electric Co Ltd filed Critical Hisense Electric Co Ltd
Priority to CN201711069391.2A priority Critical patent/CN107835454B/en
Publication of CN107835454A publication Critical patent/CN107835454A/en
Application granted granted Critical
Publication of CN107835454B publication Critical patent/CN107835454B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4782Web browsing, e.g. WebTV
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video or multiplex stream to a specific local network, e.g. a IEEE 1394 or Bluetooth® network
    • H04N21/43637Adapting the video or multiplex stream to a specific local network, e.g. a IEEE 1394 or Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/835Generation of protective data, e.g. certificates
    • H04N21/8355Generation of protective data, e.g. certificates involving usage data, e.g. number of copies or viewings allowed
    • H04N21/83555Generation of protective data, e.g. certificates involving usage data, e.g. number of copies or viewings allowed using a structured language for describing usage rules of the content, e.g. REL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8543Content authoring using a description language, e.g. Multimedia and Hypermedia information coding Expert Group [MHEG], eXtensible Markup Language [XML]

Abstract

The invention discloses a timeout processing method and device based on webpage application and a storage medium, and belongs to the technical field of terminals. The method comprises the following steps: when an overtime invalidation command is detected in the process of running the WebApp, acquiring a first time point of JS invalidation for accessing the WebApp; when an overtime recovery instruction is detected, acquiring a second time point of normal execution of the JS; further, under the condition that the difference value between the second time point and the first time point is larger than a preset overtime threshold, the WebApp is closed; otherwise, the WebApp is re-timed. Therefore, the mobile terminal can automatically quit the WebApp under the condition that the user does not interactively operate the WebApp for a long time, so that the binding between the WebApp and the screen saver application is released, and the resource occupation of the mobile terminal and the intelligent television is reduced.

Description

WebApp-based timeout processing method and device and storage medium
Technical Field
The invention relates to the technical field of terminals, in particular to a timeout processing method and device based on WebApp and a computer readable storage medium.
Background
At present, a file transmission function can be realized between a mobile terminal and an intelligent television.
For example: fig. 1 is an interface schematic diagram of a two-dimensional code corresponding to a screen saver application displayed on a smart television, and fig. 2 is an interface schematic diagram of the smart television waiting for uploading after the screen saver application and a WebApp are bound in the smart television. Referring to fig. 1 and 2, when the mobile terminal and the smart television are both android systems and are connected to the same local area network, a WebApp (web application) in the mobile terminal scans a two-dimensional code shown in fig. 1 to establish a connection between the WebApp and the smart television screen saver application, so that a picture file in the mobile terminal is uploaded to the smart television to be used as a startup picture or a screen saver picture of the smart television. Fig. 3 is a schematic interface diagram of the mobile terminal when the mobile terminal exits from the WebApp, and referring to fig. 3, in order to reduce resource occupation of the mobile terminal and the smart television, when the user does not perform an interactive operation for a long time, the mobile terminal automatically exits from the WebApp and sends a unbinding instruction to the smart television, so that the binding between the WebApp and the screen saver application is unbound, and the connection between the mobile terminal and the smart television is disconnected.
The WebApp in the mobile terminal is an application that runs in a browser and is developed through HTML (HyperText markup language). Due to the limited HTML standard, in order to implement multiple functions of web applications, most mobile terminals need to extend various JS (JavaScript, interpreted scripting language) extension interfaces in the HTML standard, and the WebApp can access various information in the mobile terminals through the JS extension interfaces, so that multiple functions are implemented. For example, a WebApp in the mobile terminal can call a picture in an album through a JS extension interface, so that the picture is uploaded to a screen saver application in the smart television through the WebApp.
However, during the time that the mobile terminal starts the timer for the user interaction, for example, if the user interaction triggers a warning dialog box, a confirmation dialog box or a prompt dialog box through the WebApp, these dialog boxes may block the WebApp, and due to the single-thread model of JS in the browser, the timeout exit logic based on the timer may suspend execution. For another example, if the user presses the HOME button for a long time to return to the desktop, or the mobile terminal is switched to the screen locking state when the mobile terminal is not operated for a long time, the WebApp is in the invisible state because the browser is switched to the background; in addition, due to the reason that the system is used for preventing resource waste, the JS does not need to be executed when the WebApp is in an invisible state; thereby also causing the timer-based timeout exit logic to halt execution.
Disclosure of Invention
In order to solve the problem that the overtime quit WebApp of a mobile terminal is invalid due to the fact that a timer-based overtime quit logic suspends execution due to the fact that JS characteristics or WebApp are invisible in the prior art, the embodiment of the invention provides an overtime processing method and device based on WebApp and a computer-readable storage medium. The technical scheme is as follows:
in a first aspect, a timeout processing method based on WebApp is provided, where the method includes:
when an overtime invalidation command is detected in the process of running the WebApp, acquiring a first time point of JS invalidation for accessing the WebApp;
when an overtime recovery instruction is detected, acquiring a second time point of normal execution of the JS;
wherein the timeout invalidation instruction and the timeout recovery instruction indicate a timer-based timeout exit logic invalidation and recovery, respectively;
judging whether the difference value of the second time point and the first time point is greater than a preset overtime threshold value or not;
if so, closing the WebApp; otherwise, the WebApp is re-timed.
In a second aspect, a timeout processing apparatus based on WebApp is provided, the apparatus including:
the system comprises a first acquisition module, a first processing module and a second acquisition module, wherein the first acquisition module is used for acquiring a first time point of JS invalidation for accessing the WebApp when an overtime invalidation command is detected in the process of running the WebApp; the timeout disable instruction indicates a timer-based timeout exit logic disable;
the second acquisition module is used for acquiring a second time point of normal execution of the JS when the overtime recovery instruction is detected; the timeout restore instruction indicates a timer-based timeout exit logic restore;
the judging module is used for judging whether the difference value between the second time point and the first time point is greater than a preset overtime threshold value or not;
the processing module is used for closing the WebApp if the WebApp is larger than the WebApp; otherwise, the WebApp is re-timed.
In a third aspect, a computer readable storage medium is provided, the storage medium having stored therein computer software instructions, which when executed by a processor, implement the method of the first aspect.
In a fourth aspect, a terminal device is provided that includes a memory and a processor;
the memory is used for storing a computer program;
the processor is adapted to execute the computer program to implement the method of the first aspect.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, when a timeout invalidation command is detected in the process of running the WebApp, a first time point of JS invalidation for accessing the WebApp is obtained; when the overtime recovery instruction is detected, acquiring a second time point of normal execution of the JS; wherein the timeout invalidation instruction and the timeout recovery instruction respectively indicate timeout exit logic invalidation and recovery based on a timer; further, under the condition that the difference value between the second time point and the first time point is larger than a preset overtime threshold, the WebApp is closed; otherwise, the WebApp is re-timed. The method includes the steps that a first time point of JS failure is directly obtained when overtime exit logic failure based on a timer occurs, a second time point of JS normal execution later occurs, and the WebApp is closed when the difference between the first time point and the second time point exceeds a preset value.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is an interface schematic diagram of a two-dimensional code corresponding to a screen saver application displayed on a smart television;
FIG. 2 is a schematic diagram of an interface of a smart television waiting for uploading after a screen saver application and a WebApp are bound in the smart television;
FIG. 3 is a schematic diagram of an interface when the mobile terminal exits WebApp;
fig. 4 is a flowchart of a timeout processing method based on WebApp according to an embodiment of the present invention;
FIG. 5 is a flowchart of an example one of a WebApp-based timeout handling method;
FIG. 6 is a flowchart of example two of a WebApp-based timeout processing method;
fig. 7 is a block diagram of a timeout processing apparatus based on WebApp according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 4 is a flowchart of a timeout processing method based on WebApp according to an embodiment of the present invention, and referring to fig. 4, the method is applied to a mobile terminal, and specifically includes the following steps.
Step 41: in the process of running the WebApp, when a timeout invalidation command is detected, a first time point of JS invalidation for accessing the WebApp is obtained.
Step 42: and when the overtime recovery instruction is detected, acquiring a second time point when the JS can be normally executed.
The WebApp in the mobile terminal runs based on the browser, and the mobile terminal expands various JS extension interfaces in the HTML standard, so that the WebApp can access various information in the mobile terminal through the JS extension interfaces. For example: in the process of running the instant messaging webpage application, the mobile terminal accesses the picture stored in the photo album of the mobile terminal by calling the JS extension interface, and then uploads the picture to the screen saver application of the smart television to be used as a starting picture or a screen saver picture of the smart television.
The JS mainly comprises a webpage scripting language, a file object model and a browser object model in the browser; the webpage scripting language realizes logic control of WebApp; the file object model defines an interface of interaction between a webpage scripting language and HTML, namely webpage components for interactive operation of a user, such as titles and buttons; the browser object model defines the interface of the web scripting language to operate the browser.
Preferably, during the operation of the WebApp and before the timeout invalidation instruction is detected, the method further includes: when detecting that a scene causing the timeout exit logic based on the timer fails, generating a timeout invalidation instruction, wherein the timeout invalidation instruction is used for indicating that the timeout exit logic based on the timer set for the WebApp fails, namely that JS used for accessing the WebApp is paused at the moment. Alternatively, the timeout disable instruction may be generated in the following two ways.
The first method is as follows:
a timeout invalidation instruction is generated when a triggering operation is received for a browser-level component, such as a warning dialog, a confirmation dialog, or a prompt dialog.
Specifically, if the user interaction triggers the display of the warning dialog box, the confirmation dialog box or the prompt dialog box, because these dialog boxes belong to browser-level components, and the browser-level components belong to a browser object model and do not belong to the web scripting language and HTML which can be logically controlled, the web scripting language suspends the execution, that is, the web scripting language corresponding to the timeout exit logic based on the timer set for the WebApp suspends the execution, and at this time, the user interaction is required to interrupt the display of these dialog boxes to continue to execute the web scripting language.
The second method comprises the following steps:
when the browser hosted by the WebApp is detected to be converted into the background due to the fact that the browser receives the switching instruction, or when the browser detects that the display screen of the terminal equipment is switched from the awakening state to the screen locking state, the WebApp is determined to be in the invisible state, and a timeout invalidation instruction is generated.
Specifically, if the user presses the HOME key for a long time to return to the desktop, or when different applications are switched, or the mobile terminal is switched to the screen locking state, the WebApp is in the invisible state because the hosted browser is switched to the background; because the web page scripting language is abnormally executed when the web page is in the invisible state, namely the web page scripting language corresponding to the overtime exit logic based on the timer set for the WebApp is temporarily stopped to be executed, the WebApp can be continuously executed only when the WebApp is switched to the visible state.
Preferably, before detecting the timeout resumption instruction, the method further comprises: when a scene of the timeout exit logic recovery based on the timer is detected to occur, a timeout recovery instruction is generated, and the timeout recovery instruction is used for indicating the timeout exit logic recovery based on the timer, which is set for the WebApp, namely that the JS used for accessing the WebApp is recovered from suspended execution to normal execution at the moment. Alternatively, the timeout restoration instruction may be generated in the following two ways.
The first method is as follows:
when an exit operation is received for a browser-level component such as the above-described warning dialog, confirmation dialog, or presentation dialog, a timeout restoration instruction is generated.
The second method comprises the following steps:
when the browser hosted by the WebApp is detected to be converted into the foreground due to the fact that the browser receives the switching instruction, or when the browser detects that the display screen of the terminal equipment is switched from the screen locking state to the awakening state, the WebApp is determined to be in the visible state, and the overtime recovery instruction is generated.
Step 43: and judging whether the difference value between the second time point and the first time point is greater than a preset overtime threshold value.
Step 44: if so, closing the WebApp; otherwise, the WebApp is re-timed.
After a first time point of JS failure for accessing the WebApp when the overtime failure instruction is detected and a second time point of normal execution of the JS when the overtime recovery instruction is detected are respectively obtained, determining a difference value between the second time point and the first time point; under the condition that the difference value is larger than a preset overtime threshold value, closing the WebApp to quit the WebApp; and when the difference value is not larger than the preset timeout threshold value, the WebApp is re-timed.
In the embodiment of the invention, when a timeout invalidation command is detected in the process of running the WebApp, a first time point of JS invalidation for accessing the WebApp is obtained; when the overtime recovery instruction is detected, acquiring a second time point of normal execution of the JS; wherein the timeout invalidation instruction and the timeout recovery instruction respectively indicate timeout exit logic invalidation and recovery based on a timer; further, under the condition that the difference value between the second time point and the first time point is larger than a preset overtime threshold, the WebApp is closed; otherwise, the WebApp is re-timed. Because the first time point of JS failure is directly obtained when the overtime exit logic failure based on the timer is performed, and the second time point of JS normal execution later is obtained, and the WebApp is closed when the difference between the first time point and the second time point exceeds the preset value, the mobile terminal can automatically exit the WebApp under the condition that a user does not interactively operate the WebApp for a long time, so that the binding between the WebApp and the screen saver application is released, and the resource occupation of the mobile terminal and the intelligent television is reduced.
Fig. 5 is a flowchart of an example one of a timeout processing method based on a WebApp, and referring to fig. 5, a mobile terminal and a smart television are connected to the same local area network, and a user scans a two-dimensional code shown in fig. 1 using the mobile terminal to establish a connection between the WebApp in the mobile terminal and a screen saver application in the smart television, so as to upload a picture stored in the mobile terminal to the smart television to be used as a startup picture or a screen saver picture of the smart television. The method specifically comprises the following steps:
step 51: the user interaction begins.
Step 52: and setting a preset overtime threshold value for the WebApp, and starting a timer to time.
In step 52, in the case of no interactive operation, if the timing time is greater than the preset timeout threshold, a timeout exit interface is displayed to close the WebApp. Before the WebApp is closed, if other interactive operations exist, the timer is reset to count the WebApp again.
Step 53: and judging whether a browser-level component shelters the WebApp. If so, step 54 is performed.
Step 54: recording a first point in time when the browser-level component is displayed.
Step 55: and judging whether to quit the components at the browser level. If so, step 56 is performed.
Step 56: recording a second point in time when the browser-level component is exited.
And 57: and judging whether the difference value between the second time point and the first time point is greater than a preset overtime threshold value. If yes, go to step 58; otherwise, step 59 is executed.
Step 58: and displaying a timeout exit interface.
Step 59: and setting the timer to zero, and timing the WebApp again.
And judging whether the user triggers a component for shielding the browser level of the WebApp in the interactive operation of the user. If the user pulls up the system-level dialog boxes such as the warning dialog box, the confirmation dialog box or the prompt dialog box, and the dialog boxes can shield the WebApp, the timing operation of the timer is terminated due to the single-thread model of the JS in the browser, and the WebApp cannot exit under the condition that the user does not have interactive operation for a long time. The JS will only resume normal execution if the user interaction causes these system level dialogs to exit, such as the user clicking on a confirm, cancel, or close alert dialog.
Therefore, the first time point displayed by the system-level dialog boxes and the second time point quitted are respectively recorded, and whether the difference value between the second time point and the first time point is larger than the preset timeout threshold value or not is judged. If so, displaying an overtime exit interface to exit the WebApp; the "difference between the second time point and the first time point is greater than the preset timeout threshold" may replace the judgment that "the time of the user for no interactive operation on the WebApp is greater than the preset timeout threshold", that is, the user automatically exits the WebApp under the condition of no interactive operation for a long time. If the preset time is not greater than the preset time, the timer is set to zero to count time for the WebApp again, namely, the user generates new interactive operation aiming at the WebApp, the timer is reset, and the WebApp does not need to be quitted.
It should be noted that, in the interaction operation of the user, if there is no component at the browser level to obscure the WebApp, the timer will continue to count time until reaching the preset timeout threshold, that is, the WebApp is closed.
Fig. 6 is a flowchart of an example two of a timeout processing method based on WebApp, and referring to fig. 6, the method specifically includes the following steps:
step 61: the user interaction begins.
Step 62: and setting a preset overtime threshold value for the WebApp, and starting a timer to time.
And step 63: and detecting whether the browser hosted by the WebApp is switched to run in a background. If so, go to step 64.
Step 64: and recording a first time point when the browser is switched to the background.
Step 65: and detecting whether the browser is switched to foreground operation or not. If so, step 66 is performed.
And step 66: and recording a second time point when the browser is switched to the foreground.
Step 67: and judging whether the difference value between the second time point and the first time point is greater than a preset overtime threshold value. If so, go to step 68; otherwise, step 69 is executed.
Step 68: and displaying a timeout exit interface.
Step 59: and resetting the remaining time of the timer based on the preset timeout threshold and the difference.
In the interactive operation of a user, whether a browser hosted by the WebApp is switched to be operated in a background is detected. If the user presses the HOME key for a long time to return to the desktop, or the user switches the browser application, the webpage script language corresponding to the timing operation of the timer is abnormally executed because the WebApp is in an invisible state, and the WebApp cannot exit under the condition that the user does not have interactive operation for a long time. At this time, the WebApp is converted into a visible state to continue executing the web scripting language by the interactive operation of the user.
Therefore, a first time point when the browser hosted by the WebApp is switched from the visible state to the invisible state and a second time point when the browser is switched from the invisible state to the visible state are respectively recorded, and whether the difference value between the second time point and the first time point is greater than a preset timeout threshold value is further judged. If so, displaying an overtime exit interface to exit the WebApp; the "difference between the second time point and the first time point is greater than the preset timeout threshold" may replace the judgment that "the time of the user for no interactive operation on the WebApp is greater than the preset timeout threshold", that is, the user automatically exits the WebApp under the condition of no interactive operation for a long time. If the residual time is not greater than the preset timeout threshold, resetting the residual time of the timer to be the difference between the preset timeout threshold and the difference according to the preset timeout threshold and the difference, so as to count the WebApp again, namely, the user generates new interactive operation aiming at the WebApp, the timer is reset, and the WebApp does not need to be quitted.
It should be noted that, the WebApp is in an invisible state, and the WebApp is in an invisible state due to the fact that the mobile terminal is switched from the wakeup state to the lock screen state. At this time, a first time point when the display screen of the mobile terminal is switched from the on screen to the off screen and a second time point when the display screen of the mobile terminal is switched from the off screen to the on screen can be recorded respectively, and then whether a difference value between the second time point and the first time point is greater than a preset timeout threshold value or not is judged. It should be noted that, a second time point when the above-mentioned WebApp switches from the invisible state to the visible state is recorded, and an event call back such as visibility of HTML5 can be used as a control timing.
Fig. 7 is a block diagram of a WebApp-based timeout processing device provided by an embodiment of the present invention, and referring to fig. 7, the device may be implemented by software, hardware, or a combination of the two. The apparatus comprises a first acquiring module 71, a second acquiring module 72, a judging module 73 and a processing module 74.
A first obtaining module 71, configured to, when a timeout invalidation instruction is detected in a process of running the WebApp, obtain a first time point of JS invalidation for accessing the WebApp; the timeout indication indicates a timer-based timeout exit logic failure;
a second obtaining module 72, configured to, when the timeout recovery instruction is detected, obtain a second time point of normal execution of the JS; the timeout restore instruction indicates a timer-based timeout exit logic restore;
the judging module 73 is configured to judge whether a difference between the second time point and the first time point is greater than a preset timeout threshold;
a processing module 74, configured to close the WebApp if the WebApp is greater than the WebApp; otherwise, the WebApp is re-timed.
Preferably, the apparatus may further comprise:
the generating module 75 is configured to generate the timeout invalidation instruction when a trigger operation for a browser-level component is received or when it is detected that the WebApp is in an invisible state. Further, the generating module 75 is specifically configured to determine that the WebApp is in the invisible state when it is detected that the browser hosted by the WebApp is changed to the background, or when it is detected that the display screen of the mobile terminal is switched from the wakeup state to the screen lock state, and further generate the timeout invalidation instruction.
The generating module 75 is further configured to generate the timeout resuming instruction when a quit operation for the browser-level component is received, or when it is detected that the WebApp is switched from the invisible state to the visible state.
It should be noted that: in the timeout processing device based on the WebApp provided in the above embodiment, when performing timeout processing, only the division of the above functional modules is used for illustration, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the timeout processing device based on the WebApp provided in the above embodiment and the timeout processing method based on the WebApp provided in the above embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
The present invention also provides a mobile terminal comprising a memory for storing a computer program, a processor for executing the computer program to implement the methods shown in fig. 4-6, further comprising power components, multimedia components, audio components, input/output (I/O) interfaces, sensor components, and communication components, etc.
The present invention also provides a computer readable storage medium having stored therein computer software instructions that, when executed by a processor, implement the method illustrated in fig. 4-6.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A timeout processing method based on WebApp is characterized by comprising the following steps:
when an overtime invalidation command is detected in the process of running the WebApp, acquiring a first time point for indicating that a webpage scripting language corresponding to a timer-based overtime exit logic set for the WebApp is invalidated;
when an overtime recovery instruction is detected, acquiring a second time point of normal execution of the webpage scripting language;
wherein the timeout invalidation instruction and the timeout recovery instruction indicate a timer-based timeout exit logic invalidation and recovery, respectively;
judging whether the difference value of the second time point and the first time point is greater than a preset overtime threshold value or not;
if so, closing the WebApp; otherwise, the WebApp is re-timed.
2. The method of claim 1, wherein prior to the detecting the timeout failing instruction, the method further comprises:
when trigger operation aiming at components at the browser level is received, or when the WebApp is detected to be in an invisible state, generating the overtime invalidation instruction;
before the detecting a timeout resume instruction, the method further comprises:
the timeout recovery instruction is generated when an exit operation for a browser-level component is received or when it is detected that the WebApp is switched from an invisible state to a visible state.
3. The method of claim 2, wherein the detecting that the WebApp is in an invisible state specifically comprises:
and when the browser hosted by the WebApp is detected to be converted into the background, or when the display screen of the mobile terminal is detected to be switched from the awakening state to the screen locking state, determining that the WebApp is in the invisible state.
4. The method of claim 2, wherein the obtaining a first time point for indicating that a web scripting language corresponding to the timer-based timeout exit logic set for the WebApp is invalid specifically comprises:
recording a first point in time when the browser-level component is displayed;
the obtaining of the second time point when the web page scripting language is normally executed specifically includes:
recording a second point in time when the browser-level component is exited.
5. The method of claim 2, wherein the obtaining a first time point for indicating that a web scripting language corresponding to the timer-based timeout exit logic set for the WebApp is invalid specifically comprises:
recording a first time point when the WebApp is switched from a visible state to an invisible state;
the obtaining of the second time point when the web page scripting language is normally executed specifically includes:
and recording a second time point when the WebApp is switched from the invisible state to the visible state.
6. The method of claim 1 or 2, wherein the retiming for the WebApp comprises:
setting the timer to zero and timing again;
or setting the remaining time of the timer based on the preset timeout threshold and the difference.
7. A timeout processing apparatus based on WebApp, the apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a first time point for indicating that a webpage scripting language corresponding to a timeout exit logic based on a timer, which is set for the WebApp, is invalid when a timeout invalidation instruction is detected in the process of running the WebApp; the timeout disable instruction indicates a timer-based timeout exit logic disable;
the second acquisition module is used for acquiring a second time point of normal execution of the webpage scripting language when the overtime recovery instruction is detected; the timeout restore instruction indicates a timer-based timeout exit logic restore;
the judging module is used for judging whether the difference value between the second time point and the first time point is greater than a preset overtime threshold value or not;
the processing module is used for closing the WebApp if the WebApp is larger than the WebApp; otherwise, the WebApp is re-timed.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the generating module is used for generating the overtime failure instruction when receiving triggering operation aiming at components at a browser level or detecting that the WebApp is in an invisible state; the timeout recovery instruction is generated when an exit operation for a browser-level component is received or when it is detected that the WebApp is switched from an invisible state to a visible state.
9. The apparatus of claim 8, wherein the generation module is specifically configured to:
and when the browser hosted by the WebApp is detected to be converted into the background, or when the display screen of the mobile terminal is detected to be switched from the awakening state to the screen locking state, determining that the WebApp is in the invisible state, and further generating the overtime invalidation instruction.
10. A computer readable storage medium having stored therein computer software instructions that, when executed, cause a computer to perform the method for WebApp-based timeout processing of any one of claims 1 to 6.
CN201711069391.2A 2017-11-03 2017-11-03 WebApp-based timeout processing method and device and storage medium Active CN107835454B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711069391.2A CN107835454B (en) 2017-11-03 2017-11-03 WebApp-based timeout processing method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711069391.2A CN107835454B (en) 2017-11-03 2017-11-03 WebApp-based timeout processing method and device and storage medium

Publications (2)

Publication Number Publication Date
CN107835454A CN107835454A (en) 2018-03-23
CN107835454B true CN107835454B (en) 2020-04-17

Family

ID=61653621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711069391.2A Active CN107835454B (en) 2017-11-03 2017-11-03 WebApp-based timeout processing method and device and storage medium

Country Status (1)

Country Link
CN (1) CN107835454B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110166563A (en) * 2019-05-27 2019-08-23 杭州迪普科技股份有限公司 A kind of page login-timeout method for updating time and device
CN110418187A (en) * 2019-07-30 2019-11-05 四川虹魔方网络科技有限公司 A kind of interactive screen protection system based on two dimensional code
CN112188177A (en) * 2020-09-29 2021-01-05 深圳市鼎盛光电有限公司 Screen-splash prevention method, terminal device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1787497A (en) * 2004-12-08 2006-06-14 微软公司 Verifying and maintaining connection liveliness in a reliable messaging for web services environment
CN102668549A (en) * 2009-11-16 2012-09-12 瑞典爱立信有限公司 Method, apparatus and computer program product for standby handling in a streaming media receiver
CN107239311A (en) * 2017-06-08 2017-10-10 迈普通信技术股份有限公司 Using deployment method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8126992B2 (en) * 2005-10-27 2012-02-28 International Business Machines Corporation Method and system for optimally scheduling a web conference managed by a web application

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1787497A (en) * 2004-12-08 2006-06-14 微软公司 Verifying and maintaining connection liveliness in a reliable messaging for web services environment
CN102668549A (en) * 2009-11-16 2012-09-12 瑞典爱立信有限公司 Method, apparatus and computer program product for standby handling in a streaming media receiver
CN107239311A (en) * 2017-06-08 2017-10-10 迈普通信技术股份有限公司 Using deployment method and device

Also Published As

Publication number Publication date
CN107835454A (en) 2018-03-23

Similar Documents

Publication Publication Date Title
KR102179149B1 (en) Page component dynamic layout
CN107835454B (en) WebApp-based timeout processing method and device and storage medium
CN110620959B (en) Data processing method, device, electronic equipment, system and storage medium
US20140222947A1 (en) Method and apparatus for browsings webpages, and storage medium
US9817484B2 (en) Method for capturing screen content of mobile terminal and device thereof
US11132123B2 (en) Key display method, terminal, and non-transitory computer-readable medium
US20220385953A1 (en) Video stream playing control method and apparatus, and storage medium
KR20230133970A (en) Photography methods, devices and electronics
CN113992615B (en) Method and device for displaying withdrawal message, electronic equipment and storage medium
EP2362306A1 (en) Method and server for widget communication
WO2017181966A1 (en) Method and device for accessing interactive internet protocol television service, and storage medium
CN108509228B (en) Page loading method, terminal equipment and computer readable storage medium
CN109104629B (en) Method and browser for being compatible with IPTV page and public network page
CN111966508A (en) Message batch sending method and device, computer equipment and storage medium
CN113312263B (en) Anomaly monitoring method and device
CN115220847A (en) Switching method of mobile application theme, mobile application system, equipment and medium
CN110659082A (en) Application program interface display method and device, terminal and storage medium
CN108304169B (en) Implementation method, device and equipment for HTML5 application
CN115955557A (en) Kadun analysis method and device thereof
CN109309874A (en) A kind of focus update method and device
CN113141530B (en) Remote control interaction based method and device, electronic equipment and storage medium
CN114546775A (en) Web monitoring method, device, equipment and medium based on client application
CN108664253B (en) Application replacement method and device, storage medium and electronic equipment
CN116643870B (en) Method, system and device for processing long-time task distribution and readable storage medium
CN116204336B (en) User state core state synchronization method and system based on registry callback mechanism

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266100 No. 151, Zhuzhou Road, Laoshan District, Shandong, Qingdao

Patentee after: Hisense Video Technology Co.,Ltd.

Address before: 266100 No. 151, Zhuzhou Road, Laoshan District, Shandong, Qingdao

Patentee before: HISENSE ELECTRIC Co.,Ltd.