CN109446455A - Page processing method and device - Google Patents

Page processing method and device Download PDF

Info

Publication number
CN109446455A
CN109446455A CN201811076903.2A CN201811076903A CN109446455A CN 109446455 A CN109446455 A CN 109446455A CN 201811076903 A CN201811076903 A CN 201811076903A CN 109446455 A CN109446455 A CN 109446455A
Authority
CN
China
Prior art keywords
target pages
services thread
thread
page
services
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
CN201811076903.2A
Other languages
Chinese (zh)
Other versions
CN109446455B (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.)
Alibaba China Co Ltd
Original Assignee
Guangdong Shenma Search Technology 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 Guangdong Shenma Search Technology Co Ltd filed Critical Guangdong Shenma Search Technology Co Ltd
Priority to CN201811076903.2A priority Critical patent/CN109446455B/en
Publication of CN109446455A publication Critical patent/CN109446455A/en
Application granted granted Critical
Publication of CN109446455B publication Critical patent/CN109446455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

Disclose a kind of page processing method and device.The described method includes: installing services thread (Service Worker) on target pages;So that the target pages carry out heartbeat monitoring to whether the services thread has controlled target pages;And the target pages are monitored in the case that the judgement services thread has controlled target pages by the heartbeat to services thread transmission target pages information.PWA communication mechanism based on heartbeat and delay through the invention, so that Service Worker can be saved in erection stage and using the information from the controlled page, so that it is guaranteed that corresponding function (for example, getting function ready) is complete.

Description

Page processing method and device
Technical field
The present invention relates to field of computer technology more particularly to a kind of page processing methods and device.
Background technique
In recent years, Web applies the responsibility in entire software and internet industry carrying increasingly heavier, software complexity and dimension Shield cost is higher and higher, and Web technology, especially Web client technology have welcome the development of explosion type.But Web is applied Time of cell-phone does not reach its popular degree in desk device.To find out its cause, being that client software (i.e. webpage) needs Download brought network delay;And browser is relied on as experiencing problem brought by entrance with Web application.This all makes Web APP is obtained to be in a disadvantageous position in the competition with the primary APP that static resource is stored in local and interactivity is strong, Experience Degree is high.
The appearance of the series of key techniques of Progressive Web Apps (hereinafter referred to as PWA) and composition PWA, eventually In allowing it is seen that the thorough dawn for solving Web mobile platform application problem: can significantly improve using loading velocity, even Allow web application can be in the Service Worker and Cache Storage that offline environment uses;For describing web application member Data allow web using the Web App Manifest that can be added to main screen, full frame execution as native applications;And Further increase web apply with operating system integration capability, allow web application that can initiate the Push of sending out notice when not being activated API and Notification API etc..
Among these, Service Worker (services thread) is a programmable Web worker thread.Such as Fig. 1 Shown, Service Worker can be intercepted as a Client Agent between browser and network, be handled, respond The HTTP request flowed through;Cooperation introduces Cache Storage API therewith, can freely manage the slow of HTTP request file granularity It deposits, this allows Service Worker to provide resource to web application from caching, even being also under offline environment So.
But since degree of support of each browser to PWA is different, it may cause Service Worker in Life Cycle It is interim to be likely to occur various problem, make it that can not swimmingly realize due cache management function.
Summary of the invention
In order to solve the problems, such as at least one as above, by the present invention in that the page persistently monitors the peace of Service Worker Journey is put into, so as to send its correct system to Service Worker in the first time of the Service Worker control page Page info needed for meter and/or further installation or effect, thus promotes the working efficiency and system of Service Worker Count the integrality and accuracy of information (for example, getting information ready).
According to an aspect of the present invention, it proposes a kind of page processing methods, comprising: service is installed on target pages Worker thread (Service Worker);So that whether the target pages have controlled target pages to the services thread Carry out heartbeat monitoring;And the target pages are determining that the services thread has controlled target by heartbeat monitoring Target pages information is sent to the services thread in the case where the page.
It is monitored as a result, by active heartbeat of the target pages to Service Worker state, it can be in time to Service Worker sends it and needs but in the preceding page info that can not be obtained.
Page processing method of the invention can also include: that definition is used for so that the services thread obtains the mesh The message delay for marking page info obtains function, and wherein, and the message delay obtains function and makes the target pages pair Whether the services thread has controlled target pages and has carried out heartbeat monitoring.Facilitate page object from there through delay function is defined In face of the monitoring of Service Worker.
Message delay, which obtains function, can be defined as follows at least one: the target pages letter that the services thread obtains The concrete type of breath;The target pages monitor the palmic rate whether the services thread has controlled target pages.By This facilitates the various acquisition situations of reply.Preferably, the message delay acquisition function, which can be, gets function ready for postponing to obtain Asynchronous get function ready.
Preferably, the target pages information of acquisition may include at least one following: browser mark;User's body Part mark;It is identified with target pages, to facilitate the correct effect of Service Worker.
Page processing method of the invention can also include: that definition is used for so that the services thread saves page object The page info variable of face information;In the case where the page info variable is empty, so that the target pages are persistently to institute State whether services thread has controlled target pages progress heartbeat monitoring;It and in the page info variable is not empty feelings Under condition, so that the target pages no longer carry out heartbeat monitoring to whether the services thread has controlled target pages.By This, by introducing variable, the convenient control that target pages are monitored with behavior.
Target pages can be used to determine services thread by the API for detecting that the services thread provides Target pages are controlled.Preferably, the API that services thread provides can be sw.controller.Mesh can be facilitated in this way The mark page is as above determined.
Page processing method of the invention can also include: to determine the service work in services thread installation It is applied to new under all pages under the target pages same domain name or the target pages same domain name as thread Loading page;And the services thread correspondingly controls page all under the target pages same domain name or new Loading page.As a result, page processing method of the invention can flexibly cope with network upgrade or Web applies update etc. various Critical state.
Page processing method of the invention can also include: target pages information of the services thread based on acquisition It is further operated, the operation includes at least one of following: load has cached related to the target pages information Resource;Complete the installation of the services thread;It obtains and gets information ready for statistics.Facilitate Service as a result, Worker correctly efficiently carries out subsequent operation.
According to another aspect of the present invention, a kind of Page handling device is proposed, comprising: installation unit, in mesh It marks and services thread (Service Worker) is installed on the page;Monitoring unit, for making the target pages to the clothes Whether business worker thread has controlled target pages and has carried out heartbeat monitoring;And delay acquiring unit, for making the target pages It monitors in the case that the judgement services thread has controlled target pages by the heartbeat to the services line Journey sends target pages information.
Preferably, Page handling device can also include delay function definition unit, for defining so that the service work The message delay for obtaining the target pages information as thread obtains function.Monitoring unit is then obtained using the message delay Function makes the target pages carry out heartbeat monitoring to whether the services thread has controlled target pages.Specifically, Delay function definition unit can also obtain function using the message delay and be defined as follows at least one: the services line The concrete type for the target pages information that journey obtains;The target pages monitor whether the services thread has controlled target The palmic rate of the page.Based on concrete application etc., the target pages information may include at least one following: browser mark Know;User Identity;It is identified with target pages.
Preferably, the message delay acquisition function that delay function definition unit defines can be to be beaten for postponing to obtain The asynchronous of point function gets function ready.
Preferably, Page handling device can also include page info variable-definition unit, and definition is for so that the clothes The page info variable for worker thread preservation target pages information of being engaged in.In the case where the page info variable is empty, monitor Unit can make the target pages persistently carry out heartbeat monitoring to whether the services thread has controlled target pages. In the case where the page info variable is not sky, monitoring unit then may make the target pages no longer to the service work Make whether thread has controlled target pages progress heartbeat monitoring.
Target pages can determine the services by detecting that the API that the services thread provides is available Thread has controlled target pages.The API that services thread provides can be sw.controller.
Preferably, Page handling device can also include: range confirmation unit, for installing in the services thread When determine that the services thread is applied to the page or the page object all under the target pages same domain name New loading page under the same domain name of face;And range applications unit, for making the services thread correspondingly control institute State the page all under target pages same domain name or new loading page.
Preferably, Page handling device can also include: operating device, for making the services thread be based on obtaining Target pages information further operated, the operation includes at least one of following: load is having cached with the mesh Mark the relevant resource of page info;Complete the installation of the services thread;It obtains and gets information ready for statistics.
According to a further aspect of the invention, a kind of calculating equipment is proposed, comprising: processor;And memory, thereon It is stored with executable code, when the executable code is executed by the processor, executes the processor as above any Method described in.
According to a further aspect of the invention, a kind of non-transitory machinable medium is proposed, is stored thereon with Executable code executes the processor as above any when the executable code is executed by the processor of electronic equipment Method described in.
Page processing scheme of the invention obtains the message that the page is sent using delay securing mechanism, and utilizes heartbeat inspection The message of page transmission is acknowledged receipt of, so that a kind of PWA communication mechanism based on heartbeat and delay is realized in Web application, it is above-mentioned logical Letter mechanism save Service Worker can in erection stage and using the information from the controlled page, so that it is guaranteed that Corresponding function (for example, getting function ready) it is complete.
Detailed description of the invention
Disclosure illustrative embodiments are described in more detail in conjunction with the accompanying drawings, the disclosure above-mentioned and its Its purpose, feature and advantage will be apparent, wherein in disclosure illustrative embodiments, identical reference label Typically represent same parts.
Fig. 1, which shows Service Worker, plays the role of browser.
Fig. 2 shows the flow diagrams of page processing method according to an embodiment of the invention.
Fig. 3 shows the flow diagram of page processing method in accordance with another embodiment of the present invention.
Fig. 4 shows the composition schematic diagram of Page handling device according to an embodiment of the invention.
Fig. 5 shows the knot that can be used for realizing the calculating equipment of above-mentioned page processing method according to an embodiment of the present invention Structure schematic diagram.
Specific embodiment
The preferred embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing Preferred embodiment, however, it is to be appreciated that may be realized in various forms the disclosure without the embodiment party that should be illustrated here Formula is limited.On the contrary, these embodiments are provided so that this disclosure will be more thorough and complete, and can be by the disclosure Range is completely communicated to those skilled in the art.
As it is preceding as shown in connection with fig. 1, Service Worker as a Client Agent between browser and network, It can intercept, handle, responding the HTTP request flowed through;Cooperation introduces Cache Storage API therewith, can freely manage The caching of HTTP request file granularity, even this makes under offline environment, Service Worker also can be from caching It is middle to provide resource to web application.In specifically use process, Service Worker needs are installed on the page, and And only after controlling the page, the control that the page is stored and is loaded into can be taken over.
Since degree of support of each browser to PWA is different, Service Worker may cause in life cycle In be likely to occur various problem, make it that can not swimmingly realize due cache management function, it is therefore desirable to support day Will function, by Service Worker install failure, successfully etc. information preservations are got up, to facilitate track problems.By log institute The part field needed is stored in the page, it is therefore desirable to which the page and Service Worker are communicated.But in PWA specification, page Face could only send message in the case where Service Worker has been installed and is controlled.This will lead to Service Worker Page info can not be usually obtained in installation carries out.
In practical application, there are a number of cases that Service Worker needs page info.For example, Service Worker may want to obtain the data for counting user operation behavior etc. from the page, that is, information is got ready it is desirable that obtaining, and The information of getting ready that can be reported to the page counts, to carry out data mining according to statistical result.If in Service Worker installation carry out in is got ready, acquisition be exactly field lack point, to influence to count.Therefore, how Required page info is obtained as soon as possible as problem to be solved in Service Worker installation.
For this purpose, the invention proposes a kind of page processing scheme, by making the page continue to monitor Service Worker's Erection schedule, so as to send it correctly to Service Worker in the first time of the Service Worker control page Statistics and/or further installation or effect needed for page info, thus promoted Service Worker working efficiency and The integrality and accuracy of statistical information (for example, getting information ready).
Fig. 2 shows the schematic flow charts of page processing method according to an embodiment of the invention.
In step S210, services thread (Service Worker) is installed on target pages.
In step S220, target pages carry out heartbeat monitoring to whether Service Worker has controlled target pages.
In step S230, target pages are monitored by heartbeat and have controlled the feelings of target pages in judgement Service Worker Target pages information is sent to Service Worker under condition.
Page info, and Service can not be obtained before obtaining to the control of the page for Service Worker Worker needs to obtain this dilemma of page info in the installation process for the page, by the present invention in that obtaining target pages Service Worker in installation process actively frequently monitor, can know at the first time Service Worker Control and the transmission of progress page info immediately to the page, thus promote the efficiency of Service Worker related pages processing And accuracy.
In one embodiment, the present invention can also include that definition is used for so that services thread obtains target pages letter The message delay of breath obtains function, and correspondingly in step S220, can be the message delay obtain function make it is described Target pages carry out heartbeat monitoring to whether the services thread has controlled target pages.Above- mentioned information delay obtains function It is usually defined before Service Worker is installed on objective function, and is executed in code load by browser, for example, Even if the installation with Service Worker is simultaneously or it is after the installation starts with being performed, so that target pages can open as early as possible It is dynamic that whether the heartbeat detection controlled it is obtained to Service Worker.
Preferably, message delay, which obtains function, to postpone the behaviour obtained to the page info for being related to step S220 and S230 More specifically defined.In one embodiment, message delay, which obtains function, can further be defined as follows at least one : the concrete type for the target pages information that services thread obtains;Whether target pages monitor the services thread The palmic rate of target pages is controlled.The type of target pages information may include at least one following: browser mark; User Identity;It is identified with target pages, and can also include other information according to concrete application.Message delay obtains Function can determine above-mentioned concrete type and/or monitoring palmic rate based on the purposes of empirical value and acquisition page info.
In another embodiment, message delay obtains function and can be gets the asynchronous of function ready and gets ready for postpone acquisition Function.The function of getting ready comprising page info obtained is subsequently used in accurate statistics for Service Worker.
In another embodiment, page processing method of the invention can also include: definition for so that the service Worker thread saves the page info variable of target pages information, thus, it is possible to conveniently by the shape for checking the variable itself Condition confirms the acquisition situation to page info.For example, judgement not yet obtains in the case where the page info variable is empty Page info can then make target pages persistently carry out heartbeat to whether the services thread has controlled target pages It monitors.And in the case where page info variable is not sky, then determine to have got page info, can then make mesh The mark page no longer carries out heartbeat monitoring to whether the services thread has controlled target pages.
Target pages can determine whether services thread has controlled target pages by all multipaths.In a reality It applies in example, the API that target pages can be provided by detection service worker thread is judged, if services thread provides API it is available, then determine that services thread has controlled target pages.Here, the API that services thread provides for example can be with It is sw.controller.
In general, the Service Worker of installation can be used for and the pages all under target pages same domain name Cache management.But in some cases, before the Service Worker being currently installed on, there is also still have what is come into force Service Worker.Therefore, it is necessary to the application ranges to the Service Worker newly installed to be limited.Implement at one In example, page processing method of the invention determines that services thread is application when can also be included in the installation of services thread New loading page under the target pages same domain name under all pages or target pages same domain name, then services work Make thread and correspondingly controls all pages or new loading page under the target pages same domain name.For example, can define SkipWaiting or Claim function.SkipWaiting function can make the Service Worker being currently installed on install Only the page newly-built under the domain name is controlled after the completion, and only Claim function can then make the Service being currently installed on Worker after installation is complete controls all pages under the domain name.The introducing of above-mentioned function is so that Service Worker Installation can flexibly cope with the critical states such as Website page topology update or Web APP itself version updating.
Further, Service Worker is after obtaining target pages information, can be used its carry out it is various after Continuous operation, for example including but be not limited to: the resource relevant to the target pages information that load has cached;Complete the service The installation of worker thread;It obtains and gets information ready for statistics.
Fig. 3 shows the schematic flow chart of page processing method in accordance with another embodiment of the present invention.Side shown in Fig. 3 Method can be regarded as a preferred embodiment of page processing method according to the present invention.
In step S310, on Service Worker, defined variable info, variable i nfo can be used to save The information of page client, for example get information ready.
Page was listened on Service Worker using the message mechanism of Service Worker in step S320 The message in face then initializes the variable i nfo in preceding definition if there is the information of getting ready from the page.
In step S330, Service Worker is installed and skipWaiting and/or claim function is set, so that When Service Worker is started successfully, target pages itself are also directly controlled.
In step S340, defined on Service Worker it is asynchronous get function ready, by whether having value to info, make Different strategies.If there is value, illustrates the information for successfully getting customer terminal webpage, can successfully get ready, if Void value repeats the strategy using heartbeat function
Since page client needs to give in the case where the page has been subjected to Service Worker control Service Worker sends message, therefore then in step S350, if client is checked by heartbeat Sw.controller is available, then sends Page messages.Correspondingly, if it is not then continuing heartbeat inspection.
As above having been combined attached drawing 2-3 describes page processing method according to the present invention and its preferred embodiment.It is as follows Page handling device according to the present invention and its preferred embodiment will be described in conjunction with Fig. 4-5.
Fig. 4 shows the composition schematic diagram of Page handling device according to an embodiment of the invention.As shown in figure 4, page Surface treatment device 400 may include installation unit 410, monitoring unit 420 and delay acquiring unit 430.
Specifically, installation unit 410 can be used for installing services thread (Service on target pages Worker).Monitoring unit 420 then can be used for making whether the target pages have controlled target pages to the services thread Carry out heartbeat monitoring.Delay acquiring unit 430 may be used to the target pages and monitor described in judgement by the heartbeat Services thread has controlled and has sent target pages information to the services thread in the case where target pages.
In one embodiment, Page handling device 400 can also include delay function definition unit, for define so that The message delay that the services thread obtains the target pages information obtains function.Monitoring unit 410 is then using institute Stating message delay acquisition function makes the target pages carry out the heart to whether the services thread has controlled target pages It jumps and monitors.Specifically, delay function definition unit can also obtain function using the message delay and be defined as follows at least one: The concrete type for the target pages information that the services thread obtains;The target pages monitor the services thread Whether the palmic rate of target pages has been controlled.Based on concrete application etc., the target pages information may include it is following extremely One item missing: browser mark;User Identity;It is identified with target pages.
Preferably, the message delay acquisition function that delay function definition unit defines can be to be beaten for postponing to obtain The asynchronous of point function gets function ready.
In another embodiment, Page handling device 400 can also include page info variable-definition unit, and definition is used In the page info variable for making the services thread save target pages information.It is empty in the page info variable In the case of, monitoring unit 420 can make whether the target pages have persistently controlled page object to the services thread Face carries out heartbeat monitoring.In the case where the page info variable is not sky, monitoring unit 420 then may make the page object Face no longer carries out heartbeat monitoring to whether the services thread has controlled target pages.
Target pages can determine the services by detecting that the API that the services thread provides is available Thread has controlled target pages.The API that services thread provides can be sw.controller.
In another embodiment, Page handling device 400 of the invention can also include: range confirmation unit, be used for Determine that the services thread is applied to institute under the target pages same domain name in services thread installation New loading page under some pages or the target pages same domain name;And range applications unit, for making the clothes Business worker thread correspondingly controls all pages or new loading page under the target pages same domain name.
Further, which can also include: operating device, for making the services thread Target pages information based on acquisition is further operated, and the operation includes at least one of following: what load had cached Resource relevant to the target pages information;Complete the installation of the services thread;It obtains and gets letter ready for statistics Breath.
Fig. 5 shows the knot that can be used for realizing the calculating equipment of above-mentioned page processing method according to an embodiment of the present invention Structure schematic diagram.
Referring to Fig. 5, calculating equipment 500 includes memory 510 and processor 520.
Processor 520 can be the processor of a multicore, also may include multiple processors.In some embodiments, Processor 520 may include a general primary processor and one or more special coprocessors, such as graphics process Device (GPU), digital signal processor (DSP) etc..In some embodiments, the circuit reality of customization can be used in processor 1020 It is existing, such as application-specific IC (ASIC, Application Specific Integrated Circuit) or scene Programmable gate array (FPGA, Field Programmable Gate Arrays).
Memory 510 may include various types of storage units, such as Installed System Memory, read-only memory (ROM), and forever Long storage device.Wherein, ROM can store the static data of other modules needs of processor 520 or computer or refer to It enables.Permanent storage can be read-write storage device.Permanent storage can be after computer circuit breaking not The non-volatile memory device of the instruction and data of storage can be lost.In some embodiments, permanent storage device uses Mass storage device (such as magnetically or optically disk, flash memory) is used as permanent storage.In other embodiment, permanently deposit Storage device can be removable storage equipment (such as floppy disk, CD-ROM drive).Installed System Memory can be read-write storage equipment or The read-write storage equipment of volatibility, such as dynamic random access memory.Installed System Memory can store some or all processors The instruction and data needed at runtime.In addition, memory 510 may include the combination of any computer readable storage medium, Including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read only memory), disk and/or CD can also use.In some embodiments, memory 510 may include that removable storage that is readable and/or writing is set It is standby, for example, laser disc (CD), read-only digital versatile disc (such as DVD-ROM, DVD-dual layer-ROM), read-only Blu-ray Disc, Super disc density, flash card (such as SD card, min SD card, Micro-SD card etc.), magnetic floppy disc etc..It is computer-readable to deposit It stores up medium and does not include carrier wave and the momentary electron signal by wirelessly or non-wirelessly transmitting.
It is stored with executable code on memory 510, when executable code is handled by processor 1020, can make to handle Device 520 executes the page processing method addressed above.
Page processing scheme according to the present invention above is described in detail by reference to attached drawing.Use the page of the invention Processing scheme, so that Web application realizes that a kind of PWA communication mechanism based on heartbeat and delay, above-mentioned communication mechanism can ensure Thus exact operations of the Service Worker under respective Web application scenarios improve the page cache function of Web application, from And promote the user-friendliness of Web application.
In addition, being also implemented as a kind of computer program or computer program product, the meter according to the method for the present invention Calculation machine program or computer program product include the calculating for executing the above steps limited in the above method of the invention Machine program code instruction.
Alternatively, the present invention can also be embodied as a kind of (or the computer-readable storage of non-transitory machinable medium Medium or machine readable storage medium), it is stored thereon with executable code (or computer program or computer instruction code), When the executable code (or computer program or computer instruction code) by electronic equipment (or calculate equipment, server Deng) processor execute when, so that the processor is executed each step according to the above method of the present invention.
Those skilled in the art will also understand is that, various illustrative logical blocks, mould in conjunction with described in disclosure herein Block, circuit and algorithm steps may be implemented as the combination of electronic hardware, computer software or both.
The flow chart and block diagram in the drawings show the possibility of the system and method for multiple embodiments according to the present invention realities Existing architecture, function and operation.In this regard, each box in flowchart or block diagram can represent module, a journey A part of sequence section or code, a part of the module, section or code include one or more for realizing defined The executable instruction of logic function.It should also be noted that in some implementations as replacements, the function of being marked in box can also To be occurred with being different from the sequence marked in attached drawing.For example, two continuous boxes can actually be basically executed in parallel, They can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/or stream The combination of each box in journey figure and the box in block diagram and or flow chart, can the functions or operations as defined in executing Dedicated hardware based system realize, or can realize using a combination of dedicated hardware and computer instructions.
Various embodiments of the present invention are described above, above description is exemplary, and non-exclusive, and It is not limited to disclosed each embodiment.Without departing from the scope and spirit of illustrated each embodiment, for this skill Many modifications and changes are obvious for the those of ordinary skill in art field.The selection of term used herein, purport In the principle, practical application or improvement to the technology in market for best explaining each embodiment, or make the art Other those of ordinary skill can understand each embodiment disclosed herein.

Claims (22)

1. a kind of page processing method, comprising:
Services thread (Service Worker) is installed on target pages;
The target pages carry out heartbeat monitoring to whether the services thread has controlled target pages;And
The target pages are in the case where determining that the services thread has controlled target pages by heartbeat monitoring Target pages information is sent to the services thread.
2. the method as described in claim 1, further includes:
Definition is used for so that the message delay that the services thread obtains the target pages information obtains function, and its In,
The message delay obtains function and makes whether the target pages have controlled target pages to the services thread Carry out heartbeat monitoring.
3. method according to claim 2, wherein the message delay acquisition function defines at least one of following:
The concrete type for the target pages information that the services thread obtains;
The target pages monitor the palmic rate whether the services thread has controlled target pages.
4. method according to claim 2, wherein it is to get function ready for postponing to obtain that the message delay, which obtains function, It is asynchronous to get function ready.
5. the target pages information the method for claim 1, wherein obtained includes at least one following:
Browser mark;
User Identity;With
Target pages mark.
6. the method as described in claim 1, further includes:
Definition is used for so that the services thread saves the page info variable of target pages information;
In the case where the page info variable is empty so that the target pages persistently to the services thread whether It has controlled target pages and has carried out heartbeat monitoring;And
In the case where the page info variable is not sky, so that the target pages are no longer to the services thread The no target pages that controlled carry out heartbeat monitoring.
7. the method for claim 1, wherein the target pages are by detecting what the services thread provided API can be used to determine that the services thread has controlled target pages.
8. the method for claim 7, wherein the API that the services thread provides is sw.controller.
9. the method as described in claim 1, further includes:
Determine that the services thread is to be applied to the target pages same domain name in services thread installation Under new loading page under all pages or the target pages same domain name;And
The services thread correspondingly controls all pages or new loading page under the target pages same domain name.
10. the method as described in claim 1, further includes:
The services thread is further operated based on the target pages information of acquisition, it is described operation include such as down toward One item missing:
Load the resource relevant to the target pages information cached;
Complete the installation of the services thread;
It obtains and gets information ready for statistics.
11. a kind of Page handling device, comprising:
Installation unit, for installing services thread (Service Worker) on target pages;
Monitoring unit, for making the target pages carry out heartbeat prison to whether the services thread has controlled target pages It listens;And
Postpone acquiring unit, for making the target pages determine that the services thread has been controlled by heartbeat monitoring Target pages information is sent to the services thread in the case where target pages processed.
12. device as claimed in claim 11, further includes:
Delay function definition unit, for defining so that the information that the services thread obtains the target pages information is prolonged Function is obtained late, and wherein,
The monitoring unit obtains function using the message delay and the target pages is made to be to the services thread The no target pages that controlled carry out heartbeat monitoring.
13. device as claimed in claim 12, wherein the delay function definition unit is also obtained using the message delay Function defines at least one of following:
The concrete type for the target pages information that the services thread obtains;
The target pages monitor the palmic rate whether the services thread has controlled target pages.
14. device as claimed in claim 12, wherein the message delay that the delay function definition unit defines obtains Function is to get the asynchronous of function ready for postponing to obtain and get function ready.
15. device as claimed in claim 11, wherein the target pages information of acquisition includes at least one following:
Browser mark;
User Identity;With
Target pages mark.
16. device as claimed in claim 11, further includes:
Page info variable-definition unit, definition is used for so that the services thread saves the page letter of target pages information Variable is ceased, and
In the case where the page info variable is empty, the monitoring unit makes the target pages persistently to the service Whether worker thread has controlled target pages and has carried out heartbeat monitoring;And
In the case where the page info variable is not sky, the monitoring unit makes the target pages no longer to the clothes Whether business worker thread has controlled target pages and has carried out heartbeat monitoring.
17. device as claimed in claim 11, wherein the target pages are by detecting that the services thread provides API can be used to determine that the services thread has controlled target pages.
18. device as claimed in claim 17, wherein the API that the services thread provides is sw.controller.
19. device as claimed in claim 11, further includes:
Range confirmation unit, for determining that the services thread is applied to described in services thread installation New loading page under target pages same domain name under all pages or the target pages same domain name;And
Range applications unit, it is all under the target pages same domain name for controlling the services thread correspondingly The page or new loading page.
20. device as claimed in claim 11, further includes:
Operating device, for operating the services thread further based on the target pages information of acquisition, institute It includes at least one of following for stating operation:
Load the resource relevant to the target pages information cached;
Complete the installation of the services thread;
It obtains and gets information ready for statistics.
21. a kind of calculating equipment, comprising:
Processor;And
Memory is stored thereon with executable code, when the executable code is executed by the processor, makes the processing Device executes the method as described in any one of claims 1 to 10.
22. a kind of non-transitory machinable medium, is stored thereon with executable code, when the executable code is electric When the processor of sub- equipment executes, the processor is made to execute the method as described in any one of claims 1 to 10.
CN201811076903.2A 2018-09-14 2018-09-14 Page processing method and device Active CN109446455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811076903.2A CN109446455B (en) 2018-09-14 2018-09-14 Page processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811076903.2A CN109446455B (en) 2018-09-14 2018-09-14 Page processing method and device

Publications (2)

Publication Number Publication Date
CN109446455A true CN109446455A (en) 2019-03-08
CN109446455B CN109446455B (en) 2021-07-13

Family

ID=65530946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811076903.2A Active CN109446455B (en) 2018-09-14 2018-09-14 Page processing method and device

Country Status (1)

Country Link
CN (1) CN109446455B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008050A (en) * 2019-12-06 2020-04-14 北京小米移动软件有限公司 Page task execution method, device, terminal and storage medium
CN112631860A (en) * 2020-12-21 2021-04-09 常州微亿智造科技有限公司 Industrial Internet of things data transmission Worker service monitoring method and device
CN113127239A (en) * 2019-12-31 2021-07-16 深圳云天励飞技术有限公司 Page state monitoring method, device, terminal and storage medium
EP3737108B1 (en) 2019-05-10 2021-08-25 JT International S.A. Configuring a personal computing device for communication with an aerosol generation device
US11864597B2 (en) 2019-05-10 2024-01-09 Jt International S.A. Configuring a personal computing device for communication with an aerosol generation device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102375758A (en) * 2010-08-20 2012-03-14 联芯科技有限公司 Method and device for preventing apparent death of browser of mobile communication equipment
US20170006128A1 (en) * 2015-06-26 2017-01-05 Cloudflare, Inc. Method and apparatus for reducing loading time of web pages
CN108280113A (en) * 2017-07-13 2018-07-13 广州市动景计算机科技有限公司 Service Worker control methods, device and electric terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102375758A (en) * 2010-08-20 2012-03-14 联芯科技有限公司 Method and device for preventing apparent death of browser of mobile communication equipment
US20170006128A1 (en) * 2015-06-26 2017-01-05 Cloudflare, Inc. Method and apparatus for reducing loading time of web pages
CN108280113A (en) * 2017-07-13 2018-07-13 广州市动景计算机科技有限公司 Service Worker control methods, device and electric terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3737108B1 (en) 2019-05-10 2021-08-25 JT International S.A. Configuring a personal computing device for communication with an aerosol generation device
US11864597B2 (en) 2019-05-10 2024-01-09 Jt International S.A. Configuring a personal computing device for communication with an aerosol generation device
CN111008050A (en) * 2019-12-06 2020-04-14 北京小米移动软件有限公司 Page task execution method, device, terminal and storage medium
CN111008050B (en) * 2019-12-06 2023-11-28 北京小米移动软件有限公司 Page task execution method, device, terminal and storage medium
CN113127239A (en) * 2019-12-31 2021-07-16 深圳云天励飞技术有限公司 Page state monitoring method, device, terminal and storage medium
CN112631860A (en) * 2020-12-21 2021-04-09 常州微亿智造科技有限公司 Industrial Internet of things data transmission Worker service monitoring method and device

Also Published As

Publication number Publication date
CN109446455B (en) 2021-07-13

Similar Documents

Publication Publication Date Title
CN109446455A (en) Page processing method and device
US11055169B2 (en) Forecasting workload transaction response time
US10095598B2 (en) Transaction server performance monitoring using component performance data
US8782215B2 (en) Performance testing in a cloud environment
US9389936B2 (en) Monitoring the responsiveness of a user interface
EP3579110A1 (en) Performance testing platform that enables reuse of automation scripts and performance testing scalability
US10789111B2 (en) Message oriented middleware with integrated rules engine
US10127093B1 (en) Method and apparatus for monitoring a message transmission frequency in a robot operating system
CN111813635A (en) Monitoring method, system and device for intelligent contracts of block chains
CN111400294B (en) Data anomaly monitoring method, device and system
CN112416562A (en) Method and device for distributed task scheduling engine
CN109714214B (en) Server exception handling method and management equipment
EP3724776A1 (en) Method, function manager and arrangement for handling function calls
US11671317B2 (en) Objective driven dynamic object placement optimization
US20230053592A1 (en) Performance profiler of third party automations
CN107797915B (en) Fault repairing method, device and system
CN112463514A (en) Monitoring method and device for distributed cache cluster
JP6884076B2 (en) Information processing equipment and computer programs
CN113132143B (en) Service call tracing method and related product
US10491650B1 (en) Monitoring performance of computing devices
CN111444008B (en) Inter-cluster service migration method and device
CN106649035A (en) Page resource element monitoring method and device and monitoring server
CN116737496A (en) Information processing method, information processing device, electronic equipment and storage medium
CN115277370A (en) Method, device and equipment for determining root cause node of operation and maintenance system
CN111447118A (en) Data transmission method and device based on data transmission stream

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
TA01 Transfer of patent application right

Effective date of registration: 20200810

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping square B radio tower 13 layer self unit 01

Applicant before: Guangdong Shenma Search Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant