CN107835454A - Timeout treatment method, apparatus and storage medium based on WebApp - Google Patents

Timeout treatment method, apparatus and storage medium based on WebApp Download PDF

Info

Publication number
CN107835454A
CN107835454A CN201711069391.2A CN201711069391A CN107835454A CN 107835454 A CN107835454 A CN 107835454A CN 201711069391 A CN201711069391 A CN 201711069391A CN 107835454 A CN107835454 A CN 107835454A
Authority
CN
China
Prior art keywords
webapp
time point
time
timeout
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.)
Granted
Application number
CN201711069391.2A
Other languages
Chinese (zh)
Other versions
CN107835454B (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
Qingdao Hisense Electronics 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 Qingdao Hisense Electronics Co Ltd filed Critical Qingdao Hisense Electronics 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

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 stream to a specific local network, e.g. a Bluetooth® network
    • H04N21/43637Adapting the video stream to a specific local network, e.g. a 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Software Systems (AREA)
  • Telephone Function (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of timeout treatment method, apparatus and storage medium based on web application, belong to field of terminal technology.This method includes:When detecting time-out failure instruction during running WebApp, the first time point that the JS for accessing the WebApp fails is obtained;When detecting timeout recovery instruction, the second time point that the JS is normally performed is obtained;And then in the case where the difference of the second time point and first time point is more than default timeout threshold, close the WebApp;Otherwise, it is the WebApp reclockings.So still can be in the case where user operate to WebApp long-times no interactions, mobile terminal can automatically exit from WebApp, so as to release the binding between WebApp and screen protection application, to reduce the resource occupation of mobile terminal and intelligent television.

Description

Timeout treatment method, apparatus and storage medium based on WebApp
Technical field
The present invention relates to field of terminal technology, more particularly to a kind of timeout treatment method, apparatus and meter based on WebApp Calculation machine readable storage medium storing program for executing.
Background technology
At present, file transmitting function can be realized between mobile terminal and intelligent television.
Such as:Fig. 1 is the interface schematic diagram of Quick Response Code corresponding to the screen protection application shown on intelligent television, and Fig. 2 is intelligence Screen protection is using interface schematic diagrams to be uploaded such as intelligent televisions after being bound between WebApp in TV.Referring to Fig. 1 and Fig. 2, when Mobile terminal and intelligent television are all Android systems, and both are when connecting into same LAN, the WebApp in mobile terminal(Net Page application)By the Quick Response Code shown in scanning figure 1, to establish the connection between the WebApp and intelligent television screen protection application, from And the picture file in mobile terminal is uploaded to intelligent television, made using the start up graphic as intelligent television or screen protection picture With.Fig. 3 is interface schematic diagram when mobile terminal exits WebApp, referring to Fig. 3, in order to reduce mobile terminal and intelligent television Resource occupation, in the case that user's long-time no interactions operate, mobile terminal automatically exits from WebApp, and is sent out to intelligent television Unbinding instruction is sent, so as to release the binding between WebApp and screen protection application, is disconnected between mobile terminal and intelligent television Connection.
WebApp in above-mentioned mobile terminal refers to operation in a browser, and passes through HTML(HyperText Markup Language, HTML)Come the application developed.Because HTML standard compares limitation, in order to realize web application Multi-functional, most of mobile terminal needs to expand various JS in HTML standard(JavaScript, formula script language of literal translating Speech)Expansion interface, WebApp can access the various information in mobile terminal by JS expansion interfaces, so as to realize a variety of work( Energy.For example, the WebApp in mobile terminal can call the picture in photograph album by JS expansion interfaces, so as to which picture is passed through into this WebApp is uploaded to the screen protection application in intelligent television.
But mobile terminal start timer for above-mentioned user interactive timing course in, if for example, with When the interactive operation at family triggers the warning dialog box, confirms dialog box or prompted dialog frame by WebApp, these dialog box meetings WebApp, and the single-threaded model due to JS in a browser are blocked, it is temporary so as to cause the time-out based on timer to exit logic Stop performing.For another example, if user long-press HOME buttons return to desktop, or, mobile terminal switchs to when not operating for a long time Screen lock state, then WebApp can be switched to due to browser backstage and be in invisible mode;Again because system is to prevent that resource is unrestrained Take reason so that JS need not perform when WebApp is in invisible mode;So as to also cause the time-out based on timer to be moved back Go out logic pause to perform.
The content of the invention
In order to solve the time-out based on timer present in correlation technique exit logic due to JS self characters or WebApp switchs to invisible and suspends and perform, and causes mobile terminal time-out to exit the problem of WebApp fails, the embodiment of the present invention Provide a kind of timeout treatment method, apparatus and computer-readable recording medium based on WebApp.The technical scheme is as follows:
First aspect, there is provided a kind of timeout treatment method based on WebApp, methods described include:
When detecting time-out failure instruction during running WebApp, obtain the JS for accessing the WebApp and fail First time point;
When detecting timeout recovery instruction, the second time point that the JS is normally performed is obtained;
Wherein, the time-out failure instruction and timeout recovery instruction indicate respectively that the time-out based on timer exits logic mistake Effect and recovery;
Judge whether second time point and the difference of the first time point are more than default timeout threshold;
If being more than, the WebApp is closed;Otherwise, it is the WebApp reclockings.
Second aspect, there is provided a kind of timeout treatment device based on WebApp, described device include:
First acquisition module, for when detecting time-out failure instruction during running WebApp, obtaining for accessing The first time point of the JS failures of the WebApp;The time-out of the time-out failure instruction instruction based on timer exits logic mistake Effect;
Second acquisition module, for when detecting timeout recovery instruction, obtaining the second time point that the JS is normally performed;Institute State time-out of the timeout recovery instruction instruction based on timer and exit logic recovery;
Judge module, whether the difference for judging second time point and the first time point, which is more than, is preset overtime threshold Value;
Processing module, if for being more than, close the WebApp;Otherwise, it is the WebApp reclockings.
The third aspect, there is provided a kind of computer-readable recording medium, the storage medium internal memory contain computer software Instruction, the computer software instructions realize the method described in above-mentioned first aspect when being executed by processor.
Fourth aspect, there is provided a kind of terminal device, including memory and processor;
The memory is used to store computer program;
The processor is used to perform the computer program to realize the method described in above-mentioned first aspect.
The beneficial effect that technical scheme provided in an embodiment of the present invention is brought is:
In embodiments of the present invention, when detecting time-out failure instruction during running WebApp, obtain for accessing The first time point of the JS failures of the WebApp;When detecting timeout recovery instruction, obtain that the JS is normally performed second when Between point;Wherein, above-mentioned time-out failure instruction and the instruction of above-mentioned timeout recovery indicate respectively that the time-out based on timer exits logic Failure and recovery;And then in the case where the difference of the second time point and first time point is more than default timeout threshold, closing should WebApp;Otherwise, it is the WebApp reclockings.Due to directly obtaining JS when the time-out based on timer exits logic failure The first time point of failure, and then second time points of JS when can normally perform, and in first time point and the second time The difference of point closes WebApp, the feelings that still can be so operated in user to WebApp long-times no interactions when exceeding preset value Under condition, mobile terminal can automatically exit from WebApp, and send unbinding instruction to intelligent television, so as to release WebApp with Binding between screen protection application, to reduce the resource occupation of mobile terminal and intelligent television.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is the interface schematic diagram of Quick Response Code corresponding to the screen protection application shown on intelligent television;
Fig. 2 be in intelligent television screen protection apply bound between WebApp after the interface schematic diagram to be uploaded such as intelligent television;
Fig. 3 is interface schematic diagram when mobile terminal exits WebApp;
Fig. 4 is a kind of flow chart of timeout treatment method based on WebApp provided in an embodiment of the present invention;
Fig. 5 is a kind of flow chart of the example one of the timeout treatment method based on WebApp;
Fig. 6 is a kind of flow chart of the example two of the timeout treatment method based on WebApp;
Fig. 7 is a kind of block diagram of timeout treatment device based on WebApp provided in an embodiment of the present invention.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention Formula is described in further detail.
Fig. 4 is a kind of flow chart of timeout treatment method based on WebApp provided in an embodiment of the present invention, referring to Fig. 4, This method is applied in mobile terminal, specifically comprises the following steps.
Step 41:During WebApp is run, when detecting time-out failure instruction, obtain for accessing this The first time point of WebApp JS failures.
Step 42:When detecting timeout recovery instruction, the second time point when above-mentioned JS can be performed normally is obtained.
WebApp in mobile terminal is based on browser execution, and mobile terminal expands various JS in HTML standard and expanded Interface is opened up, so as to realize that WebApp passes through the various information in JS expansion interfaces access mobile terminal.Such as:Mobile terminal is being transported During row instant messaging web application, by calling JS expansion interfaces to access the picture stored in mobile terminal photograph album, enter And be uploaded in the screen protection application of intelligent television, using the start up graphic as intelligent television or screen protection picture.
Wherein, JS is mainly made up of page script language, document dbject model and browser object model in a browser; Page script language realizes WebApp logic control;What document dbject model defined that page script language interacts with HTML connects Mouth, namely user interact the web pages component of operation, such as title, button;Browser object model definition page script The interface of language manipulation browser.
Preferably, during WebApp is run, and before time-out failure instruction is detected, this method also includes: When detecting that the scene for causing the time-out based on timer to exit logic failure occurs, time-out failure instruction, the time-out are generated Failure instruction exits logic failure to the time-out based on timer that the WebApp is set for indicator, namely is now used to visit Ask that the JS pauses of the WebApp perform.Optionally, time-out failure instruction can be generated according to following two ways.
Mode one:
When receive for the warning dialog box, confirm the other component of the browser level such as dialog box or prompted dialog frame trigger action When, generate time-out failure instruction.
Specifically, if user interactive triggers the warning dialog box, confirms the display of dialog box or prompted dialog frame, Because these dialog boxes belong to the other component of browser level, and the other component of browser level belongs to browser object model, does not belong to In the page script language and HTML that can be logically controlled, then page script language then suspends execution, also as WebApp The time-out based on timer set exits page script language pause corresponding to logic and performed, and now needs the interaction behaviour of user Make just continue executing with above-mentioned page script language to interrupt the display of these dialog boxes.
Mode two:
When detecting browser that WebApp lives away from home due to receiving switching command and when switching to backstage, or, when detecting terminal When the display screen of equipment switches to screen lock state by wake-up states, determine that the WebApp is in invisible mode, generate time-out and lose Effect instruction.
Specifically, if user long-press HOME buttons are returned when being switched between desktop, or, different application, or, move Terminal switchs to screen lock state, then WebApp can be switched to backstage due to the browser lived away from home and be in invisible mode;Due to webpage Script abnormal execution when webpage is in invisible mode, the time-out based on timer that also as WebApp is set are moved back Go out page script language pause corresponding to logic to perform, above-mentioned net can just be continued executing with by now needing WebApp to switch to visible state Page script language.
Preferably, before timeout recovery instruction is detected, this method also includes:When detecting the time-out based on timer When exiting the scene generation of logic recovery, generation timeout recovery instruction, the timeout recovery is instructed for indicator to the WebApp The time-out based on timer set exits logic recovery, namely now performs recovery by pause for accessing the JS of the WebApp Performed to be normal.Optionally, timeout recovery instruction can be generated according to following two ways.
Mode one:
When receiving for above-mentioned the warning dialog box, confirm that the other component of browser level such as dialog box or prompted dialog frame exits During operation, generation timeout recovery instruction.
Mode two:
When detecting browser that WebApp lives away from home due to receiving switching command and when switching to foreground, or, when detecting terminal When the display screen of equipment switches to wake-up states by screen lock state, determine that the WebApp is in visible state, generate timeout recovery Instruction.
Step 43:Judge whether the difference of the second time point and first time point is more than default timeout threshold.
Step 44:If being more than, the WebApp is closed;Otherwise, it is the WebApp reclockings.
Respectively obtain detect time-out failure instruction when for access WebApp JS fail first time point and After the second time point when the JS can be performed normally when detecting timeout recovery instruction, when determining that the second time point is with first Between the difference put;Again in the case where the difference is more than default timeout threshold, the WebApp is closed, to exit the WebApp; In the case that the difference is not more than default timeout threshold, for the WebApp reclockings.
In embodiments of the present invention, when detecting time-out failure instruction during running WebApp, obtain and be used for Access the first time point of the JS failures of the WebApp;When detecting timeout recovery instruction, obtain that the JS normally performs the Two time points;Wherein, above-mentioned time-out failure instruction and the instruction of above-mentioned timeout recovery indicate respectively that the time-out based on timer exits Logic fails and recovered;And then in the case where the difference of the second time point and first time point is more than default timeout threshold, close Close the WebApp;Otherwise, it is the WebApp reclockings.Due to directly being obtained when the time-out based on timer exits logic failure The first time point for taking JS to fail, and then second time points of JS when can normally perform, and in first time point and second The difference at time point closes WebApp when exceeding preset value, still WebApp long-times no interactions can so be operated in user In the case of, mobile terminal can automatically exit from WebApp, so as to release the binding between WebApp and screen protection application, to reduce The resource occupation of mobile terminal and intelligent television.
Fig. 5 is a kind of flow chart of the example one of the timeout treatment method based on WebApp, referring to Fig. 5, mobile terminal with Intelligent television connects to be established in mobile terminal into same LAN, user using mobile scanning terminal Quick Response Code as shown in Figure 1 WebApp and intelligent television in screen protection application between connection, the picture stored in mobile terminal is uploaded to intelligent electricity Depending in, start up graphic or screen protection picture as intelligent television.This method specifically comprises the following steps:
Step 51:The interactive operation of user starts.
Step 52:Default timeout threshold is set for WebApp, and starts timer and carries out timing.
In the step 52, in the case where no interactions operate, if timing time is more than default timeout threshold, display is super When exit interface, to close WebApp.Before WebApp is closed, if in the presence of other interactive operations, timer can be all reset, Think WebApp reclockings.
Step 53:Judge whether that the other component of browser level blocks the WebApp.If in the presence of execution step 54.
Step 54:Record shows first time point during the other component of above-mentioned browser level.
Step 55:Judge whether to exit the other component of above-mentioned browser level.If so, then perform step 56.
Step 56:Record exits the second time point during the other component of the browser level.
Step 57:Judge whether the difference of the second time point and first time point is more than default timeout threshold.If being more than, Perform step 58;Otherwise, step 59 is performed.
Step 58:Display time-out exits interface.
Step 59:By timer zero setting, for the WebApp reclockings.
In the interactive operation of user, judge whether user triggers the other component of browser level for blocking the WebApp.If User's pull-up the warning dialog box, confirm the system-level dialog box such as dialog box or prompted dialog frame, these dialog boxes can block this WebApp, then the Clocked operation of timer can be terminated due to the single-threaded models of JS in a browser, and then cause this WebApp will not exit in the case where user's long-time no interactions operate.The interactive operation of only user make it that these are system-level Dialog box is exited, and such as user, which clicks on, to be confirmed, cancels or close the warning dialog box, and JS can just revert to normal execution.
Therefore, the first time point that these system-level dialog boxes are shown and the second time point exited are recorded respectively, and then Judge whether the difference of the second time point and first time point is more than default timeout threshold.If being more than, display time-out exits boundary Face, to exit the WebApp;Wherein, above-mentioned " difference of the second time point and first time point be more than default timeout threshold " can be with Instead of judging " user is more than default timeout threshold for the time of WebApp no interactions operation ", namely user is in long-time nothing In the case of interactive operation, the WebApp is automatically exited from.If being not more than, by timer zero setting, think that the WebApp is counted again When, namely user generates new interactive operation for the WebApp, timer can be reset, it is not necessary to exit the WebApp.
It should be noted that in the interactive operation of user, if blocking this in the absence of the other component of browser level always WebApp, then timer can continue timing before default timeout threshold is reached, until reaching default timeout threshold, that is, close The WebApp.
Fig. 6 is a kind of flow chart of the example two of the timeout treatment method based on WebApp, specific referring to Fig. 6, this method Comprise the following steps:
Step 61:The interactive operation of user starts.
Step 62:Default timeout threshold is set for WebApp, and starts timer and carries out timing.
Step 63:Whether the browser that detection WebApp lives away from home switches to running background.If so, then perform step 64.
Step 64:Record first time point when above-mentioned browser switches to backstage.
Step 65:Detect whether above-mentioned browser switches to front stage operation.If so, then perform step 66.
Step 66:Record the second time point when above-mentioned browser switches to foreground.
Step 67:Judge whether the difference of the second time point and first time point is more than default timeout threshold.If being more than, Perform step 68;Otherwise, step 69 is performed.
Step 68:Display time-out exits interface.
Step 59:Based on default timeout threshold and above-mentioned difference, the remaining time of timer is reset.
In the interactive operation of user, whether the browser that detection WebApp lives away from home switches to running background.If use the head of a household Desktop is returned by HOME buttons, or, during user's switching browser application, then page script corresponding to the Clocked operation of timer Invisible mode can be in due to WebApp for language and abnormal execution, and then causes the WebApp in user's long-time no interactions It will not be exited in the case of operation.The interactive operation of user is now needed so that WebApp switchs to visible state and can just continued executing with Page script language.
Therefore, the browser that record WebApp lives away from home respectively is switched to very first time during invisible mode by visible state Point and the second time point when the visible state is switched to by the invisible mode, and then judge the second time point and first Whether the difference at time point is more than default timeout threshold.If being more than, display time-out exits interface, to exit the WebApp;Its In, above-mentioned " difference of the second time point and first time point is more than default timeout threshold " can replace judging that " user is directed to should The time of WebApp no interactions operation is more than default timeout threshold ", namely user is in the case where long-time no interactions operate, from It is dynamic to exit the WebApp.If being not more than, according to default timeout threshold and above-mentioned difference, the remaining time of timer is reset to The difference of default timeout threshold and above-mentioned difference, thinks that the WebApp reclockings, namely user generate newly for the WebApp Interactive operation, timer can be reset, it is not necessary to exit the WebApp.
It should be noted that above-mentioned WebApp is in invisible mode, in addition to because mobile terminal is cut by wake-up states WebApp is in invisible mode caused by shifting to screen lock state.At this point it is possible to respectively record mobile terminal display screen by The second time point when bright screen switches to first time point when going out screen and bright screen is switched to by the screen that goes out, and then judge second Whether the difference of time point and first time point is more than default timeout threshold.It should be noted that above-mentioned WebApp is recorded by not Visible state switches to the second time point during visible state, when can be used as control by event call-backs such as HTML5 observabilities Machine.
Fig. 7 is a kind of block diagram of timeout treatment device based on WebApp provided in an embodiment of the present invention, should referring to Fig. 7 Device can be implemented in combination with by software, hardware or both.The device includes the first acquisition module 71, the second acquisition module 72nd, judge module 73 and processing module 74.
First acquisition module 71, for when detecting time-out failure instruction during running WebApp, obtaining and using In the first time point for the JS failures for accessing the WebApp;Time-out of the time-out failure instruction instruction based on timer exits logic Failure;
Second acquisition module 72, for when detecting timeout recovery instruction, obtaining the second time point that above-mentioned JS is normally performed; Time-out of the timeout recovery instruction instruction based on timer exits logic recovery;
Judge module 73, for judging whether the difference at the second time point and first time point is more than default timeout threshold;
Processing module 74, if for being more than, close the WebApp;Otherwise, it is the WebApp reclockings.
Preferably, the device can also include:
Generation module 75, for when receiving the trigger action for the other component of browser level, or, when detecting this When WebApp is in invisible mode, above-mentioned time-out failure instruction is generated.Further, generation module 75 is specifically used for when detection When the browser lived away from home to the WebApp switchs to backstage, or, when the display screen for detecting mobile terminal is switched by wake-up states During to screen lock state, determine that the WebApp is in invisible mode, and then generate above-mentioned time-out failure instruction.
Generation module 75, it is additionally operable to be directed to when exiting operation of the other component of browser level when receiving, or, work as detection When switching to visible state by invisible mode to the WebApp, above-mentioned timeout recovery instruction is generated.
It should be noted that:The timeout treatment device based on WebApp that above-described embodiment provides is carrying out timeout treatment When, only with the division progress of above-mentioned each functional module for example, in practical application, above-mentioned function can be divided as needed With by different functional module completions, i.e., the internal structure of device is divided into different functional modules, to complete above description All or part of function.In addition, the timeout treatment device based on WebApp that above-described embodiment provides is with being based on WebApp Timeout treatment embodiment of the method belong to same design, its specific implementation process refers to embodiment of the method, repeats no more here.
Present invention also offers a kind of mobile terminal, including for storing the memory of computer program, for performing this Computer program is in addition to power supply module, multimedia groupware, audio-frequency assembly, defeated to realize the processor of the method shown in Fig. 4-6 Enter/export(I/ O)Interface, sensor cluster and communication component etc..
In addition, the present invention also provides a kind of computer-readable recording medium, the storage medium internal memory contains computer software Instruction, the computer software instructions realize the method shown in Fig. 4-6 when being executed by processor.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.

Claims (10)

  1. A kind of 1. timeout treatment method based on WebApp, it is characterised in that methods described includes:
    When detecting time-out failure instruction during running WebApp, obtain the JS for accessing the WebApp and fail First time point;
    When detecting timeout recovery instruction, the second time point that the JS is normally performed is obtained;
    Wherein, the time-out failure instruction and timeout recovery instruction indicate respectively that the time-out based on timer exits logic mistake Effect and recovery;
    Judge whether second time point and the difference of the first time point are more than default timeout threshold;
    If being more than, the WebApp is closed;Otherwise, it is the WebApp reclockings.
  2. 2. the method as described in claim 1, it is characterised in that it is described detect time-out failure instruction before, methods described Also include:
    When receiving the trigger action for the other component of browser level, or, can not when detecting that the WebApp is in During state of seeing this, the time-out failure instruction is generated;
    It is described detect timeout recovery instruction before, methods described also includes:
    When exiting operation of the other component of browser level is directed to when receiving, or, when detecting the WebApp by invisible When state switches to visible state, the timeout recovery instruction is generated.
  3. 3. method as claimed in claim 2, it is characterised in that described to detect that the WebApp is in invisible mode, tool Body includes:
    When the browser for detecting that the WebApp lives away from home switchs to backstage, or, when detect the display screen of mobile terminal by When wake-up states switch to screen lock state, determine that the WebApp is in invisible mode.
  4. 4. method as claimed in claim 2, it is characterised in that the JS obtained for accessing the WebApp fail the At one time point, specifically include:
    Record shows first time point during the other component of the browser level;
    Second time point obtained when the JS is normally performed, specifically include:
    Record exits the second time point during the other component of the browser level.
  5. 5. method as claimed in claim 2, it is characterised in that the JS obtained for accessing the WebApp fail the At one time point, specifically include:
    Record the first time point when WebApp is switched to invisible mode by visible state;
    Second time point obtained when the JS is normally performed, specifically include:
    Record the second time point when the WebApp is switched to visible state by invisible mode.
  6. 6. method as claimed in claim 1 or 2, it is characterised in that described is the WebApp reclockings, is specifically included:
    By timer zero setting, and reclocking;
    Or based on the default timeout threshold and the difference, set the remaining time of timer.
  7. 7. a kind of timeout treatment device based on WebApp, it is characterised in that described device includes:
    First acquisition module, for when detecting time-out failure instruction during running WebApp, obtaining for accessing The first time point of the JS failures of the WebApp;The time-out of the time-out failure instruction instruction based on timer exits logic mistake Effect;
    Second acquisition module, for when detecting timeout recovery instruction, obtaining the second time point that the JS is normally performed;Institute State time-out of the timeout recovery instruction instruction based on timer and exit logic recovery;
    Judge module, whether the difference for judging second time point and the first time point, which is more than, is preset overtime threshold Value;
    Processing module, if for being more than, close the WebApp;Otherwise, it is the WebApp reclockings.
  8. 8. device as claimed in claim 7, it is characterised in that described device also includes:
    Generation module, for when receiving the trigger action for the other component of browser level, or, it is described when detecting When WebApp is in invisible mode, the time-out failure instruction is generated;Moving back for the other component of browser level is directed to when receiving When going out to operate, or, when detecting that the WebApp switches to visible state by invisible mode, generate the timeout recovery Instruction.
  9. 9. device as claimed in claim 8, it is characterised in that the generation module, be specifically used for:
    When the browser for detecting that the WebApp lives away from home switchs to backstage, or, when detect the display screen of mobile terminal by When wake-up states switch to screen lock state, determine that the WebApp is in invisible mode, and then generate the time-out failure and refer to Order.
  10. A kind of 10. computer-readable recording medium, it is characterised in that the storage medium internal memory contains computer software instructions, Computer perform claim is set to require at any described time-out based on web application of 1-6 after the computer software instructions operation The method of reason.
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 true CN107835454A (en) 2018-03-23
CN107835454B 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)

Cited By (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 (4)

* 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
US20070100676A1 (en) * 2005-10-27 2007-05-03 Dmitry Andreev Method and system for optimally scheduling user activities related to web applications
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

Patent Citations (4)

* 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
US20070100676A1 (en) * 2005-10-27 2007-05-03 Dmitry Andreev Method and system for optimally scheduling user activities related to web applications
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

Cited By (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

Also Published As

Publication number Publication date
CN107835454B (en) 2020-04-17

Similar Documents

Publication Publication Date Title
CN103051516B (en) A kind of message prompt method of instant communication client and device
CN103544021B (en) The screenshotss method and its device of a kind of mobile terminal screen content
CN107835454A (en) Timeout treatment method, apparatus and storage medium based on WebApp
CN105446755A (en) Method and device for rapidly loading Activity data for Android system
CN104035684A (en) Dynamic screen capture method and system applicable to mobile terminal
CN102404633B (en) Monitoring module, intelligent television system and television
CN111258921A (en) Method and device for recycling garbage memory, electronic equipment and storage medium
CN103440092A (en) Return key processing method, system and mobile terminal
CN107341015A (en) Inter-terminal data synchronous method, device, terminal and storage medium
CN103929541A (en) Method and device for controlling acceleration sensor and mobile terminal
CN107515707B (en) Mobile terminal multilevel menu control method and system, storage medium, electronic equipment
CN102981905B (en) A kind of application control method and electronic equipment
CN107911728A (en) A kind of smart television image processing method and smart television
US20220385953A1 (en) Video stream playing control method and apparatus, and storage medium
CN105280204B (en) Method for broadcasting multimedia file, apparatus and system
CN105224335A (en) A kind of control method of Automatic clearance terminal device, system and terminal device
CN105264970A (en) Method, device and mobile terminal for reducing power consumption
CN106293974A (en) A kind of terminal abnormal restoration methods and terminal
CN103927244B (en) A kind of method of the plug-in unit scheduling process monitoring realized based on dynamic proxy
CN105892817A (en) Control method and device for windows in application program
CN104346064A (en) Information processing method and electronic equipment
JP2015095219A (en) Information processor, information processing method and storage medium
CN109582187A (en) Document sending method, device, computer equipment and storage medium
CN107306360A (en) The access method and device of a kind of interactive network TV service
CN100458695C (en) Automatic total remote controlling method

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 Visual Technology Co., Ltd.

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

Patentee before: QINGDAO HISENSE ELECTRONICS Co.,Ltd.