CN105867984B - The method of show task status, device, client and mobile device in webpage - Google Patents

The method of show task status, device, client and mobile device in webpage Download PDF

Info

Publication number
CN105867984B
CN105867984B CN201610262081.1A CN201610262081A CN105867984B CN 105867984 B CN105867984 B CN 105867984B CN 201610262081 A CN201610262081 A CN 201610262081A CN 105867984 B CN105867984 B CN 105867984B
Authority
CN
China
Prior art keywords
task
webpage
client
communication object
task status
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
CN201610262081.1A
Other languages
Chinese (zh)
Other versions
CN105867984A (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.)
Guangzhou Alibaba Literature Information Technology Co Ltd
Original Assignee
Guangzhou Alibaba Literature Information 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 Guangzhou Alibaba Literature Information Technology Co Ltd filed Critical Guangzhou Alibaba Literature Information Technology Co Ltd
Priority to CN201610262081.1A priority Critical patent/CN105867984B/en
Publication of CN105867984A publication Critical patent/CN105867984A/en
Application granted granted Critical
Publication of CN105867984B publication Critical patent/CN105867984B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The embodiment of the present application provides a kind of method, device, client and the mobile device of the show task status in webpage, and this method includes:A webpage is loaded in the client, and there is the first communication object in the client, there is the second communication object in the webpage;First communication object is called in the webpage, the task status information of specifying for task is fed back to notify the client to start;Second communication object is called in the client, the task status information listened to when performing the task is sent to the webpage;The task status information is shown in the webpage.The embodiment of the present application, which is avoided, calls port deactivation service, and then solve the problem of other processes of influence caused by taking port or service, and, resource occupation caused by taking port and opening service is more, obtains lifting progress or stability, the effect of reduction system resources consumption rate of service.

Description

The method of show task status, device, client and mobile device in webpage
Technical field
The application is related to the technical field of computer disposal, more particularly to a kind of side of the show task status in webpage Method, a kind of device of the show task status in webpage, a kind of client of show task status in webpage and one kind movement Equipment.
Background technology
With the development of science and technology, the electronic equipment such as mobile phone, tablet personal computer, intelligent watch is widely available, in people Life, study, work in application it is more and more.
In order to meet the various demands of user, such as reading, session, user often install many clients in systems End, such as E-book reader, immediate communication tool.
By taking the client of Android (Android) system as an example, these clients would generally be configured with WebView controls, use To show the online content of webpage or display application, for example, showing online books introduction in E-book reader, shortly When communication tool in show webpage etc..
Some tasks are often triggered in webpage, such as downloads, communicate, these tasks would generally transfer to client to hold OK, because client can only typically control WebView width high in itself, the control of loading in WebView, client can not be direct Modification, and webpage is notified by indirect method, then webpage goes to change the information of webpage itself display, removes the shape of display task State.
At present, client is to call one service of a port deactivation in the electronic device mostly, logical by the service The state of Hownet page task.
But, the port number in electronic equipment is limited, may be to other processes if the long period takes some port Or the influence that service is caused, also, the long period takes some port and unlatching is serviced, and takes internal memory, the CPU of electronic equipment Resources such as (Central Processing Unit, central processing unit) is more.
The content of the invention
The embodiment of the present application provides a kind of method, device, client and the mobile device of the show task status in webpage, To solve influence other processes or service, resource occupation is more the problem of.
In order to solve the above problems, the embodiment of the present application discloses a kind of method of the show task status in webpage, bag Include:
A webpage is loaded in the client, and there is the first communication object in the client, have in the webpage Second communication object;
First communication object is called in the webpage, specifying for task is fed back to notify the client to start Task status information;
Second communication object is called in the client, the task shape that will be listened to when performing the task State information is sent to the webpage;
The task status information is shown in the webpage.
Preferably, the client has Web page-container;It is described to include the step of load a webpage in the client:
There is the webpage of the second communication object by loading one in the Web page-container;
The first preset communication object is injected into the Web page-container.
Preferably, in first communication object there is task status to monitor registration interface;
It is described that first communication object is called in the webpage, feed back times specified to notify the client to start The step of task status information of business, includes:
Obtain the task identification of specifying for task;
Call the task status to monitor registration interface, the task identification is sent to the client, to notify Client is stated to start to feed back the task status information of the corresponding task of the task identification.
Preferably, second communication object has task status more new interface;
It is described that second communication object is called in the client, by appointing for being listened to when performing the task The step of business status information is sent to the webpage includes:
The task status more new interface is called by Web page-container, will be in the corresponding task of the execution task identification The task status information listened to is sent to the webpage.
Preferably, in addition to:
First communication object is called in the webpage, appointing for the task is fed back to notify the client to stop Business status information.
Preferably, there is task status to monitor solution registration interface in first communication object;
It is described that the communication object is called in the webpage, feed back appointing for the task to notify the client to stop The step of business status information, includes:
Call the task status to monitor solution registration interface, send the task identification of the task to the client, To notify the client to stop feeding back the task status information of the corresponding task of the task identification.
Preferably, the Web page-container includes Webview controls, and first communication object includes JS scripting objects, institute Stating the second communication object includes JS scripting objects.
The application implements to also disclose a kind of device of the show task status in webpage, including:
Webpage load-on module, for loading a webpage in the client, in the client have the first communication object, There is the second communication object in the webpage;
Task monitors Registering modules, for calling first communication object in the webpage, to notify the client End starts to feed back the task status information of specifying for task;
Task status information feedback module, for calling second communication object in the client, will hold The task status information listened to during the row task is sent to the webpage;
Task status information display module, for showing the task status information in the webpage.
Preferably, the client has Web page-container;The webpage load-on module includes:
Web page-container loads submodule, for having the net of the second communication object by loading one in the Web page-container Page;
Communication object injects submodule, for the first preset communication object to be injected into the Web page-container.
Preferably, in first communication object there is task status to monitor registration interface;
The task, which monitors Registering modules, to be included:
Task identification acquisition submodule, the task identification for obtaining specifying for task;
Task status monitors registration interface and calls submodule, for calling the task status to monitor registration interface, by institute Task identification is stated to send to the client, feed back appointing for the corresponding task of the task identification to notify the client to start Business status information.
Preferably, second communication object has task status more new interface;
The task status information feedback module includes:
Task status updates interface interchange submodule, for calling the task status more new interface by Web page-container, The task status information listened in the corresponding task of the execution task identification is sent to the webpage.
Preferably, in addition to:
Task monitors solution Registering modules, for calling first communication object in the webpage, to notify the visitor Family end stops the task status information of the feedback task.
Preferably, there is task status to monitor solution registration interface in first communication object;
The task, which monitors solution Registering modules, to be included:
Task status monitors solution registration interface and calls submodule, for call the task status monitor solution registration interface, The task identification of the task is sent to the client, the task identification correspondence is fed back to notify the client to stop Task task status information.
Preferably, the Web page-container includes Webview controls, and first communication object includes JS scripting objects, institute Stating the second communication object includes JS scripting objects.
The embodiment of the present application also discloses a kind of client of the show task status in webpage, has in the client There is the first communication object, the client includes:
Webpage load-on module, for loading a webpage;There is task processing assembly and the second communication object in the webpage;
Task status information feedback module, for calling second communication object, will be supervised when performing the task The task status information heard is sent to the webpage;
The task processing assembly includes:
Task monitors Registering modules, for calling first communication object, to notify the client starts feedback to refer to The task status information of fixed task;
Task status information display module, for showing the task status information.
Preferably, the client has Web page-container;The webpage load-on module can include following submodule:
Web page-container loads submodule, for having the net of the second communication object by loading one in the Web page-container Page;
Communication object injects submodule, for the first preset communication object to be injected into the Web page-container.
Preferably, in first communication object there is task status to monitor registration interface;
The task, which monitors Registering modules, to be included:
Task identification acquisition submodule, the task identification for obtaining specifying for task;
Task status monitors registration interface and calls submodule, for calling the task status to monitor registration interface, by institute Task identification is stated to send to the client, feed back appointing for the corresponding task of the task identification to notify the client to start Business status information.
Preferably, second communication object has task status more new interface;
The task status feedback module can include following submodule:
Task status update interface interchange submodule, for by Web page-container call the task status more new interface, The task status information listened to when performing the task is fed back into the webpage.
Preferably, the task processing assembly also includes:
Task monitors solution Registering modules, for calling first communication object, to notify the client to stop feeding back The task status information of the task.
Preferably, there is task status to monitor solution registration interface in first communication object;
The task, which monitors solution Registering modules, can include following submodule:
Task status monitors solution registration interface and calls submodule, for call the task status monitor solution registration interface, The task identification of the task is sent to the client, the task identification correspondence is fed back to notify the client to stop Task task status information.
Preferably, the Web page-container includes Webview controls, and first communication object includes JS scripting objects, institute Stating the second communication object includes JS scripting objects.
The embodiment of the present application also discloses a kind of mobile device, including:
Webpage load-on module, for loading a webpage in the client, in the client have the first communication object, There is the second communication object in the webpage;
Task monitors Registering modules, for calling first communication object in the webpage, to notify the client End starts to feed back the task status information of specifying for task;
Task status information feedback module, for calling second communication object in the client, will hold The task status information listened to during the row task is sent to the webpage;
Task status information display module, for showing the task status information in the webpage.
Preferably, the client has Web page-container;The webpage load-on module includes:
Web page-container loads submodule, for having the net of the second communication object by loading one in the Web page-container Page;
Communication object injects submodule, for the first preset communication object to be injected into the Web page-container.
Preferably, in first communication object there is task status to monitor registration interface;
The task, which monitors Registering modules, to be included:
Task identification acquisition submodule, the task identification for obtaining specifying for task;
Task status monitors registration interface and calls submodule, for calling the task status to monitor registration interface, by institute Task identification is stated to send to the client, feed back appointing for the corresponding task of the task identification to notify the client to start Business status information.
Preferably, second communication object has task status more new interface;
The task status information feedback module includes:
Task status updates interface interchange submodule, for calling the task status more new interface by Web page-container, The task status information listened in the corresponding task of the execution task identification is sent to the webpage.
Preferably, in addition to:
Task monitors solution Registering modules, for calling first communication object in the webpage, to notify the visitor Family end stops the task status information of the feedback task.
Preferably, there is task status to monitor solution registration interface in first communication object;
The task, which monitors solution Registering modules, to be included:
Task status monitors solution registration interface and calls submodule, for call the task status monitor solution registration interface, The task identification of the task is sent to the client, the task identification correspondence is fed back to notify the client to stop Task task status information.
Preferably, the Web page-container includes Webview controls, and first communication object includes JS scripting objects, institute Stating the second communication object includes JS scripting objects.
The embodiment of the present application includes advantages below:
The embodiment of the present application is called by configuring the first communication object in client for webpage, and second is configured in webpage and is led to Letter object supplies client call, realizes the communication between client and webpage so that in task implementation procedure, web page notification Client is monitored task, the processing state of client feedback task, and then is shown in webpage, it is to avoid call port Deactivation is serviced, and then is solved the problem of other processes of influence caused by taking port or service, and, because taking port The resource occupation caused with the service of unlatching is more, obtains lifting progress or stability, the reduction system resources consumption rate of service Effect.
The first communication object can be called to notify client to stop monitoring task in the webpage of the embodiment of the present application, Improve the practicality of task monitoring.
Brief description of the drawings
Fig. 1 is a kind of step flow chart of the embodiment of the method 1 of show task status in webpage of the application;
Fig. 2A to Fig. 2 B is a kind of exemplary plot of download progress that e-book is shown in webpage of the embodiment of the present application;
Fig. 3 is a kind of step flow chart of the embodiment of the method 2 of show task status in webpage of the application;
Fig. 4 is a kind of structured flowchart of the device embodiment 1 of show task status in webpage of the application;
Fig. 5 is a kind of structured flowchart of the device embodiment 2 of show task status in webpage of the application;
Fig. 6 is a kind of structured flowchart of the client embodiment of show task status in webpage of the application;
Fig. 7 is a kind of structural representation of mobile device of the application.
Embodiment
It is below in conjunction with the accompanying drawings and specific real to enable above-mentioned purpose, the feature and advantage of the application more obvious understandable Mode is applied to be described in further detail the application.
Reference picture 1, shows a kind of step flow of the embodiment of the method 1 of show task status in webpage of the application Figure, specifically may include steps of:
Step 101, a webpage is loaded in the client;
The embodiment of the present application can be applied in various mobile devices, for example, mobile phone, tablet personal computer, personal digital assistant, Wearable device (such as glasses, wrist-watch) etc., can also be applied in various fixing equipments, for example, intelligent television, PC Etc..
These mobile devices, fixing equipment operating system can include Android, IOS, Windows Phone, Windows etc., can install various clients, such as E-book reader, immediate communication tool in such systems, can be with Show webpage or online content.
In the specific implementation, client has the container of Web page-container, i.e. loading and displayed web page.
For example, in Android, IOS system, the Web page-container can include WebView controls, in Windows systems In, the Web page-container can include WebBrowser controls etc..
To make those skilled in the art more fully understand the embodiment of the present application, in this manual, WebView is regard as net A kind of example of page container is illustrated.
In android system, WebView is the view of Java layers of WebKit modules (browsing device net page typesetting engine) Class, the network money that the view object showed and handled request can be created using the Android application programs of web browsing function Source.
At present, WebKit modules support HTTP (Hypertext transfer protocol, HTTP), (Hyper Text Transfer Protocol over Secure Socket Layer, are using safety as target to HTTPS HTTP passages), FTP (File Transfer Protoco, FTP) and JS (JavaScript, a kind of literal translation formula Script) request.
WebView is as UI (User Interface, user interface) interface of application program, and having provided the user one is The web page browsing of row, user mutual interface, CLIENT PROGRAM access WebKit core codes by these interfaces.
In one embodiment of the application, step 101 can include following sub-step:
Sub-step S11, has the webpage of the second communication object by loading one in the Web page-container;
In the embodiment of the present application, Web page-container can load and show a webpage, by taking WebView as an example, generally may be used Webpage is loaded with the following method to adopt:
First method:
1st, WebView components are instantiated in Activity is wanted:WebView webView=new WebView (this);
2nd, by webview.loadUrl (url) method, the WevView webpages to be shown are set;
Wherein, the webpage can be webpage (such as http on network://www.**.cn, * * are domain name) or this Webpage (such as file on ground://sdcard/uc/a.html), it can also be the current webpage JS methods loaded (such as javascript:Window.alert ()), etc., the embodiment of the present application is not any limitation as to this.
3rd, Activity setContentView () method is called to show webpage view;
4th, seen after many pages to allow WebView to support Backward Function, can covered with the link of WebView points OnKeyDown () method of Activity classes;
5th, authority is added in AndroidManifest.xml files, Web page not otherwise occur Available mistakes.
Second method:
1st, WebView is stated in topology file;
2nd, WebView is instantiated in Activity;
3rd, WebView loadUrl () method is called, the WevView webpages to be shown are set;
4th, in order to allow WebView to respond hyperlink connection function, setWebViewClient () method is called, is set WebView views;
5th, seen after many pages to allow WebView to support Backward Function, can covered with the link of WebView points OnKeyDown () method of Activity classes;
6th, authority is added in AndroidManifest.xml files, Web page not available otherwise occurs Mistake.
Certainly, above-mentioned webpage loading method is intended only as example, can be according to actual feelings when implementing the embodiment of the present application Condition sets other webpage loading methods, and the embodiment of the present application is not any limitation as to this.In addition, except above-mentioned webpage loading method Outside, those skilled in the art can also use other webpage loading methods according to actual needs, the embodiment of the present application to this not yet It is any limitation as.
Webpage, its essence can be HTML (HyperText Markup Language, HyperText Markup Language) texts Shelves, have task processing assembly and the second communication object in the webpage.
Wherein, the task processing assembly is the module of the task in processing webpage, and the second communication object is to be integrated with to net The data object for the interface (or method) that page is communicated, for example, second communication object includes JS scripting objects.
For example, the JS objects are used to update download progress to webpage, then the JS scripting objects can be as follows:
WebDealer.taskUpdate (String json) // update progress }
In the embodiment of the present application, the second communication object is loaded in webpage, can be called by client by Web page-container Perform (realization side is webpage, and user is client).
Sub-step S12, the Web page-container is injected by the first preset communication object;
In the embodiment of the present application, the first communication object is prefixed in client, that is, is integrated with to client and is communicated Interface (or method) data object, for example, first communication object can include JS scripting objects.
Client can state the first communication object, be supplied to webpage to call the first communication object by way of registration Perform (realization side is client, and user is webpage).
Furthermore, the operation of Web page-container registration interface (or method) is passed through, it is possible to achieve webpage calls client This interface (or method) realized in end.
By taking WebView as an example, it can adjust and inject JS objects with the following method for WebView:
webview.addJavascriptInterface(new JavaScriptInterface(), InterfaceName);
The webpage loaded in WebView is allowd to call the method in JavaScriptInterface classes.
For example, webView.addJavascriptInterface (new TaskJavaScript (), " appTask ");
Wherein, first parameter " new TaskJavaScript () " is the class created in client, therein to connect Mouth is used for using to webpage, can be called JS objects;Second parameter " appTask " is the name of first parameter, client It can customize, webpage can pass through this name call JS objects.
Step 102, first communication object is called in the webpage, to notify the client starts feedback to specify Task task status information;
In the specific implementation, user can trigger the startup of task in webpage by clicking on the modes such as control, work as detection To task startup when, then can call the first communication object notify client start feed back the task task status information.
Certainly, client can also continue to monitor to task, start to feed back appointing for the task in current scene Business status information.
It should be noted that in different types of client, with different types of task, under can specifically including Load, file decompression, picture processing, network service, database access etc..
For example, as shown in Figure 2 A, in client, client control 201 can be loaded, webpage 202 can also be shown, in net Download control 203 is loaded with page 202, if user clicks on the download control 203, the downloading e-book of the task can be triggered.
In the embodiment of the present application, in the client with the first communication object, because the processing of many tasks needs consumption Take the regular hour, for convenience user monitoring, webpage can call first communication object to notify client to the place of task Reason state is monitored.
In one embodiment of the application, in the first communication object there is task status to monitor registration interface, the task Status monitoring registration interface can be used for the monitoring to client registers task.
For example, the task status, which monitors registration interface, can be defined as registerTask (String data), wherein, The related parameter of definable task processing state in data.
Certainly, the task status, which monitors registration interface, can also be defined as other titles, and the embodiment of the present application is not added with to this To limit.
In the embodiment of the present application, step 102 can include following sub-step:
Sub-step S21, obtains the task identification of specifying for task;
Task identification can refer to represent the information of uniquely determining for a task, if the property of pre-defined task (as downloaded e-book), then can be used as task identification, mark using the information (such as e-book ID) for dealing with objects (such as e-book) Being performed to the process object for task.
If in the specific implementation, the task identification of the task exists in itself in the data of webpage, such as e-book ID then can be with In local web data search, certainly, the task identification of the task can also be generated in real time, the embodiment of the present application to this not It is any limitation as.
Sub-step S22, calls the task status to monitor registration interface, the task identification is sent to the client End, the task status information for feeding back to notify the client to start the corresponding task of the task identification.
In the embodiment of the present application, webpage can to client registers task monitoring, it is desirable to client feedback task shape The change of state.
For example, e-book ID to be monitored to registration interface registerTask () parameter as task status, visitor is transferred to Family end, can register the monitoring for the downloading e-book (e-book ID marks) of the task:
registerTask(‘{‘bookID’:‘12345’}’)
Wherein, 12345 be e-book ID (bookID).
Step 103, second communication object is called in the client, will be listened to when performing the task Task status information send to the webpage;
Client is received after the task of webpage requirement monitoring, and the processing state to the task is monitored, if detection Processing state to the task changes, then can notify webpage.
In the embodiment of the present application, there is the second communication object in webpage, then client can call the second communication pair As, by when performing the task task status information that listens to feed back to webpage.
In one embodiment of the application, the second communication object has task status more new interface, and the task status is more New interface can be used for the processing state to webpage more new task.
For example, the task status more new interface can be defined as updatePercent (String data), wherein, data The related parameter of the processing state of middle definable task.
Certainly, the task status more new interface can also be defined as other titles, and the embodiment of the present application is not limited this System.
Then in the embodiment of the present application, the task status more new interface is called by Web page-container, will be described in execution The task status information listened to during the corresponding task of task identification is sent to the webpage.
Comparatively, webpage can receive it is that client is returned by Web page-container calling task state more new interface, Perform the task status information listened to during the corresponding task of task identification.
Wherein, task status information can be the information of the processing state of record task, such as download progress.
Using the download progress of e-book as the example of task status information, if webpage sends e-book ID to client End, then client can obtain the download address of the corresponding e-book of e-book ID to server, be downloaded from the download address The e-book.
Client can obtain contentlength parameters by the header information (header) of HTTP request, i.e., electric The total bytes of the philosophical works.
When downloading, the byte data in inputstream parameters is read by http response, circulation is write locally, often One cycle is completed, the total bytes locally having been written into and the total bytes of e-book can be taken to be divided by and obtain a percentage, It is exactly download progress.
For example, e-book ID and download progress are passed as task status more new interface updatePercent () parameter Webpage is handed to, the download progress to e-book is updated:
updatePercent(‘{‘bookID’:’12345’,’percent’:‘3’}’)
Wherein, 12345 be e-book ID (bookID), and percen is percentage, and 3 be download progress, represents download progress For 3%.
Step 104, the task status information is shown in the webpage.
If webpage obtains task status information, UI dispaly state can be changed according to the task status information.
For example, as shown in Figure 2 B, download control 203 as shown in Figure 2 A can be adjusted to download progress and show control 204, if the download progress of e-book is 3%, can in download progress shows control 204 display " 3% " text in download This, and, adjustment download progress shows that the background of control 204 is waveform, in pointing out e-book to download.
The embodiment of the present application is called by configuring the first communication object in client for webpage, and second is configured in webpage and is led to Letter object supplies client call, realizes the communication between client and webpage so that in task implementation procedure, web page notification Client is monitored task, the processing state of client feedback task, and then is shown in webpage, it is to avoid call port Deactivation is serviced, and then is solved the problem of other processes of influence caused by taking port or service, and, because taking port The resource occupation caused with the service of unlatching is more, obtains lifting progress or stability, the reduction system resources consumption rate of service Effect.
Reference picture 3, shows a kind of step flow of the embodiment of the method 2 of show task status in webpage of the application Figure, specifically may include steps of:
Step 301, a webpage is loaded in the client;
Wherein, there is the second communication object in the client has the first communication object, the webpage;
Step 302, first communication object is called in the webpage, to notify the client starts feedback to specify Task task status information;
Step 303, second communication object is called in the client, will be listened to when performing the task Task status information send to the webpage;
Step 304, the task status information is shown in the webpage;
Step 305, first communication object is called in the webpage, to notify the client stops feedback described The task status information of task.
In the specific implementation, there is the label of hyperlink in the html document of webpage, user can pass through clickable hyperlinks etc. Mode jumps to other pages.
Be loaded with the Web page-containers such as WebView a new web page URL (Uniform Resource Locator, URL), it is meant that it have left the webpage for the processing state for being currently needed for displaying task.
In the embodiment of the present application, in the client with the first communication object, webpage can call first communication pair As notifying client to release the notice readjustment of the processing state of current task, stop feeding back task status information to webpage.
Now, client can stop monitoring the task, and persistently the task can also be monitored, for Other scenes, the embodiment of the present application is not any limitation as to this.
There is task status to monitor solution registration interface in one embodiment of the application, in the first communication object, this Business status monitoring registration interface can be used for the registration that the monitoring of task is released to client.
For example, the task status, which monitors registration interface, can be defined as unRegisterTask (String data), its In, the related parameter of definable task processing state in data.
Certainly, the task status, which monitors registration interface, can also be defined as other titles, and the embodiment of the present application is not added with to this To limit.
In the embodiment of the present application, webpage can be with calling task status monitoring solution registration interface, the task identification by task Send to client, notify client to stop monitoring the corresponding task of task identification.
For example, e-book ID is monitored to solution registration interface unRegisterTask () parameter as task status, transmission To client, the monitoring of the task to downloading e-book (e-book ID marks) can be stopped:
unRegisterTask(‘{‘bookID’:‘12345’}’)
Wherein, 12345 be e-book ID (bookID).
The task status of client is monitored solution registration interface and is called, the task identification come according to transmission, client stopping The task status information of the corresponding task of the task identification feeds back to the operation of webpage.
The first communication object can be called to notify client to stop monitoring task in the webpage of the embodiment of the present application, Improve the practicality of task monitoring.
It should be noted that for embodiment of the method, in order to be briefly described, therefore it to be all expressed as to a series of action group Close, but those skilled in the art should know, the embodiment of the present application is not limited by described sequence of movement, because according to According to the embodiment of the present application, some steps can be carried out sequentially or simultaneously using other.Secondly, those skilled in the art also should Know, embodiment described in this description belongs to preferred embodiment, involved action not necessarily the application is implemented Necessary to example.
Reference picture 4, shows a kind of structural frames of the device embodiment 1 of show task status in webpage of the application Figure, can specifically include following module:
Webpage load-on module 401, for loading a webpage in the client, has the first communication pair in the client As, in the webpage have the second communication object;
Task monitors Registering modules 402, for calling first communication object in the webpage, to notify the visitor Family end starts to feed back the task status information of specifying for task;
Task status information feedback module 403, will be for calling second communication object in the client The task status information listened to during the task is performed to send to the webpage;
Task status information display module 404, for showing the task status information in the webpage.
In one embodiment of the application, the client has Web page-container;The webpage load-on module 401 can be with Including following submodule:
Web page-container loads submodule, for having the net of the second communication object by loading one in the Web page-container Page;
Communication object injects submodule, for the first preset communication object to be injected into the Web page-container.
In one embodiment of the application, in first communication object there is task status to monitor registration interface;
The task, which monitors Registering modules 402, can include following submodule:
Task identification acquisition submodule, the task identification for obtaining specifying for task;
Task status monitors registration interface and calls submodule, for calling the task status to monitor registration interface, by institute Task identification is stated to send to the client, feed back appointing for the corresponding task of the task identification to notify the client to start Business status information.
In one embodiment of the application, second communication object has task status more new interface;
The task status information feedback module 403 can include following submodule:
Task status updates interface interchange submodule, for calling the task status more new interface by Web page-container, The task status information listened in the corresponding task of the execution task identification is sent to the webpage.
In the specific implementation, the Web page-container can include Webview controls, first communication object can include JS scripting objects, second communication object can include JS scripting objects.
Reference picture 5, shows a kind of structural frames of the device embodiment 2 of show task status in webpage of the application Figure, can specifically include following module:
Webpage load-on module 501, for loading a webpage in the client, has the first communication pair in the client As, in the webpage have the second communication object;
Task monitors Registering modules 502, for calling first communication object in the webpage, to notify the visitor Family end starts to feed back the task status information of specifying for task;
Task status information feedback module 503, will be for calling second communication object in the client The task status information listened to during the task is performed to send to the webpage;
Task status information display module 504, for showing the task status information in the webpage;
Task monitors solution Registering modules 505, for calling first communication object in the webpage, described to notify Client stops the task status information of the feedback task.
There is task status to monitor solution registration interface in one embodiment of the application, in first communication object;
The task, which monitors solution Registering modules 505, can include following submodule:
Task status monitors solution registration interface and calls submodule, for call the task status monitor solution registration interface, The task identification of the task is sent to the client, the task identification correspondence is fed back to notify the client to stop Task task status information.
Reference picture 6, shows a kind of structural frames of the client embodiment of show task status in webpage of the application Figure, has the first communication object 610 in the client 600;
In addition, the client 600 can include following module:
Webpage load-on module 620, for loading a webpage;In the webpage there is task processing assembly 630 and second to lead to Believe object 640;
Task status feedback module 650, will be when performing the task for calling second communication object 640 The task status information listened to is sent to the webpage;
The task processing assembly 630 can include following module:
Task monitors Registering modules 631, for calling first communication object 610, to notify the client 600 to open The task status information for the task that the feedback that begins is specified;
Task status information display module 632, for showing the task status information.
In one embodiment of the application, the client 600 has Web page-container;The webpage load-on module 612 Following submodule can be included:
Web page-container loads submodule, for having the second communication object 640 by loading one in the Web page-container Webpage;
Communication object injects submodule, for the first preset communication object 610 to be injected into the Web page-container.
In one embodiment of the application, in first communication object 610 there is task status to monitor registration interface;
The task, which monitors Registering modules 631, can include following submodule:
Task identification acquisition submodule, the task identification for obtaining specifying for task;
Task status monitors registration interface and calls submodule, for calling the task status to monitor registration interface, by institute State task identification and send and feed back corresponding of the task identification to the client 600, to notify the client 600 to start The task status information of business.
In one embodiment of the application, second communication object 640 has task status more new interface;
The task status feedback module 650 can include following submodule:
Task status update interface interchange submodule, for by Web page-container call the task status more new interface, The task status information listened to when performing the task is fed back into the webpage.
In one embodiment of the application, the task processing assembly 630 can also include following module:
Task monitors solution Registering modules 633, for calling first communication object 610, to notify the client 600 Stop the task status information of the feedback task.
There is task status to monitor solution registration in one embodiment of the application, in first communication object 610 to connect Mouthful;
The task, which monitors solution Registering modules 633, can include following submodule:
Task status monitors solution registration interface and calls submodule, for call the task status monitor solution registration interface, The task identification of the task is sent to the client 600, to notify the client 600 to stop feeding back the task mark Know the task status information of corresponding task.
In one embodiment of the application, the Web page-container includes Webview controls, the first communication object bag JS scripting objects are included, second communication object includes JS scripting objects.
Reference picture 7, shows a kind of structural representation of mobile device embodiment of the application, and the mobile device 700 has Body screen, such as touch-screen, can include following module:
Webpage load-on module 701, for loading a webpage in the client, has the first communication pair in the client As, in the webpage have the second communication object;
Task monitors Registering modules 702, for calling first communication object in the webpage, to notify the visitor Family end starts to feed back the task status information of specifying for task;
Task status information feedback module 703, will be for calling second communication object in the client The task status information listened to during the task is performed to send to the webpage;
Task status information display module 704, for showing the task status information in the webpage.
In one embodiment of the application, the client has Web page-container;The webpage load-on module 703 is wrapped Include:
Web page-container loads submodule, for having the net of the second communication object by loading one in the Web page-container Page;
Communication object injects submodule, for the first preset communication object to be injected into the Web page-container.
In one embodiment of the application, in first communication object there is task status to monitor registration interface;
The task, which monitors Registering modules 702, to be included:
Task identification acquisition submodule, the task identification for obtaining specifying for task;
Task status monitors registration interface and calls submodule, for calling the task status to monitor registration interface, by institute Task identification is stated to send to the client, feed back appointing for the corresponding task of the task identification to notify the client to start Business status information.
In one embodiment of the application, second communication object has task status more new interface;
The task status information feedback module 703 includes:
Task status updates interface interchange submodule, for calling the task status more new interface by Web page-container, The task status information listened in the corresponding task of the execution task identification is sent to the webpage.
In one embodiment of the application, in addition to:
Task monitors solution Registering modules, for calling first communication object in the webpage, to notify the visitor Family end stops the task status information of the feedback task.
In one embodiment of the application, there is task status to monitor solution registration interface in first communication object;
The task, which monitors solution Registering modules, to be included:
Task status monitors solution registration interface and calls submodule, for call the task status monitor solution registration interface, The task identification of the task is sent to the client, the task identification correspondence is fed back to notify the client to stop Task task status information.
In one embodiment of the application, the Web page-container includes Webview controls, the first communication object bag JS scripting objects are included, second communication object includes JS scripting objects.
For device, client embodiment, because it is substantially similar to embodiment of the method, so the comparison of description is simple Single, the relevent part can refer to the partial explaination of embodiments of method.
Each embodiment in this specification is described by the way of progressive, what each embodiment was stressed be with Between the difference of other embodiment, each embodiment identical similar part mutually referring to.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present application can be provided as method, device or calculate Machine program product.Therefore, the embodiment of the present application can using complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present application can use it is one or more wherein include computer can With in the computer-usable storage medium (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
In a typical configuration, the computer equipment includes one or more processors (CPU), input/output Interface, network interface and internal memory.Internal memory potentially includes the volatile memory in computer-readable medium, random access memory The form such as device (RAM) and/or Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is to calculate The example of machine computer-readable recording medium.Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be with Realize that information is stored by any method or technique.Information can be computer-readable instruction, data structure, the module of program or Other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), Electrically Erasable Read Only Memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc are read-only Memory (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic cassette tape, tape magnetic rigid disk storage or Other magnetic storage apparatus or any other non-transmission medium, the information that can be accessed by a computing device available for storage.According to Herein defines, and computer-readable medium does not include the computer readable media (transitory media) of non-standing, such as The data-signal and carrier wave of modulation.
The embodiment of the present application is with reference to according to the method for the embodiment of the present application, terminal device (system) and computer program The flow chart and/or block diagram of product is described.It should be understood that can be by computer program instructions implementation process figure and/or block diagram In each flow and/or square frame and the flow in flow chart and/or block diagram and/or the combination of square frame.These can be provided Computer program instructions are set to all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to produce a machine so that held by the processor of computer or other programmable data processing terminal equipments Capable instruction is produced for realizing in one flow of flow chart or multiple flows and/or one square frame of block diagram or multiple square frames The device for the function of specifying.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing terminal equipments In the computer-readable memory worked in a specific way so that the instruction being stored in the computer-readable memory produces bag The manufacture of command device is included, the command device is realized in one flow of flow chart or multiple flows and/or one side of block diagram The function of being specified in frame or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing terminal equipments so that Series of operation steps is performed on computer or other programmable terminal equipments to produce computer implemented processing, so that The instruction performed on computer or other programmable terminal equipments is provided for realizing in one flow of flow chart or multiple flows And/or specified in one square frame of block diagram or multiple square frames function the step of.
Although having been described for the preferred embodiment of the embodiment of the present application, those skilled in the art once know base This creative concept, then can make other change and modification to these embodiments.So, appended claims are intended to be construed to Including preferred embodiment and fall into having altered and changing for the embodiment of the present application scope.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation Between there is any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant meaning Covering including for nonexcludability, so that process, method, article or terminal device including a series of key elements are not only wrapped Those key elements, but also other key elements including being not expressly set out are included, or also include being this process, method, article Or the intrinsic key element of terminal device.In the absence of more restrictions, by wanting that sentence "including a ..." is limited Element, it is not excluded that also there is other identical element in the process including the key element, method, article or terminal device.
Method above to a kind of show task status in webpage provided herein, one kind display in webpage are appointed The device of business state, a kind of client of show task status in webpage and a kind of mobile device, are described in detail, this Apply specific case in text to be set forth the principle and embodiment of the application, the explanation of above example is only intended to Help understands the present processes and its core concept;Simultaneously for those of ordinary skill in the art, the think of according to the application Think, will change in specific embodiments and applications, in summary, this specification content should not be construed as pair The limitation of the application.

Claims (15)

1. a kind of method of the show task status in webpage, it is characterised in that including:
A webpage is loaded in the client, and there is the first communication object in the client, have second in the webpage Communication object;
First communication object is called in the webpage, the task of specifying for task is fed back to notify the client to start Status information;
Second communication object is called in the client, the task status listened to when performing the task is believed Breath is sent to the webpage;
The task status information is shown in the webpage.
2. according to the method described in claim 1, it is characterised in that the client has Web page-container;It is described in client The step of one webpage of middle loading, includes:
There is the webpage of the second communication object by loading one in the Web page-container;
The first preset communication object is injected into the Web page-container.
3. method according to claim 1 or 2, it is characterised in that in first communication object there is task status to supervise Listen registration interface;
It is described that first communication object is called in the webpage, feed back specifying for task to notify the client to start The step of task status information, includes:
Obtain the task identification of specifying for task;
Call the task status to monitor registration interface, the task identification is sent to the client, to notify the visitor Family end starts to feed back the task status information of the corresponding task of the task identification.
4. method according to claim 3, it is characterised in that there is second communication object task status renewal to connect Mouthful;
Task shape that is described that second communication object is called in the client, will being listened to when performing the task The step of state information is sent to the webpage includes:
The task status more new interface is called by Web page-container, will be monitored in the corresponding task of the execution task identification To task status information send to the webpage.
5. the method according to claim 1 or 2 or 4, it is characterised in that also include:
First communication object is called in the webpage, to notify the client to stop feeding back the task shape of the task State information.
6. method according to claim 5, it is characterised in that in first communication object there is task status to monitor solution Registration interface;
It is described that first communication object is called in the webpage, feed back appointing for the task to notify the client to stop The step of business status information, includes:
Call the task status to monitor solution registration interface, send the task identification of the task to the client, with logical Know that the client stops the task status information of the corresponding task of the feedback task identification.
7. the method according to claim 2 or 4, it is characterised in that the Web page-container includes Webview controls, described First communication object includes JS scripting objects, and second communication object includes JS scripting objects.
8. a kind of device of the show task status in webpage, it is characterised in that including:
Webpage load-on module, for loading a webpage in the client, has the first communication object, in institute in the client Stating has the second communication object in webpage;
Task monitors Registering modules, for calling first communication object in the webpage, to notify the client to open The task status information for the task that the feedback that begins is specified;
Task status information feedback module, for calling second communication object in the client, will perform institute The task status information listened to during task is stated to send to the webpage;
Task status information display module, for showing the task status information in the webpage.
9. device according to claim 8, it is characterised in that the client has Web page-container;The webpage loading Module includes:
Web page-container loads submodule, for having the webpage of the second communication object by loading one in the Web page-container;
Communication object injects submodule, for the first preset communication object to be injected into the Web page-container.
10. device according to claim 8 or claim 9, it is characterised in that in first communication object there is task status to supervise Listen registration interface;
The task, which monitors Registering modules, to be included:
Task identification acquisition submodule, the task identification for obtaining specifying for task;
Task status monitors registration interface and calls submodule, for calling the task status to monitor registration interface, described will appoint Business mark sends the task shape that the corresponding task of the task identification is fed back to the client, to notify the client to start State information.
11. device according to claim 10, it is characterised in that there is second communication object task status renewal to connect Mouthful;
The task status information feedback module includes:
Task status updates interface interchange submodule, for calling the task status more new interface by Web page-container, will be The task status information listened to during the corresponding task of the task identification is performed to send to the webpage.
12. the device according to claim 8 or 9 or 11, it is characterised in that also include:
Task monitors solution Registering modules, for calling first communication object in the webpage, to notify the client Stop the task status information of the feedback task.
13. device according to claim 12, it is characterised in that in first communication object there is task status to monitor Solve registration interface;
The task, which monitors solution Registering modules, to be included:
Task status monitors solution registration interface and calls submodule, for calling the task status to monitor solution registration interface, by institute The task identification for stating task is sent to the client, to notify the client to stop feeding back corresponding of the task identification The task status information of business.
14. a kind of client of the show task status in webpage, it is characterised in that there is the first communication in the client Object, the client includes:
Webpage load-on module, for loading a webpage;There is task processing assembly and the second communication object in the webpage;
Task status information feedback module, for calling second communication object, by appointing for being listened in the task of execution Business status information is sent to the webpage;
The task processing assembly includes:
Task monitors Registering modules, for calling first communication object, to notify the client to start to feed back what is specified The task status information of task;
Task status information display module, for showing the task status information.
15. a kind of mobile device, it is characterised in that including:
Webpage load-on module, for loading a webpage in the client, has the first communication object, in institute in the client Stating has the second communication object in webpage;
Task monitors Registering modules, for calling first communication object in the webpage, to notify the client to open The task status information for the task that the feedback that begins is specified;
Task status information feedback module, for calling second communication object in the client, will perform institute The task status information listened to during task is stated to send to the webpage;
Task status information display module, for showing the task status information in the webpage.
CN201610262081.1A 2016-04-22 2016-04-22 The method of show task status, device, client and mobile device in webpage Active CN105867984B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610262081.1A CN105867984B (en) 2016-04-22 2016-04-22 The method of show task status, device, client and mobile device in webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610262081.1A CN105867984B (en) 2016-04-22 2016-04-22 The method of show task status, device, client and mobile device in webpage

Publications (2)

Publication Number Publication Date
CN105867984A CN105867984A (en) 2016-08-17
CN105867984B true CN105867984B (en) 2017-09-05

Family

ID=56628958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610262081.1A Active CN105867984B (en) 2016-04-22 2016-04-22 The method of show task status, device, client and mobile device in webpage

Country Status (1)

Country Link
CN (1) CN105867984B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108345473A (en) * 2017-01-24 2018-07-31 阿里巴巴集团控股有限公司 A kind of method, apparatus and electronic equipment of the webpage load of application program
CN108959062B (en) * 2017-05-22 2021-06-18 腾讯科技(深圳)有限公司 Webpage element acquisition method and device
CN110990170A (en) * 2019-11-29 2020-04-10 广州市百果园信息技术有限公司 Data structure, communication method, device, storage medium and equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100407644C (en) * 2005-05-25 2008-07-30 中兴通讯股份有限公司 Method for displaying real-time data in web network management system
CN102185877A (en) * 2011-01-31 2011-09-14 北京开心人信息技术有限公司 Method and system for displaying FLASH downloading progress on webpage in real time
CN103034503B (en) * 2012-12-25 2016-07-06 北京奇虎科技有限公司 A kind of script execution, system and browser
CN104750470A (en) * 2013-12-27 2015-07-01 广州华多网络科技有限公司 Client and application communicating method and device
CN104035977B (en) * 2014-05-23 2018-06-19 小米科技有限责任公司 Webpage loading method and device
CN104462516B (en) * 2014-12-22 2018-01-23 联想(北京)有限公司 A kind of information cuing method and mobile terminal

Also Published As

Publication number Publication date
CN105867984A (en) 2016-08-17

Similar Documents

Publication Publication Date Title
US11615161B2 (en) System and method for dynamically enabling customized web content and applications
CN103942225B (en) A kind of resource transfer method, client and the system of mixed type applications client
US8713446B2 (en) Personalized dashboard architecture for displaying data display applications
US7870482B2 (en) Web browser extension for simplified utilization of web services
US11023263B2 (en) Hybrid server-side and client-side portal aggregation and rendering
CN106575298A (en) Fast rendering of websites containing dynamic content and stale content
US8914774B1 (en) System and method for tagging code to determine where the code runs
CN103530560A (en) Method, device and client side for advertisement blocking
KR20090080981A (en) Aggregating portlets for use within a client environment without relying upon server resources
US9231996B2 (en) User-influenced page loading of web content
US8819539B1 (en) On-the-fly rewriting of uniform resource locators in a web-page
CN105867984B (en) The method of show task status, device, client and mobile device in webpage
US20200226615A1 (en) Customer service representative dashboard application
CN106656920B (en) Processing method, device, storage medium and the processor of HTTP service
US8977969B2 (en) Dynamic web portal page
CN110554874A (en) Method and device for reusing webpage components of SaaS platform
US20150317405A1 (en) Web Page Variation
WO2017107851A1 (en) Method and device for releasing and updating desktop application component
CN110213105A (en) It is a kind of cross-platform micro- using creation method
CN113076294A (en) Information sharing method and device
US10089284B2 (en) Transforming a website for dynamic web content management
US9948693B2 (en) Generic cloud service for publishing data to be consumed by RSS readers
US11843679B2 (en) Automated dependency management based on page components
CN113792208A (en) Picture interaction method, device, equipment, medium and program product based on webpage
Pretty et al. H1DS: A new web-based data access system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant