CN103336838B - A kind of processing method of webpage, device and terminal device - Google Patents

A kind of processing method of webpage, device and terminal device Download PDF

Info

Publication number
CN103336838B
CN103336838B CN201310296099.XA CN201310296099A CN103336838B CN 103336838 B CN103336838 B CN 103336838B CN 201310296099 A CN201310296099 A CN 201310296099A CN 103336838 B CN103336838 B CN 103336838B
Authority
CN
China
Prior art keywords
web page
current web
state
property value
current
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
CN201310296099.XA
Other languages
Chinese (zh)
Other versions
CN103336838A (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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201310296099.XA priority Critical patent/CN103336838B/en
Publication of CN103336838A publication Critical patent/CN103336838A/en
Application granted granted Critical
Publication of CN103336838B publication Critical patent/CN103336838B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a kind of processing method of webpage, device and terminal device.The processing method includes:The state of monitoring current web page;When the state of the current web page meets default execution time-out condition, suspend the executable script for executing the current web page.In the embodiment of the present invention, can realize when current web page is equal to preset duration in the continuous duration that invisible mode or current web page do not receive operation, the executable script for executing current web page can be suspended, occupancy of the executable script of current web page to hardware resource is avoided, hardware resource has been saved.

Description

A kind of processing method of webpage, device and terminal device
Technical field
The present invention relates to technical field of the computer network, more particularly to a kind of processing method of webpage, device and terminal set Standby.
Background technology
With the development of computer internet technology, current browser can be supported to browse during multi-page same, for example, Hold multi-tag to browse, at the same time the content of webpage also becomes increasingly to enrich, increasing page script needs to be browsed Device is executed.This is allowed for for browsing the hardware resource of the equipment of webpage, for example, internal memory, CPU(Central Processing Unit, central processing unit)It is skyrocketed through etc. expense, browser UI process blockings can be caused to cannot respond to when hardware resource is not enough Many problems for affecting user to use such as user operation, browser process collapse.
At present, the network application based on browser, when user no longer focuses on a webpage(Be minimized when webpage, It is switched to backstage Shipping Options Page, or user is not when carrying out any operation to the webpage within a certain period of time), the webpage still ties up The executable script for holding present situation, the i.e. webpage is still being executed, for example, when presence such as long link, AJAX polling requests in webpage (Asynchronous http request), or timer etc. can continuously carry out page script when, the resource of browser can be consumed, while These consumption are a kind of wastes for hardware resource.Therefore, how saved in the browser for supporting multi-page as far as possible hard Part resource becomes technical problem urgently to be resolved hurrily.
Content of the invention
The embodiment of the present invention provides a kind of processing method of webpage, device and terminal device, for saving browsing device net page Use to hardware resource, it is to avoid occupancy of the webpage in idle state to hardware resource.
A kind of one aspect of the present invention, it is proposed that processing method of webpage, including:
The state of monitoring current web page;
When the state of the current web page meets default execution time-out condition, suspend execute the current web page can Perform script.
In the embodiment of the present invention, can realize not receiving behaviour in current web page in invisible mode or current web page Make continuous duration be equal to preset duration when, can suspend execute current web page executable script, it is to avoid current web page can Occupancy of the perform script to hardware resource, saving client hardware resource, and can suspend some needs is carried out with server The executable script of data exchange, has saved server resource.
As the preferred of above-mentioned technical proposal, after the executable script for suspending the execution current web page, described Processing method also includes:
When the state of the current web page meets default execution recovery condition, that recovers to execute the current web page can Perform script.
In this programme, when the state of current web page meets default execution recovery condition, can recover automatically to execute and work as The executable script of front webpage, facilitates user, with flexibility.
As the preferred of above-mentioned technical proposal,
The execution time-out condition includes:Current web page is in invisible mode;
The state of the monitoring current web page, including:
Using the poll that sets up on the current web page, monitor whether the current web page is in invisible mode.
A kind of scheme of monitoring current web page state is provided in this programme.
As the preferred of above-mentioned technical proposal, described using the poll that sets up on the current web page, monitoring is described to work as Whether front webpage is in invisible mode, including:
Using the poll that sets up on the current web page, the hiding property value of the current web page document is monitored;
When the hiding property value of the current web page document is to represent the property value that hides, determine at the current web page In invisible mode;
When the hiding property value of the current web page document is to represent the property value for showing, determine at the current web page In visible state.
A kind of scheme of detailed monitoring current web page state is provided in this programme.
Used as the preferred of above-mentioned technical proposal, the execution recovery condition includes:The current web page is by invisible mode Be converted to visible state.A kind of execution recovery condition is proposed in this programme.
As the preferred of above-mentioned technical proposal,
The execution time-out condition includes:The current web page does not receive the continuous duration of operation and is equal to preset duration;
The state of the monitoring current web page, including:
Start timing at the end of the first operation to the current web page;
When the duration of statistics is equal to preset duration, if the current web page does not receive the second operation, it is determined that institute The state for stating current web page meets the execution time-out condition.
The scheme of another kind of monitoring current web page state is provided in this programme.
Used as the preferred of above-mentioned technical proposal, the execution recovery condition includes:The current web page receives the second behaviour Make.Another kind of execution recovery condition is proposed in this programme, to meet different demands.
A kind of another aspect of the present invention, it is proposed that processing meanss of webpage, including:
Monitoring modular, for monitoring the state of current web page;
Suspend performing module, for when the state of the current web page meets default execution time-out condition, time-out is held The executable script of the row current web page.
Used as the preferred of above-mentioned technical proposal, the processing meanss also include:
Recover performing module, for described suspend performing module suspend execute the current web page executable script it Afterwards, when the state of the current web page meets default execution recovery condition, recover to execute the executable of the current web page Script.
Used as the preferred of above-mentioned technical proposal, the monitoring modular includes:
Monitoring unit, for when the execution time-out condition includes that current web page is in invisible mode, using in institute The poll that sets up on current web page is stated, monitors whether the current web page is in invisible mode.
Used as the preferred of above-mentioned technical proposal, the monitoring unit includes:
Monitoring subelement, for utilizing the poll that sets up on the current web page, monitors the current web page document Hiding property value;When the hiding property value of the current web page document is to represent the property value that hides, the current net is determined Page is in invisible mode;When the hiding property value of the current web page document is to represent the property value for showing, determine described Current web page is in visible state.
Used as the preferred of above-mentioned technical proposal, the monitoring modular includes:
When the execution time-out condition, timing unit, for including that the current web page does not receive the continuous duration of operation When being equal to preset duration, at the end of the first operation to the current web page, start timing;
Determining unit, for when the duration of statistics is equal to preset duration, if the current web page does not receive second Operation, it is determined that the state of the current web page meets the execution time-out condition.
The embodiment of the present invention additionally provides a kind of terminal device, and terminal device includes memory, and one or one Individual above program, one of them or more than one program storage is in memory, and is configured to by one or one Above computing device is one or more than one program bag is containing the instruction for being used for carrying out following operation:
The state of monitoring current web page;
When the state of the current web page meets default execution time-out condition, suspend execute the current web page can Perform script.
Other features and advantages of the present invention will be illustrated in the following description, also, partly be become from specification Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can pass through in the explanation that is write In book, claims and accompanying drawing, specifically noted structure is realizing and obtain.
Below by drawings and Examples, technical scheme is described in further detail.
Description of the drawings
Accompanying drawing is used for providing a further understanding of the present invention, and constitutes a part for specification, the reality with the present invention Applying example is used for explaining the present invention together, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the main method flow chart of Web Page Processing in the embodiment of the present invention;
Fig. 2 is the first preferred embodiment flow chart of Web Page Processing in the embodiment of the present invention;
Fig. 3 is second of Web Page Processing preferred embodiment flow chart in the embodiment of the present invention;
Fig. 4 is the third preferred embodiment flow chart of Web Page Processing in the embodiment of the present invention;
Fig. 5 is the primary structure schematic diagram of the processing meanss of webpage in the embodiment of the present invention;
Fig. 6 is the detailed construction schematic diagram of the processing meanss of webpage in the embodiment of the present invention;
Fig. 7 A are the structural representation of monitoring modular in the processing meanss of webpage in the embodiment of the present invention;
Fig. 7 B are the structural representation of monitoring unit in monitoring modular in the embodiment of the present invention;
Fig. 7 C are another structural representation of monitoring modular in the processing meanss of webpage in the embodiment of the present invention;
Fig. 8 is a kind of terminal device structural representation provided in an embodiment of the present invention.
Specific embodiment
The preferred embodiments of the present invention are illustrated below in conjunction with accompanying drawing, it will be appreciated that preferred reality described herein Apply example to be merely to illustrate and explain the present invention, be not intended to limit the present invention.
The main method flow process of Web Page Processing in the embodiment of the present invention is illustrated in figure 1,11-12 is comprised the following steps:
Step 11, the state of monitoring current web page.
Step 12, when the state of above-mentioned current web page meet default execution time-out condition when, suspend execute current web page Executable script.
Here, default execution time-out condition can include:Current web page is in invisible mode(Such as current web page quilt Hide, or other webpages are switched to from current web page), or current web page do not receive operation continuous duration be equal to default Duration.It is, of course, also possible to be set to other execution time-out conditions according to practical service environment.
Preferably, when it is that current web page is in invisible mode to execute time-out condition, above-mentioned steps 11 may include step A1:
Whether step A1, the poll for utilizing foundation on current web page, monitoring current web page are in invisible mode.
It is further preferred that above-mentioned steps A1 may include step B1-B3:
Step B1, the poll for utilizing foundation on current web page, monitor the hiding property value of current web page document.
If HTML5 supported by current web page browser(Hypertext Markup Language, HTML)Page Face observability Page Visibility technology, then can set up a polling procedure on current web page, monitor current web page document The hiding hidden property values of Document.W3C(World Wide Web Consortium, World Wide Web Consortium)HTML5 works Introduction of the draft to hidden attributes:" hidden attributes are boolean properties.When specifying on an element, it represents Element is also not or no longer related.User agent should not assume the element for specifying hidden attributes." certainly, it is necessary to using one The client-side scripting language JavaScript for planting based on object and event-driven and there is relative safety operates this attribute.One Example is probably to carry out logging in network Web game using hidden attributes.Initially, user will be seen that the login screen for concealing game Curtain.After checking authority, user will be seen that the game for concealing logon screen.
Step B2, when the hiding property value of above-mentioned current web page document be represent hide property value when, determine current net Page is in invisible mode.
When the hiding hidden property values of above-mentioned current web page document D ocument are false FALSE, current web page is determined It is in invisible mode.
Step B3, when the hiding property value of above-mentioned current web page document be represent show property value when, determine current net Page is in visible state.
When the hiding hidden property values of above-mentioned current web page document D ocument are true TRUE, determine at current web page In visible state.
As such, it is possible to the poll for passing through foundation monitors the hiding property value of current web page document, for determining current web page State.
Preferably, when it is that current web page does not receive the continuous duration of operation equal to preset duration to execute time-out condition, Above-mentioned steps 11 may also include step C1-C2:
Step C1, beginning timing at the end of the first operation to current web page.
Step C2, when statistics duration be equal to preset duration when, if current web page does not receive the second operation, it is determined that The state of current web page meets execution time-out condition.
As such, it is possible to determine the state of current web page by the method for counting duration.
Preferably, after above-mentioned steps 12, step D1 may also include:
Step D1, when the state of current web page meet default execution recovery condition when, recover execute current web page can Perform script.
Here, when it is that current web page is in invisible mode to execute time-out condition, executing recovery condition includes:Current net Page is converted to visible state by invisible mode;Or, it is being the company that current web page does not receive operation when execution time-out condition When continuous duration is equal to preset duration, executing recovery condition includes:Current web page receives the second operation.State when current web page When meeting default execution recovery condition, the executable script for executing current web page can be recovered automatically, user-friendly, There is flexibility.
Using above-mentioned technical proposal, can realize not receiving in invisible mode or current web page in current web page When the continuous duration of operation is equal to preset duration, the executable script for executing current web page can be suspended, it is to avoid current web page Occupancy of the executable script to hardware resource, saves client hardware resource, and can suspend some needs to enter with server The executable script of row data exchange, saves server resource.
It should be noted that in practical application, above-mentioned all optional embodiments can be any group in the way of adopting and combine Close, form the alternative embodiment of the present invention, this is no longer going to repeat them.
Technical scheme provided in an embodiment of the present invention is discussed in detail below by three embodiments.
Embodiment one
Be illustrated in figure 2 Web Page Processing in the embodiment of the present invention the first preferred embodiment, in the embodiment, hold Row time-out condition is that current web page is in invisible mode, and execution recovery condition is converted to by invisible mode for current web page can See this state, the method is comprised the following steps:
Step 201, the one or more webpages of startup.
Step 202, using the poll that sets up on current web page, whether the hiding property value for monitoring current web page document is Represent the property value that hides;If so, step 203 is then continued executing with;Otherwise, step 204 is continued executing with;
Hiding property value in web document is determined for the state of the current webpage, such as in visible state or It is in invisible mode.When which is in invisible mode, illustrate that the executable script of current web page takes hardware resource unrestrained Take, can be with the pausing operation of execution step 203.
Step 203, current web page is determined in invisible mode, suspend the executable script for executing current web page, and after Continuous execution step 202 monitors the hiding property value of current web page document.
Whether step 204, the previous hiding property value of the hiding property value for obtaining current web page document are to represent to hide Property value;If so, execution step 205;Otherwise, return and continue executing with step 202.
If the hiding property value of step 205 current web page document by represent hiding property value be converted to represent show Property value, it is determined that current web page recovers the executable script for executing current web page in visible state, and return and continue executing with Step 202.
In embodiment one, it is possible to use the poll that sets up on current web page, the hiding attribute of current web page document is monitored Value, when the hiding property value of current web page document is to represent the property value that hides, can suspend and execute holding for current web page This travel far and wide, it is to avoid occupancy of the executable script of current web page to hardware resource, has saved resource;In the hidden of current web page document When hiding property value by representing that hiding property value is converted to the property value for representing display, can recover automatically to execute current web page Executable script, user-friendly, with flexibility.
Embodiment two
It is illustrated in figure 3 second of Web Page Processing in the embodiment of the present invention preferred embodiment, in the embodiment, holds Row time-out condition is that current web page does not receive the continuous duration of operation equal to preset duration, and it is current web page to execute recovery condition The second operation is received, the method is comprised the following steps:
Step 301, the one or more webpages of startup.
Step 302, capture for current web page first operate, to current web page first operation at the end of start From zero timing.
Step 303, when statistics duration be equal to preset duration when, judge whether current web page receives the second operation, if Receive, then second operation is continued executing with step 302 as the first operation;If it is not, then continuing executing with step 304.
Step 304, the state satisfaction execution time-out condition for determining current web page, suspend the executable pin for executing current web page This.
Preferably, after suspending the executable script for executing current web page, continuing executing with step 305;
Step 305, when monitor current web page receive the second operation after, recover execute current web page executable script, And second operation is returned and continues executing with step 302 as the first operation.
Preferably, after determining that the state of current web page meets execution recovery condition, recovering to execute the executable of current web page Script, timing reset, i.e., at the end of the second operation, timing of starting from scratch.
In embodiment two, the state of current web page is determined by the method for statistics duration, is not received in current web page When the continuous duration of operation is equal to preset duration, the executable script for executing current web page can be suspended, it is to avoid current web page Occupancy of the executable script to hardware resource, has saved resource.After the executable script for executing current web page is suspended, continue prison Survey whether current web page receives the second operation, when current web page receives the second operation, can recover automatically to execute and work as The executable script of front webpage, user-friendly, with flexibility.
Embodiment three
Embodiment three can be applied in such a scene:User opens video web-pages and watches video online, in viewing During video, a certain application program being currently running ejects news messages frame, and user then clicks on the news messages link, beats The news messages webpage is opened, the video council now played just now suspends plays, regarded when user runs through news messages and is switched to During frequency webpage, video automatically continues broadcasting.
Be illustrated in figure 4 Web Page Processing in the embodiment of the present invention the third preferred embodiment, the method include with Lower step:
Step 401, one video web-pages of startup, play video.
Step 402, the poll for utilizing foundation on video web-pages, the hiding property value of monitor video web document.
Step 403, one news web page of startup, the hiding property value of video web-pages document are changed by the property value for representing display For representing the property value that hides, suspend and play video, and continue the hiding property value of monitor video web document.
Step 404, when video web-pages are switched to from news web page, the hiding property value of video web-pages document is by representing hidden The property value of Tibetan is converted to and represents the property value for showing, continues to play video.
In embodiment three, it is possible to use the poll that sets up on video web-pages, the hiding attribute of monitor video web document Value, when the hiding property value of video web-pages document is to represent the property value that hides, can suspend broadcasting video, save money Source;When video web-pages document hiding property value by represent hiding property value be converted to represent the property value for showing when, can be with Broadcasting video is automatically continued, user is facilitated, with flexibility.
The foregoing describe web page processing method realizes process, and the process can be realized by device, below the inside to device Function and structure is introduced.
Same inventive concept is based on, as shown in figure 5, a kind of processing meanss of webpage include in the present embodiment:Monitoring modular 501 and suspend performing module 502.
Monitoring modular 501, for monitoring the state of current web page.
Suspend performing module 502, for when the state of current web page meets default execution time-out condition, suspending and executing The executable script of current web page.
Preferably, as shown in fig. 6, the processing meanss that above-mentioned Fig. 5 shows also include:
Recover performing module 503, for suspend performing module 502 suspend execute current web page executable script it Afterwards, when the state of current web page meets default execution recovery condition, recover the executable script for executing current web page.
Preferably, as shown in Figure 7 A, above-mentioned monitoring modular 501 may include:
Monitoring unit 701, for when execution time-out condition includes that current web page is in invisible mode, using current Whether the poll that sets up on webpage, monitoring current web page are in invisible mode.
Preferably, as shown in Figure 7 B, above-mentioned monitoring unit 701 may include:
Monitoring subelement 711, for utilizing the poll that sets up on current web page, monitors the hiding category of current web page document Property value;When the hiding property value of current web page document is to represent the property value that hides, determining that current web page is in can not see this State;When the hiding property value of current web page document is to represent the property value for showing, determine that current web page is in visible state.
Preferably, executing recovery condition includes:Current web page is converted to visible state by invisible mode.
Preferably, as seen in figure 7 c, above-mentioned monitoring modular 501 may also include:
When execution time-out condition, timing unit 702, for including that current web page does not receive the continuous duration of operation and is equal to During preset duration, at the end of the first operation to current web page, start timing.
Determining unit 703, for when the duration of statistics is equal to preset duration, if current web page does not receive the second behaviour Make, it is determined that the state of current web page meets execution time-out condition.
Preferably, executing recovery condition includes:Current web page receives the second operation.
Method provided in an embodiment of the present invention may operate in the support operation client under any terminal and any platform Script(Such as javascript scripts)Or support that W3C proposes the browser of HTML5 specifications.
The embodiment of the present invention also proposes a kind of terminal, and Fig. 8 is that a kind of terminal device structure provided in an embodiment of the present invention is shown It is intended to.Referring to Fig. 8, the terminal device can be used for the processing method of the webpage for implementing to provide in above-described embodiment.Preferably, with Operation client script is below supported(Such as javascript scripts)Or support that W3C proposes the browser institute of HTML5 specifications As a example by the hardware environment at place:
Terminal device 800 can include communication unit 110, include one or more computer-readable recording mediums Memory 120, input block 130, display unit 140, sensor 150, voicefrequency circuit 160, WIFI(Wireless Fidelity, Wireless Fidelity)Module 170, the processor 180 and power supply that include one or more than one processing core 190 grade parts.It will be understood by those skilled in the art that the terminal device structure illustrated in Fig. 8 is not constituted to terminal device Limit, can include than illustrating more or less of part, or combine some parts, or different part arrangements.Wherein:
Communication unit 110 can be used to receiving and sending messages or communication process in, the reception and transmission of signal, the communication unit 110 Can be RF(Radio Frequency, radio frequency)Circuit, router, modem, etc. network communication equipment.Especially, when When communication unit 110 is RF circuits, after the downlink information of base station is received, transfer at one or more than one processor 180 Reason;In addition, up data is activation will be related to base station.Usually as communication unit RF circuits include but is not limited to antenna, At least one amplifier, tuner, one or more oscillators, subscriber identity module(SIM)Card, transceiver, coupler, LNA(Low Noise Amplifier, low-noise amplifier), duplexer etc..Additionally, communication unit 110 can also pass through wirelessly Communication is communicated with network and other equipment.The radio communication can use arbitrary communication standard or agreement, including but not limited to GSM(Global System of Mobile communication, global system for mobile communications)、GPRS(General Packet Radio Service, general packet radio service)、CDMA(Code Division Multiple Access, code Divide multiple access)、WCDMA(Wideband Code Division Multiple Access, WCDMA)、LTE(Long Term Evolution, Long Term Evolution), Email, SMS(Short Messaging Service, Short Message Service)Deng. Memory 120 can be used to store software program and module, and processor 180 is stored in the software journey of memory 120 by operation Sequence and module, so that execute various function application and data processing.Memory 120 can mainly include storing program area and deposit Storage data field, wherein, storing program area can storage program area, the application program needed at least one function(Such as sound is broadcast Playing function, image player function etc.)Deng;Storage data field can be stored and use created data according to terminal device 800(Than Such as voice data, phone directory etc.)Deng.Additionally, memory 120 can include high-speed random access memory, can also include non- Volatile memory, for example, at least one disk memory, flush memory device or other volatile solid-state parts.Accordingly Ground, memory 120 can also include Memory Controller, to provide processor 180 and input block 130 is to memory 120 Access.
Input block 130 can be used for the numeral of receives input or character information, and produce and user setup and function The relevant keyboard of control, mouse, action bars, optics or trace ball signal input.Preferably, input block 130 may include to touch Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad, can collect use Family is thereon or neighbouring touch operation(Such as user is using any suitable objects such as finger, stylus or annex in touch-sensitive table Operation on face 131 or near the Touch sensitive surface 131), and corresponding attachment means are driven according to formula set in advance.Optional , Touch sensitive surface 131 may include two parts of touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used The touch orientation at family, and the signal that touch operation brings is detected, transmit a signal to touch controller;Touch controller is from touch Touch information is received in detection means, and is converted into contact coordinate, then give processor 180, and can receiving processor 180 The order sent simultaneously is executed.Furthermore, it is possible to adopt the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave Realize Touch sensitive surface 131.Except Touch sensitive surface 131, input block 130 can also include other input equipments 132.Preferably, Other input equipments 132 can include but is not limited to physical keyboard, function key(Such as volume control button, switch key etc.)、 One or more in trace ball, mouse, action bars etc..
Display unit 140 can be used for display by the information of user input or be supplied to information and the terminal device of user 800 various graphical user interface, these graphical user interface can be come by figure, text, icon, video and its any combination Constitute.Display unit 140 may include display floater 141, optionally, can adopt LCD(Liquid Crystal Display, Liquid crystal display)、OLED(Organic Light-Emitting Diode, Organic Light Emitting Diode)Display is configured etc. form Panel 141.Further, Touch sensitive surface 131 can cover display floater 141, when Touch sensitive surface 131 detect thereon or near Touch operation after, send processor 180 to determine the type of touch event, with preprocessor 180 according to touch event Type provides corresponding visual output on display floater 141.Although in fig. 8, Touch sensitive surface 131 with display floater 141 is Realize input and input function as two independent parts, but in some embodiments it is possible to by Touch sensitive surface 131 with Display floater 141 is integrated and realization is input into and output function.
Terminal device 800 may also include at least one sensor 150, such as optical sensor, motion sensor and other Sensor.Optical sensor may include ambient light sensor and proximity transducer, and wherein, ambient light sensor can be according to ambient light Light and shade adjusting the brightness of display floater 141, proximity transducer can cut out and show when terminal device 800 is moved in one's ear Panel 141 and/or backlight.Used as one kind of motion sensor, Gravity accelerometer can be detected in all directions(Generally Three axles)The size of acceleration, can detect that size and the direction of gravity when static, can be used for the application for recognizing mobile phone attitude(Than Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function(Such as pedometer, percussion)Deng;Extremely The other sensors such as the gyroscope that can also configure in terminal device 800, barometer, hygrometer, thermometer, infrared ray sensor, Will not be described here.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the COBBAIF between user and terminal device 800. Electric signal after the voice data for receiving conversion can be transferred to loudspeaker 161, is changed by loudspeaker 161 by voicefrequency circuit 160 Export for voice signal;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, is connect by voicefrequency circuit 160 Voice data is converted to after receipts, then after voice data output processor 180 is processed, such as another to be sent to through RF circuits 110 One terminal device, or voice data is exported to memory 120 further to process.Voicefrequency circuit 160 is also possible that Earphone jack, to provide the communication of peripheral hardware earphone and terminal device 800.
In order to realize radio communication, on the terminal device, wireless communication unit 170 can be configured with, the wireless communication unit 170 can be WIFI module.WIFI belongs to short range wireless transmission technology, and terminal device 800 can by wireless communication unit 170 Sent and received e-mail with help user, browse webpage and access streaming video etc., it has provided the user wireless broadband interconnection Net is accessed.Although Fig. 8 shows wireless communication unit 170, but it is understood that, which is simultaneously not belonging to terminal device 800 Must be configured into, can omit in the scope of essence for not changing invention as needed completely.
Processor 180 is the control centre of terminal device 800, using various interfaces and connection whole mobile phone each Part, is stored in software program and/or module in memory 120 by running or executing, and calls and be stored in memory Data in 120, execute the various functions and processing data of terminal device 800, so as to carry out integral monitoring to mobile phone.Optional , processor 180 may include one or more processing cores;Preferably, processor 180 can integrated application processor and modulatedemodulate Processor is adjusted, wherein, application processor mainly processes operating system, user interface and application program etc., modem processor Main process radio communication.It is understood that above-mentioned modem processor can not also be integrated in processor 180.
Terminal device 800 also includes the power supply 190 that powers to all parts(Such as battery), it is preferred that power supply can lead to Cross power-supply management system logically contiguous with processor 180, so as to by power-supply management system realize management charge, electric discharge and The functions such as power managed.Power supply 190 can also include one or more direct current or AC power, recharging system, electricity The random component such as source failure detector circuit, power supply changeover device or inverter, power supply status indicator.
Although not shown, terminal device 800 can also include camera, bluetooth module etc., will not be described here.In this reality Apply in example, terminal device browses webpage using browser, terminal device also includes memory, and one or more than one Program, one of them or more than one program storage is in memory, and is configured to by one or more than one Reason device executes one or more than one program bag containing the instruction for being used for carrying out following operation:
The state of monitoring current web page.
When the state of current web page meets default execution time-out condition, suspend the executable pin for executing current web page This.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can adopt complete hardware embodiment, complete software embodiment or with reference to software and hardware in terms of reality Apply the form of example.And, the present invention can be adopted in one or more computers for wherein including computer usable program code Usable storage medium(Including but not limited to magnetic disc store and optical memory etc.)The shape of the computer program of upper enforcement Formula.
The present invention is with reference to method according to embodiments of the present invention, equipment(System), and computer program flow process Figure and/or block diagram are describing.It should be understood that can be by computer program instructions flowchart and/or each stream in block diagram Journey and/or the combination of square frame and flow chart and/or the flow process in block diagram and/or square frame.These computer programs can be provided Instruct the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devices The device of the function of specifying in present one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in and can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory is produced to be included referring to Make the manufacture of device, the command device realize in one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or The function of specifying in multiple square frames.
These computer program instructions can be also loaded in computer or other programmable data processing devices so that in meter Series of operation steps is executed on calculation machine or other programmable devices to produce computer implemented process, so as in computer or The instruction executed on other programmable devices is provided for realization in one flow process of flow chart or multiple flow processs and/or block diagram one The step of function of specifying in individual square frame or multiple square frames.
Obviously, those skilled in the art can carry out the essence of various changes and modification without deviating from the present invention to the present invention God and scope.So, if these modifications of the present invention and modification belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising these changes and modification.

Claims (7)

1. a kind of processing method of webpage, it is characterised in that include:
The state of monitoring current web page;Including:Using the poll that sets up on the current web page, the current net is monitored Whether page is in invisible mode;Or, start timing at the end of the first operation to the current web page;When statistics When length is equal to preset duration, if the current web page does not receive the second operation, it is determined that the state of the current web page is full Foot executes time-out condition;
When the state of the current web page meets default execution time-out condition, suspend and execute the executable of the current web page Script;Wherein described execution time-out condition includes:Current web page is in invisible mode, or, the current web page is not received Continuous duration to operation is equal to preset duration;
Whether the poll using foundation on the current web page, monitor the current web page in invisible mode, bag Include:
Using the poll that sets up on the current web page, the hiding property value of the current web page document is monitored;
When the hiding property value of the current web page document is to represent the property value that hides, determine the current web page in not Visible state;
When the hiding property value of the current web page document is to represent the property value for showing, determine the current web page in can See this state.
2. processing method as claimed in claim 1, it is characterised in that the time-out executes the executable pin of the current web page After this, the processing method also includes:
When the state of the current web page meets default execution recovery condition, recover to execute the executable of the current web page Script.
3. processing method as claimed in claim 1, it is characterised in that the execution suspends condition to be included:Current web page is in During invisible mode, the execution recovers condition to be included:The current web page is converted to visible state by invisible mode.
4. processing method as claimed in claim 1, it is characterised in that the execution suspends condition to be included:The current web page When not receiving the continuous duration of operation equal to preset duration, the execution recovers condition to be included:The current web page is received Second operation.
5. a kind of processing meanss of webpage, it is characterised in that include:
Monitoring modular, for monitoring the state of current web page;
The monitoring modular includes:
Monitoring unit, for when execution time-out condition includes that current web page is in invisible mode, using in the current net The poll that sets up on page, monitors whether the current web page is in invisible mode;
Or, the monitoring modular includes:
When execution time-out condition, timing unit, for including that the current web page does not receive the continuous duration of operation equal to default During duration, at the end of the first operation to the current web page, start timing;
Determining unit, for when the duration of statistics is equal to preset duration, if the current web page does not receive the second operation, Then determine that the state of the current web page meets the execution time-out condition;
Suspend performing module, for when the state of the current web page meets default execution time-out condition, suspending and executing institute State the executable script of current web page;
The monitoring unit includes:
Monitoring subelement, for utilizing the poll that sets up on the current web page, monitors hiding for the current web page document Property value;When the hiding property value of the current web page document is to represent the property value that hides, determine at the current web page In invisible mode;When the hiding property value of the current web page document is to represent the property value for showing, determine described current Webpage is in visible state.
6. processing meanss as claimed in claim 5, it is characterised in that the processing meanss also include:
Recover performing module, for, after suspending performing module time-out and executing the executable script of the current web page, working as institute When stating the state of current web page and meeting default execution recovery condition, recover the executable script for executing the current web page.
7. a kind of terminal device, it is characterised in that terminal device includes memory, and or more than one journey Sequence, one of them or more than one program storage is in memory, and is configured to by one or more than one processor One or more than one program bag is executed containing the instruction for being used for carrying out following operation:
The state of monitoring current web page;Including:Using the poll that sets up on the current web page, the current net is monitored Whether page is in invisible mode;Or, start timing at the end of the first operation to the current web page;When statistics When length is equal to preset duration, if the current web page does not receive the second operation, it is determined that the state of the current web page is full Foot executes time-out condition;
When the state of the current web page meets default execution time-out condition, suspend and execute the executable of the current web page Script;Wherein described execution time-out condition includes:Current web page is in invisible mode, or, the current web page is not received Continuous duration to operation is equal to preset duration;
Whether the poll using foundation on the current web page, monitor the current web page in invisible mode, bag Include:
Using the poll that sets up on the current web page, the hiding property value of the current web page document is monitored;
When the hiding property value of the current web page document is to represent the property value that hides, determine the current web page in not Visible state;
When the hiding property value of the current web page document is to represent the property value for showing, determine the current web page in can See this state.
CN201310296099.XA 2013-07-15 2013-07-15 A kind of processing method of webpage, device and terminal device Active CN103336838B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310296099.XA CN103336838B (en) 2013-07-15 2013-07-15 A kind of processing method of webpage, device and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310296099.XA CN103336838B (en) 2013-07-15 2013-07-15 A kind of processing method of webpage, device and terminal device

Publications (2)

Publication Number Publication Date
CN103336838A CN103336838A (en) 2013-10-02
CN103336838B true CN103336838B (en) 2017-03-15

Family

ID=49245003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310296099.XA Active CN103336838B (en) 2013-07-15 2013-07-15 A kind of processing method of webpage, device and terminal device

Country Status (1)

Country Link
CN (1) CN103336838B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050253B (en) * 2014-06-12 2018-09-25 北京猎豹网络科技有限公司 A kind of web page display method and browser
CN105446708B (en) * 2014-07-18 2019-03-15 珠海豹趣科技有限公司 A kind of Shipping Options Page processing method, device and terminal for browser
CN105808629B (en) * 2014-12-31 2020-08-21 阿里巴巴(中国)有限公司 Webpage processing method and device
CN106126635A (en) * 2016-06-23 2016-11-16 深圳市百米生活股份有限公司 Advertising program arouses mechanism and its implementation automatically
CN106528735B (en) * 2016-10-27 2021-06-29 北京小米移动软件有限公司 Method and device for controlling browser to play media resources
CN110990730B (en) * 2018-09-29 2024-02-20 北京字节跳动网络技术有限公司 Webpage operation method and device, electronic equipment and storage medium
CN110968809B (en) * 2018-09-29 2021-08-03 北京字节跳动网络技术有限公司 Webpage processing method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1965291A (en) * 2004-04-09 2007-05-16 西门子医疗健康服务公司 System for managing operating sessions of an executable application
CN101882160A (en) * 2010-06-29 2010-11-10 宇龙计算机通信科技(深圳)有限公司 Web page management method and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8214768B2 (en) * 2007-01-05 2012-07-03 Apple Inc. Method, system, and graphical user interface for viewing multiple application windows

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1965291A (en) * 2004-04-09 2007-05-16 西门子医疗健康服务公司 System for managing operating sessions of an executable application
CN101882160A (en) * 2010-06-29 2010-11-10 宇龙计算机通信科技(深圳)有限公司 Web page management method and mobile terminal

Also Published As

Publication number Publication date
CN103336838A (en) 2013-10-02

Similar Documents

Publication Publication Date Title
CN103336838B (en) A kind of processing method of webpage, device and terminal device
JP6522164B2 (en) Information acquisition method and device
CN105681872B (en) Information interacting method and device during live streaming
CN104822090B (en) The methods, devices and systems of video playback
CN104519404B (en) The player method and device of graphic interchange format file
CN104238893B (en) A kind of method and apparatus that video preview picture is shown
CN104159140B (en) A kind of methods, devices and systems of Video processing
CN107438200A (en) The method and apparatus of direct broadcasting room present displaying
CN104869465B (en) video playing control method and device
CN105828160B (en) Video broadcasting method and device
CN105446726B (en) The method and apparatus for generating webpage
CN104142779B (en) user interface control method, device and terminal
CN103279574A (en) Method, device and terminal device for loading explorer pictures
CN103310009B (en) Method, device and terminal for updating webpage data
CN103455571A (en) Method and device for displaying picture in webpage, and terminal
CN106488296B (en) A kind of method and apparatus showing video barrage
CN104571979B (en) A kind of method and apparatus for realizing split view
CN104104711B (en) Reading histories treating method and apparatus
CN110399583A (en) Page display method, device, electronic equipment and storage medium
CN109756767A (en) Preview data playback method, device and storage medium
CN106101764A (en) A kind of methods, devices and systems showing video data
CN106454482A (en) Method and device for displaying chatting information
CN106797336A (en) The method and apparatus of history chat record displaying
CN104660769B (en) A kind of methods, devices and systems for adding associated person information
CN103458286A (en) Television channel switching method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100085 Beijing city Haidian District Qinghe Street No. 68 Huarun colorful city shopping center two floor 13

Applicant after: Xiaomi Technology Co., Ltd.

Address before: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant before: Beijing Xiaomi Technology Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant