CN105867984A - Method, device and client for displaying task state in web page as well as mobile equipment - Google Patents

Method, device and client for displaying task state in web page as well as mobile equipment Download PDF

Info

Publication number
CN105867984A
CN105867984A CN201610262081.1A CN201610262081A CN105867984A CN 105867984 A CN105867984 A CN 105867984A CN 201610262081 A CN201610262081 A CN 201610262081A CN 105867984 A CN105867984 A CN 105867984A
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.)
Granted
Application number
CN201610262081.1A
Other languages
Chinese (zh)
Other versions
CN105867984B (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

An embodiment of the invention provides a method, a device and a client for displaying a task state in a web page as well as mobile equipment. The method comprises the steps as follows: the web page is loaded in the client, wherein the client comprises a first communication object and the web page comprises a second communication object; the first communication object is called in the web page to inform the client to begin to feed back task state information of a specific task; the second communication object is called in the client to send the task state information monitored during task execution to the web page; the task state information is displayed in the web page. According to the embodiment, calling of a port for starting services is avoided, the problems that other processes or services are affected by port occupation and too many resources are occupied caused by port occupation and service starting are solved, and accordingly, effects of improving the process or service stability and reducing the system resource consumption rate are achieved.

Description

The method of show task status, device, client and mobile device in webpage
Technical field
The application relates to the technical field of computer disposal, particularly relates to one and shows task in webpage The method of state, a kind of in webpage the device of show task status, a kind of in webpage, show task shape The client of state and a kind of mobile device.
Background technology
Along with the development of science and technology, such as the electronic equipment such as mobile phone, panel computer, intelligent watch is extensive Universal, people life, learn, work in application more and more.
In order to meet the various demands of user, such as reading, session etc., user installs the most in systems Many clients, such as E-book reader, immediate communication tool etc..
As a example by the client of Android (Android) system, these clients would generally be configured with WebView control, is used for showing webpage or the online content of display application, such as, reads in e-book Read device shows online books introduction, immediate communication tool shows webpage etc..
Often triggering some tasks in webpage, such as download, communication etc., these tasks would generally be transferred to Client executing, typically can only control the wide high, in WebView of WebView due to client itself The control loaded, client cannot directly be revised, and by indirect method notice webpage, then webpage goes The information of amendment webpage self display, goes the state of display task.
At present, client is to call a port deactivation one service in the electronic device mostly, passes through The state of this Service Notification webpage task.
But, the port number in electronic equipment is limited, if the long period takies certain port, and may The impact that other processes or service are caused, and, the long period takies certain port and opens service, Take the resource such as the internal memory of electronic equipment, CPU (Central Processing Unit, central processing unit) More.
Summary of the invention
The embodiment of the present application provide a kind of in webpage the method for show task status, device, client and Mobile device, the problem more in order to solve to affect other processes or service, resource occupation.
In order to solve the problems referred to above, the embodiment of the present application discloses a kind of show task status in webpage Method, including:
Load a webpage in the client, described client has the first communication object, at described net There is in Ye the second communication object;
Described first communication object is called, to notify that described client starts feedback and specifies in described webpage The task status information of task;
Described second communication object is called, will listen to when performing described task in described client Task status information send to described webpage;
Described task status information is shown in described webpage.
Preferably, described client has Web page-container;The described step loading a webpage in the client Including:
By described Web page-container loads a webpage with the second communication object;
The first preset communication object is injected described Web page-container.
Preferably, described first communication object has task status and monitors registration interface;
Described in described webpage, call described first communication object, to notify that described client starts feedback The step of the task status information of specifying of task includes:
Obtain the task identification of specifying of task;
Call described task status monitor registration interface, by described task identification send to described client, To notify that described client starts to feed back the task status information of task corresponding to described task identification.
Preferably, described second communication object has task status more new interface;
Described in described client, call described second communication object, with will when performing described task prison The task status information heard sends the step of extremely described webpage and includes:
Call described task status more new interface by Web page-container, described task identification correspondence will performed Task time the task status information that listens to send to described webpage.
Preferably, also include:
Described first communication object is called in described webpage, described to notify that described client stops feedback The task status information of task.
Preferably, described first communication object has task status and monitors solution registration interface;
Described in described webpage, call described communication object, described to notify that described client stops feedback The step of the task status information of task includes:
Call described task status to monitor solution registration interface, send the task identification of described task to the most described Client, to notify that described client stops feeding back the task status letter of task corresponding to described task identification Breath.
Preferably, described Web page-container includes that Webview control, described first communication object include JS Scripting object, described second communication object includes JS scripting object.
The application implements to also disclose a kind of device of show task status in webpage, including:
Webpage load-on module, for loading a webpage in the client, has first in described client Communication object, there is in described webpage the second communication object;
Task monitors Registering modules, for calling described first communication object in described webpage, with notice Described client starts to feed back the task status information of specifying of task;
Task status information feedback module, for calling described second communication object in described client, Send to described webpage with the task status information that will listen to when performing described task;
Task status information display module, for showing described task status information in described webpage.
Preferably, described client has Web page-container;Described webpage load-on module includes:
Web page-container loads submodule, right for having the second communication by loading one in described Web page-container The webpage of elephant;
Communication object injects submodule, for the first preset communication object is injected described Web page-container.
Preferably, described first communication object has task status and monitors registration interface;
Described task is monitored Registering modules and is included:
Task identification obtains submodule, for obtaining the task identification of specifying of task;
Task status is monitored registration interface and is called submodule, is used for calling the monitoring registration of described task status and connects Mouthful, described task identification is sent to described client, to notify that described client starts to feed back described appointing The task status information of the task that business mark is corresponding.
Preferably, described second communication object has task status more new interface;
Described task status information feedback module includes:
Task status updates interface interchange submodule, for calling described task status more by Web page-container New interface, sends the task status information listened to when performing task corresponding to described task identification extremely Described webpage.
Preferably, also include:
Task is monitored and is solved Registering modules, for calling described first communication object in described webpage, with logical Know that described client stops feeding back the task status information of described task.
Preferably, described first communication object has task status and monitors solution registration interface;
Described task is monitored solution Registering modules and is included:
Task status is monitored solution registration interface and is called submodule, is used for calling described task status and monitors solution note Volume interface, the task identification of described task is sent to described client, to notify that described client stops Feed back the task status information of task corresponding to described task identification.
Preferably, described Web page-container includes that Webview control, described first communication object include JS Scripting object, described second communication object includes JS scripting object.
The embodiment of the present application also discloses a kind of client of show task status in webpage, described visitor Having the first communication object in the end of family, described client includes:
Webpage load-on module, for loading a webpage;At described webpage, there is task and process assembly and second Communication object;
Task status information feedback module, is used for calling described second communication object, with will perform described The task status information listened to during task sends to described webpage;
Described task processes assembly and includes:
Task monitors Registering modules, is used for calling described first communication object, to notify that described client is opened The task status information of the task that the feedback that begins is specified;
Task status information display module, is used for showing described task status information.
Preferably, described client has Web page-container;Described webpage load-on module can include following son Module:
Web page-container loads submodule, right for having the second communication by loading one in described Web page-container The webpage of elephant;
Communication object injects submodule, for the first preset communication object is injected described Web page-container.
Preferably, described first communication object has task status and monitors registration interface;
Described task is monitored Registering modules and is included:
Task identification obtains submodule, for obtaining the task identification of specifying of task;
Task status is monitored registration interface and is called submodule, is used for calling the monitoring registration of described task status and connects Mouthful, described task identification is sent to described client, to notify that described client starts to feed back described appointing The task status information of the task that business mark is corresponding.
Preferably, described second communication object has task status more new interface;
Described task status feedback module can include following submodule:
Task status updates interface interchange submodule, for calling described task status more by Web page-container New interface, the task status information that listens to when performing described task is fed back to described webpage.
Preferably, described task process assembly also includes:
Task is monitored and is solved Registering modules, is used for calling described first communication object, to notify described client Stop feeding back the task status information of described task.
Preferably, described first communication object has task status and monitors solution registration interface;
Described task is monitored and is solved Registering modules and can include following submodule:
Task status is monitored solution registration interface and is called submodule, is used for calling described task status and monitors solution note Volume interface, the task identification of described task is sent to described client, to notify that described client stops Feed back the task status information of task corresponding to described task identification.
Preferably, described Web page-container includes that Webview control, described first communication object include JS Scripting object, described second communication object includes JS scripting object.
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, has first in described client Communication object, there is in described webpage the second communication object;
Task monitors Registering modules, for calling described first communication object in described webpage, with notice Described client starts to feed back the task status information of specifying of task;
Task status information feedback module, for calling described second communication object in described client, Send to described webpage with the task status information that will listen to when performing described task;
Task status information display module, for showing described task status information in described webpage.
Preferably, described client has Web page-container;Described webpage load-on module includes:
Web page-container loads submodule, right for having the second communication by loading one in described Web page-container The webpage of elephant;
Communication object injects submodule, for the first preset communication object is injected described Web page-container.
Preferably, described first communication object has task status and monitors registration interface;
Described task is monitored Registering modules and is included:
Task identification obtains submodule, for obtaining the task identification of specifying of task;
Task status is monitored registration interface and is called submodule, is used for calling the monitoring registration of described task status and connects Mouthful, described task identification is sent to described client, to notify that described client starts to feed back described appointing The task status information of the task that business mark is corresponding.
Preferably, described second communication object has task status more new interface;
Described task status information feedback module includes:
Task status updates interface interchange submodule, for calling described task status more by Web page-container New interface, sends the task status information listened to when performing task corresponding to described task identification extremely Described webpage.
Preferably, also include:
Task is monitored and is solved Registering modules, for calling described first communication object in described webpage, with logical Know that described client stops feeding back the task status information of described task.
Preferably, described first communication object has task status and monitors solution registration interface;
Described task is monitored solution Registering modules and is included:
Task status is monitored solution registration interface and is called submodule, is used for calling described task status and monitors solution note Volume interface, the task identification of described task is sent to described client, to notify that described client stops Feed back the task status information of task corresponding to described task identification.
Preferably, described Web page-container includes that Webview control, described first communication object include JS Scripting object, described second communication object includes JS scripting object.
The embodiment of the present application includes advantages below:
The embodiment of the present application is called for webpage by configuring the first communication object in client, joins in webpage Put the second communication object for client call, it is achieved that the communication between client and webpage so that in office During business performs, task is monitored by web page notification client, the process shape of client feedback task State, and then show in webpage, it is to avoid call port deactivation service, and then solve because taking end The problem affecting other processes or service that mouth causes, and, because taking what port and the service of unlatching caused Resource occupation is more, it is thus achieved that promote progress or the stability of service, the effect of reduction system resources consumption rate Really.
The webpage of the embodiment of the present application can call the first communication object notice client stop task Monitor, improve the practicality that task is monitored.
Accompanying drawing explanation
Fig. 1 is the steps flow chart of the embodiment of the method 1 of a kind of show task status in webpage of the application Figure;
Fig. 2 A to Fig. 2 B is a kind of download progress showing e-book in webpage of the embodiment of the present application Exemplary plot;
Fig. 3 is the steps flow chart of the embodiment of the method 2 of a kind of show task status in webpage of the application Figure;
Fig. 4 is a kind of structural frames of the device embodiment 1 of show task status in webpage of the application Figure;
Fig. 5 is a kind of structural frames of the device embodiment 2 of show task status in webpage of the application Figure;
Fig. 6 is a kind of structural frames of the client embodiment of show task status in webpage of the application Figure;
Fig. 7 is the structural representation of a kind of mobile device of the application.
Detailed description of the invention
Understandable, below in conjunction with the accompanying drawings for enabling the above-mentioned purpose of the application, feature and advantage to become apparent from With detailed description of the invention, the application is described in further detail.
With reference to Fig. 1, it is shown that the embodiment of the method 1 of a kind of show task status in webpage of the application Flow chart of steps, specifically may include steps of:
Step 101, loads a webpage in the client;
The embodiment of the present application can be applied in various mobile devices, such as, mobile phone, panel computer, individual Personal digital assistant, wearable device (such as glasses, wrist-watch etc.) etc., it is also possible to apply and set various fixing In Bei, such as, intelligent television, PC etc..
These mobile devices, the operating system of fixing equipment can include Android, IOS, Windows Phone, Windows etc., can install various client in such systems, as E-book reader, Immediate communication tool etc., can show webpage or online content.
In implementing, client has Web page-container, i.e. loads and the container of displayed web page.
Such as, in Android, IOS system, this Web page-container can include WebView control, In Windows system, this Web page-container can include WebBrowser control etc..
For making those skilled in the art be more fully understood that the embodiment of the present application, in this manual, will WebView illustrates as a kind of example of Web page-container.
In android system, WebView is WebKit module (browsing device net page typesetting engine) The view class of Java layer, uses the Android application program of web browsing function can create this view pair As display and the Internet resources of process request.
At present, WebKit module supports HTTP (Hypertext transfer protocol, hypertext transmission Agreement), HTTPS (Hyper Text Transfer Protocol over Secure Socket Layer, be with Safety is the HTTP passage of target), FTP (File Transfer Protoco, file transfer protocol (FTP)) with And JS (JavaScript, a kind of literal translation formula script) request.
WebView is as UI (User Interface, the user interface) interface of application program, for user Providing a series of web page browsing, user's interactive interface, CLIENT PROGRAM passes through these interface accessings WebKit core code.
In an embodiment of the application, step 101 can include following sub-step:
Sub-step S11, by loading a webpage with the second communication object in described Web page-container;
In the embodiment of the present application, Web page-container can load and show a webpage, with WebView As a example by, generally can adopt and load webpage with the following method:
First method:
1, instantiation WebView assembly in wanting Activity: WebView webView=new WebView(this);
2, by webview.loadUrl (url) method, WevView webpage to be shown is set;
Wherein, this webpage can be the webpage (if http://www.**.cn, * * is domain name) on network, Can also be local webpage (such as file: //sdcard/uc/a.html), it is also possible to be the net currently loaded Page JS method (such as javascript:window.alert ()), etc., this is not limited by the embodiment of the present application System.
3, the setContentView () method of Activity is called to show webpage view;
4, seen that a lot of page is later in order to allow WebView support Backward Function with WebView point link, The onKeyDown () method of Activity class can be covered;
5, in AndroidManifest.xml file, add authority, otherwise there will be Web page not Available mistake.
Second method:
1, in topology file, WebView is stated;
2, instantiation WebView in Activity;
3, call the loadUrl () method of WebView, WevView webpage to be shown is set;
4, in order to allow WebView can respond hyperlink function, setWebViewClient () side is called Method, arranges WebView view;
5, seen that a lot of page is later in order to allow WebView support Backward Function with WebView point link, The onKeyDown () method of Activity class can be covered;
6, in AndroidManifest.xml file, add authority, Web page not otherwise occurs Available mistake.
Certainly, above-mentioned webpage loading method is intended only as example, when implementing the embodiment of the present application, permissible Arranging other webpage loading methods according to practical situation, this is not any limitation as by the embodiment of the present application.It addition, In addition to above-mentioned webpage loading method, those skilled in the art can also use other net according to actual needs Page loading method, this is not any limitation as by the embodiment of the present application.
Webpage, its essence can be HTML (HyperText Markup Language, supertext mark Note language) document, at this webpage, there is task and process assembly and the second communication object.
Wherein, it is the module processing the task in webpage that this task processes assembly, and the second communication object is collection Having become the data object of the interface (or claiming method) communicated to webpage, such as, this second communication is right As including JS scripting object.
Such as, this JS object is for updating download progress to webpage, then this JS scripting object can be such that
WebDealer.taskUpdate (String json) // update progress }
In the embodiment of the present application, webpage loads the second communication object, webpage can be passed through by client Container calls execution (realization side is webpage, and user is client).
Sub-step S12, injects described Web page-container by the first preset communication object;
In the embodiment of the present application, client is prefixed the first communication object, is i.e. integrated with to client The data object of the interface (or claiming method) communicated, such as, this first communication object can include JS scripting object.
Client can state the first communication object, is supplied to by the first communication object by the way of registration Webpage calls execution (realization side is client, and user is webpage).
Furthermore, by the operation of Web page-container registration interface (or claiming method), it is possible to achieve net This interface (or claiming method) that page realizes in calling client.
As a example by WebView, can adjust with the following method for WebView injection JS object:
webview.addJavascriptInterface(new JavaScriptInterface(),InterfaceName);
Make the webpage loaded in WebView can call the method in JavaScriptInterface class.
Such as, webView.addJavascriptInterface (new TaskJavaScript (), " appTask ");
Wherein, first parameter " new TaskJavaScript () " is the interior class created of client, Interface therein is used for using to webpage, can be called JS object;Second parameter " appTask " is The name of first parameter, client can customize, and webpage can pass through this name call JS object.
Step 102, calls described first communication object in described webpage, to notify that described client is opened The task status information of the task that the feedback that begins is specified;
In implementing, user can trigger opening of task by modes such as click controls in webpage Dynamic, when the startup of task being detected, then can call the first communication object notice client and start feedback The task status information of this task.
Certainly, client can also continue monitoring task, and starting feedback in current scene should The task status information of task.
It should be noted that in different types of client, there is different types of task, specifically may be used To include download, file decompression, picture processing, network service, database access etc..
Such as, as shown in Figure 2 A, in client, client control 201 can be loaded, it is also possible to aobvious Show webpage 202, webpage 202 is loaded with download control 203, if user clicks on this download control 203, Then can trigger the task of downloading e-book.
In the embodiment of the present application, there is the first communication object in the client, due to the place of a lot of tasks Reason needs to expend regular hour, for convenience user monitoring, and webpage can call this first communication object The notice client process monitoring state to task.
In an embodiment of the application, the first communication object has task status monitoring registration and connects Mouthful, this task status is monitored registration interface and be may be used for the monitoring to client registers task.
Such as, this task status monitors registration interface can be defined as registerTask (String data), Wherein, in data, definable task processes the parameter that state is relevant.
Certainly, this task status is monitored registration interface and can also be defined as other titles, the embodiment of the present application This is not any limitation as.
In the embodiment of the present application, step 102 can include following sub-step:
Sub-step S21, obtains the task identification of specifying of task;
Task identification can refer to represent the information of a well-determined task, if pre-defined task Character (as download e-book), then can with process object (such as e-book) information (such as electronics Book ID) as task identification, identify the task that this process object is performed.
In implementing, if the task identification of this task exists, such as e-book in the data of webpage itself ID, then can search in local web data, and certainly, the task identification of this task can also be real-time Generating, this is not any limitation as by the embodiment of the present application.
Sub-step S22, calls described task status and monitors registration interface, sent extremely by described task identification Described client, to notify that described client starts to feed back the task shape of task corresponding to described task identification State information.
In the embodiment of the present application, webpage can be to the monitoring of client registers task, it is desirable to client is anti- The change of feedback task status.
Such as, e-book ID is monitored as task status the parameter of registration interface registerTask (), It is transferred to client, can register the monitoring of task downloading e-book (e-book ID mark):
registerTask(‘{‘bookID’:‘12345’}’)
Wherein, 12345 is e-book ID (bookID).
Step 103, calls described second communication object in described client, will perform described appointing The task status information listened to during business sends to described webpage;
After client receives the task of webpage requirement monitoring, the process state of this task is supervised Listening, if detecting, the process state of this task changes, then can notify webpage.
In the embodiment of the present application, have the second communication object in webpage, then client can call Two communication objects, the task status information that listens to when performing described task is fed back to webpage.
In an embodiment of the application, the second communication object has task status more new interface, this Business state more new interface may be used for the process state to webpage more new task.
Such as, this task status more new interface can be defined as updatePercent (String data), wherein, The parameter that in data, the process state of definable task is relevant.
Certainly, this task status more new interface can also be defined as other titles, and the embodiment of the present application is to this It is not any limitation as.
The most in the embodiment of the present application, call described task status more new interface by Web page-container, will be The task status information performing to listen to during task corresponding to described task identification sends to described webpage.
Comparatively speaking, webpage can be received client and returned by Web page-container calling task state more new interface Task status information that return, that listen to when the task that execution task identification is corresponding.
Wherein, task status information can be the information of the process state of record task, such as download progress.
Using the download progress of e-book as the example of task status information, if e-book ID is sent out by webpage Deliver to client, then client can obtain the download of e-book corresponding to this e-book ID to server Address, downloads this e-book from this download address.
Client can obtain contentlength by the header information (header) of HTTP request The total bytes of parameter, i.e. e-book.
When downloading, reading the byte data in inputstream parameter by http response, circulation is write To this locality, often complete once to circulate, can take local written into the total bytes of total bytes and e-book It is divided by and obtains percentage ratio, namely a download progress.
Such as, using e-book ID and download progress as task status more new interface updatePercent () Parameter, be transferred to webpage, the download progress of e-book be updated:
updatePercent(‘{‘bookID’:’12345’,’percent’:‘3’}’)
Wherein, 12345 be e-book ID (bookID), percen be percentage ratio, 3 is download progress, Represent that download progress is 3%.
Step 104, shows described task status information in described webpage.
If webpage obtains task status information, then can change the display of UI according to this task status information State.
Such as, as shown in Figure 2 B, download control 203 as shown in Figure 2 A can be adjusted to download Progress display control 204, if the download progress of e-book is 3%, then can be in download progress display control Part 204 shows the text of " in download 3% ", and, adjust download progress display control 204 Background is waveform, in pointing out e-book to download.
The embodiment of the present application is called for webpage by configuring the first communication object in client, joins in webpage Put the second communication object for client call, it is achieved that the communication between client and webpage so that in office During business performs, task is monitored by web page notification client, the process shape of client feedback task State, and then show in webpage, it is to avoid call port deactivation service, and then solve because taking end The problem affecting other processes or service that mouth causes, and, because taking what port and the service of unlatching caused Resource occupation is more, it is thus achieved that promote progress or the stability of service, the effect of reduction system resources consumption rate Really.
With reference to Fig. 3, it is shown that the embodiment of the method 2 of a kind of show task status in webpage of the application Flow chart of steps, specifically may include steps of:
Step 301, loads a webpage in the client;
Wherein, in described client has the first communication object, described webpage, there is the second communication object;
Step 302, calls described first communication object in described webpage, to notify that described client is opened The task status information of the task that the feedback that begins is specified;
Step 303, calls described second communication object in described client, will perform described appointing The task status information listened to during business sends to described webpage;
Step 304, shows described task status information in described webpage;
Step 305, calls described first communication object in described webpage, to notify that described client is stopped Only feed back the task status information of described task.
In implementing, having the label of hyperlink in the html document of webpage, user can pass through The modes such as clickable hyperlinks jump to other pages.
URL (the Uniform Resource of a new web page it is loaded with in the Web page-containers such as WebView Locator, URL), it is meant that have left the process state being currently needed for displaying task Webpage.
In the embodiment of the present application, there is the first communication object in the client, webpage can call this One communication object notice client releases the notice readjustment of the process state of current task, stops anti-to webpage Feedback task status information.
Now, client can stop monitoring this task, it is also possible to persistently supervises this task Listening, for other scenes, this is not any limitation as by the embodiment of the present application.
In an embodiment of the application, the first communication object has task status monitoring solution registration and connects Mouthful, this task status is monitored registration interface and be may be used for releasing to client the registration of the monitoring of task.
Such as, this task status is monitored registration interface and can be defined as unRegisterTask (String Data), wherein, in data, definable task processes the parameter that state is relevant.
Certainly, this task status is monitored registration interface and can also be defined as other titles, the embodiment of the present application This is not any limitation as.
In the embodiment of the present application, webpage can be with calling task status monitoring solution registration interface, by task Task identification sends to client, and notice client stops monitoring the task that task identification is corresponding.
Such as, e-book ID is monitored as task status the ginseng of solution registration interface unRegisterTask () Number, is transferred to client, can stop the prison to the task of downloading e-book (e-book ID mark) Listen:
unRegisterTask(‘{‘bookID’:‘12345’}’)
Wherein, 12345 is e-book ID (bookID).
The task status of client is monitored solution registration interface and is called, the task identification come according to transmission, visitor Family end stops the task status information of task corresponding to this task identification and feeds back to the operation of webpage.
The webpage of the embodiment of the present application can call the first communication object notice client stop task Monitor, improve the practicality that task is monitored.
It should be noted that for embodiment of the method, in order to be briefly described, therefore it is all expressed as one it be The combination of actions of row, but those skilled in the art should know, and the embodiment of the present application is not by described The restriction of sequence of movement because according to the embodiment of the present application, some step can use other orders or Person is carried out simultaneously.Secondly, those skilled in the art also should know, embodiment described in this description Belong to preferred embodiment, necessary to involved action not necessarily the embodiment of the present application.
With reference to Fig. 4, it is shown that a kind of device embodiment 1 of show task status in webpage of the application Structured flowchart, specifically can include such as lower module:
Webpage load-on module 401, for loading a webpage in the client, has in described client First communication object, there is in described webpage the second communication object;
Task monitors Registering modules 402, for calling described first communication object in described webpage, with Notify that described client starts to feed back the task status information of specifying of task;
Task status information feedback module 403, right for calling described second communication in described client As, send to described webpage with the task status information that will listen to when performing described task;
Task status information display module 404, for showing described task status information in described webpage.
In an embodiment of the application, described client has Web page-container;Described webpage loads mould Block 401 can include following submodule:
Web page-container loads submodule, right for having the second communication by loading one in described Web page-container The webpage of elephant;
Communication object injects submodule, for the first preset communication object is injected described Web page-container.
In an embodiment of the application, described first communication object has task status and monitors registration Interface;
Described task monitors Registering modules 402 can include following submodule:
Task identification obtains submodule, for obtaining the task identification of specifying of task;
Task status is monitored registration interface and is called submodule, is used for calling the monitoring registration of described task status and connects Mouthful, described task identification is sent to described client, to notify that described client starts to feed back described appointing The task status information of the task that business mark is corresponding.
In an embodiment of the application, described second communication object has task status more new interface;
Described task status information feedback module 403 can include following submodule:
Task status updates interface interchange submodule, for calling described task status more by Web page-container New interface, sends the task status information listened to when performing task corresponding to described task identification extremely Described webpage.
In implementing, described Web page-container can include Webview control, and described first communication is right As including JS scripting object, described second communication object can include JS scripting object.
With reference to Fig. 5, it is shown that a kind of device embodiment 2 of show task status in webpage of the application Structured flowchart, specifically can include such as lower module:
Webpage load-on module 501, for loading a webpage in the client, has in described client First communication object, there is in described webpage the second communication object;
Task monitors Registering modules 502, for calling described first communication object in described webpage, with Notify that described client starts to feed back the task status information of specifying of task;
Task status information feedback module 503, right for calling described second communication in described client As, send to described webpage with the task status information that will listen to when performing described task;
Task status information display module 504, for showing described task status information in described webpage;
Task is monitored and is solved Registering modules 505, for calling described first communication object in described webpage, To notify that described client stops feeding back the task status information of described task.
In an embodiment of the application, described first communication object has task status and monitors solution note Volume interface;
Described task is monitored and is solved Registering modules 505 and can include following submodule:
Task status is monitored solution registration interface and is called submodule, is used for calling described task status and monitors solution note Volume interface, the task identification of described task is sent to described client, to notify that described client stops Feed back the task status information of task corresponding to described task identification.
With reference to Fig. 6, it is shown that a kind of client embodiment of show task status in webpage of the application Structured flowchart, described client 600 has the first communication object 610;
Additionally, described client 600 can include such as lower module:
Webpage load-on module 620, for loading a webpage;At described webpage, there is task and process assembly 630 With the second communication object 640;
Task status feedback module 650, is used for calling described second communication object 640, performing The task status information listened to during described task sends to described webpage;
Described task processes assembly 630 and can include such as lower module:
Task monitors Registering modules 631, is used for calling described first communication object 610, described with notice Client 600 starts to feed back the task status information of specifying of task;
Task status information display module 632, is used for showing described task status information.
In an embodiment of the application, described client 600 has Web page-container;Described webpage adds Carry module 612 and can include following submodule:
Web page-container loads submodule, right for having the second communication by loading one in described Web page-container As the webpage of 640;
Communication object injects submodule, holds for the first preset communication object 610 injects described webpage Device.
In an embodiment of the application, described first communication object 610 has task status and monitors Registration interface;
Described task monitors Registering modules 631 can include following submodule:
Task identification obtains submodule, for obtaining the task identification of specifying of task;
Task status is monitored registration interface and is called submodule, is used for calling the monitoring registration of described task status and connects Mouthful, described task identification is sent to described client 600, to notify that described client 600 starts instead Present the task status information of task corresponding to described task identification.
In an embodiment of the application, described second communication object 640 has task status renewal and connects Mouthful;
Described task status feedback module 650 can include following submodule:
Task status updates interface interchange submodule, for calling described task status more by Web page-container New interface, the task status information that listens to when performing described task is fed back to described webpage.
In an embodiment of the application, described task processes assembly 630 and can also include such as lower module:
Task is monitored and is solved Registering modules 633, is used for calling described first communication object 610, to notify State client 600 and stop feeding back the task status information of described task.
In an embodiment of the application, described first communication object 610 has task status and monitors Solve registration interface;
Described task is monitored and is solved Registering modules 633 and can include following submodule:
Task status is monitored solution registration interface and is called submodule, is used for calling described task status and monitors solution note Volume interface, the task identification of described task is sent to described client 600, to notify described client 600 stop feeding back the task status information of task corresponding to described task identification.
In an embodiment of the application, described Web page-container includes Webview control, described first Communication object includes that JS scripting object, described second communication object include JS scripting object.
With reference to Fig. 7, it is shown that the structural representation of a kind of mobile device embodiment of the application, this moves The concrete screen of equipment 700, such as touch screen, can include such as lower module:
Webpage load-on module 701, for loading a webpage in the client, has in described client First communication object, there is in described webpage the second communication object;
Task monitors Registering modules 702, for calling described first communication object in described webpage, with Notify that described client starts to feed back the task status information of specifying of task;
Task status information feedback module 703, right for calling described second communication in described client As, send to described webpage with the task status information that will listen to when performing described task;
Task status information display module 704, for showing described task status information in described webpage.
In an embodiment of the application, described client has Web page-container;Described webpage loads mould Block 703 includes:
Web page-container loads submodule, right for having the second communication by loading one in described Web page-container The webpage of elephant;
Communication object injects submodule, for the first preset communication object is injected described Web page-container.
In an embodiment of the application, described first communication object has task status and monitors registration Interface;
Described task is monitored Registering modules 702 and is included:
Task identification obtains submodule, for obtaining the task identification of specifying of task;
Task status is monitored registration interface and is called submodule, is used for calling the monitoring registration of described task status and connects Mouthful, described task identification is sent to described client, to notify that described client starts to feed back described appointing The task status information of the task that business mark is corresponding.
In an embodiment of the application, described second communication object has task status more new interface;
Described task status information feedback module 703 includes:
Task status updates interface interchange submodule, for calling described task status more by Web page-container New interface, sends the task status information listened to when performing task corresponding to described task identification extremely Described webpage.
In an embodiment of the application, also include:
Task is monitored and is solved Registering modules, for calling described first communication object in described webpage, with logical Know that described client stops feeding back the task status information of described task.
In an embodiment of the application, described first communication object has task status and monitors solution Registration interface;
Described task is monitored solution Registering modules and is included:
Task status is monitored solution registration interface and is called submodule, is used for calling described task status and monitors solution note Volume interface, the task identification of described task is sent to described client, to notify that described client stops Feed back the task status information of task corresponding to described task identification.
In an embodiment of the application, described Web page-container includes Webview control, described first Communication object includes that JS scripting object, described second communication object include JS scripting object.
For device, client embodiment, due to itself and embodiment of the method basic simlarity, so retouching That states is fairly simple, and relevant part sees the part of embodiment of the method and illustrates.
Each embodiment in this specification all uses the mode gone forward one by one to describe, and each embodiment stresses Be all the difference with other embodiments, between each embodiment, identical similar part sees mutually ?.
Those skilled in the art are it should be appreciated that the embodiment of the embodiment of the present application can be provided as method, dress Put or computer program.Therefore, the embodiment of the present application can use complete hardware embodiment, completely Software implementation or the form of the embodiment in terms of combining software and hardware.And, the embodiment of the present application Can use and can be situated between with storage at one or more computers wherein including computer usable program code The upper computer journey implemented of matter (including but not limited to disk memory, CD-ROM, optical memory etc.) The form of sequence product.
In a typical configuration, described computer equipment includes one or more processor (CPU), input/output interface, network interface and internal memory.Internal memory potentially includes computer-readable medium In volatile memory, the shape such as random access memory (RAM) and/or Nonvolatile memory Formula, such as read only memory (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium Example.Computer-readable medium includes removable media permanent and non-permanent, removable and non- Information storage can be realized by any method or technology.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 Be not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic random are deposited Access to memory (DRAM), other kinds of random access memory (RAM), read only memory (ROM), Electrically Erasable Read Only Memory (EEPROM), fast flash memory bank or other in Deposit technology, read-only optical disc read only memory (CD-ROM), digital versatile disc (DVD) or other Optical storage, magnetic cassette tape, tape magnetic rigid disk storage other magnetic storage apparatus or any its His non-transmission medium, can be used for the information that storage can be accessed by a computing device.According to herein Defining, computer-readable medium does not include the computer readable media (transitory media) of non-standing, Data signal and carrier wave such as modulation.
The embodiment of the present application is with reference to the method according to the embodiment of the present application, terminal unit (system) and meter The flow chart of calculation machine program product and/or block diagram describe.It should be understood that can be by computer program instructions Each flow process in flowchart and/or block diagram and/or square frame and flow chart and/or square frame Flow process in figure and/or the combination of square frame.Can provide these computer program instructions to general purpose computer, The processor of special-purpose computer, Embedded Processor or other programmable data processing terminal equipment is to produce One machine so that performed by the processor of computer or other programmable data processing terminal equipment Instruction produce for realizing at one flow process of flow chart or multiple flow process and/or one square frame of block diagram or The device of the function specified in multiple square frames.
These computer program instructions may be alternatively stored in and computer or other programmable datas can be guided to process In the computer-readable memory that terminal unit works in a specific way so that be stored in this computer-readable Instruction in memorizer produces the manufacture including command device, and this command device realizes flow chart one The function specified in flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded into computer or other programmable data processing terminals set Standby upper so that on computer or other programmable terminal equipment, to perform sequence of operations step in terms of producing The process that calculation machine realizes, thus the instruction performed on computer or other programmable terminal equipment provides and uses In realizing in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame The step of the function specified.
Although having been described for the preferred embodiment of the embodiment of the present application, but those skilled in the art being once Know basic creative concept, then these embodiments can be made other change and amendment.So, Claims are intended to be construed to include preferred embodiment and fall into the institute of the embodiment of the present application scope There are change and amendment.
Finally, in addition it is also necessary to explanation, in this article, the relational terms of such as first and second or the like It is used merely to separate an entity or operation with another entity or operating space, and not necessarily requires Or imply relation or the order that there is any this reality between these entities or operation.And, art Language " includes ", " comprising " or its any other variant are intended to comprising of nonexcludability, so that Process, method, article or terminal unit including a series of key elements not only include those key elements, and Also include other key elements being not expressly set out, or also include for this process, method, article or The key element that person's terminal unit is intrinsic.In the case of there is no more restriction, statement " include one It is individual ... " key element that limits, it is not excluded that including the process of described key element, method, article or end End equipment there is also other identical element.
Above to a kind of method of show task status, a kind of at webpage in webpage provided herein The device of middle show task status, the client of a kind of show task status in webpage and one move and set Standby, it is described in detail, principle and the embodiment of the application are entered by specific case used herein Having gone elaboration, the explanation of above example is only intended to help and understands that the present processes and core thereof are thought Think;Simultaneously for one of ordinary skill in the art, according to the thought of the application, in specific embodiment party All will change in formula and range of application, in sum, this specification content should not be construed as this The restriction of application.

Claims (15)

1. the method for a show task status in webpage, it is characterised in that including:
Load a webpage in the client, described client has the first communication object, at described net There is in Ye the second communication object;
Described first communication object is called, to notify that described client starts feedback and specifies in described webpage The task status information of task;
Described second communication object is called, will listen to when performing described task in described client Task status information send to described webpage;
Described task status information is shown in described webpage.
Method the most according to claim 1, it is characterised in that described client has webpage and holds Device;The described step loading a webpage in the client includes:
By described Web page-container loads a webpage with the second communication object;
The first preset communication object is injected described Web page-container.
Method the most according to claim 1 and 2, it is characterised in that described first communication object In have task status monitor registration interface;
Described in described webpage, call described first communication object, to notify that described client starts feedback The step of the task status information of specifying of task includes:
Obtain the task identification of specifying of task;
Call described task status monitor registration interface, by described task identification send to described client, To notify that described client starts to feed back the task status information of task corresponding to described task identification.
Method the most according to claim 3, it is characterised in that described second communication object has Task status more new interface;
Described in described client, call described second communication object, with will when performing described task prison The task status information heard sends the step of extremely described webpage and includes:
Call described task status more new interface by Web page-container, described task identification correspondence will performed Task time the task status information that listens to send to described webpage.
5. according to the method described in claim 1 or 2 or 4, it is characterised in that also include:
Described first communication object is called in described webpage, described to notify that described client stops feedback The task status information of task.
Method the most according to claim 5, it is characterised in that have in described first communication object There is task status to monitor and solve registration interface;
Described in described webpage, call described communication object, described to notify that described client stops feedback The step of the task status information of task includes:
Call described task status to monitor solution registration interface, send the task identification of described task to the most described Client, to notify that described client stops feeding back the task status letter of task corresponding to described task identification Breath.
7. according to the method described in claim 2 or 4 or 6, it is characterised in that described Web page-container Including Webview control, described first communication object includes JS scripting object, and described second communication is right As including JS scripting object.
8. the device of a show task status in webpage, it is characterised in that including:
Webpage load-on module, for loading a webpage in the client, has first in described client Communication object, there is in described webpage the second communication object;
Task monitors Registering modules, for calling described first communication object in described webpage, with notice Described client starts to feed back the task status information of specifying of task;
Task status information feedback module, for calling described second communication object in described client, Send to described webpage with the task status information that will listen to when performing described task;
Task status information display module, for showing described task status information in described webpage.
Device the most according to claim 8, it is characterised in that described client has webpage and holds Device;Described webpage load-on module includes:
Web page-container loads submodule, right for having the second communication by loading one in described Web page-container The webpage of elephant;
Communication object injects submodule, for the first preset communication object is injected described Web page-container.
Device the most according to claim 8 or claim 9, it is characterised in that described first communication object In have task status monitor registration interface;
Described task is monitored Registering modules and is included:
Task identification obtains submodule, for obtaining the task identification of specifying of task;
Task status is monitored registration interface and is called submodule, is used for calling the monitoring registration of described task status and connects Mouthful, described task identification is sent to described client, to notify that described client starts to feed back described appointing The task status information of the task that business mark is corresponding.
11. devices according to claim 10, it is characterised in that described second communication object tool There is task status more new interface;
Described task status information feedback module includes:
Task status updates interface interchange submodule, for calling described task status more by Web page-container New interface, sends the task status information listened to when performing task corresponding to described task identification extremely Described webpage.
Device described in 12. according to Claim 8 or 9 or 11, it is characterised in that also include:
Task is monitored and is solved Registering modules, for calling described first communication object in described webpage, with logical Know that described client stops feeding back the task status information of described task.
13. devices according to claim 12, it is characterised in that in described first communication object There is task status and monitor solution registration interface;
Described task is monitored solution Registering modules and is included:
Task status is monitored solution registration interface and is called submodule, is used for calling described task status and monitors solution note Volume interface, the task identification of described task is sent to described client, to notify that described client stops Feed back the task status information of task corresponding to described task identification.
The client of 14. 1 kinds of show task status in webpage, it is characterised in that in described client In there is the first communication object, described client includes:
Webpage load-on module, for loading a webpage;At described webpage, there is task and process assembly and second Communication object;
Task status information feedback module, is used for calling described second communication object, with will perform described The task status information listened to during task sends to described webpage;
Described task processes assembly and includes:
Task monitors Registering modules, is used for calling described first communication object, to notify that described client is opened The task status information of the task that the feedback that begins is specified;
Task status information display module, is used for showing described task status information.
15. 1 kinds of mobile devices, it is characterised in that including:
Webpage load-on module, for loading a webpage in the client, has first in described client Communication object, there is in described webpage the second communication object;
Task monitors Registering modules, for calling described first communication object in described webpage, with notice Described client starts to feed back the task status information of specifying of task;
Task status information feedback module, for calling described second communication object in described client, Send to described webpage with the task status information that will listen to when performing described task;
Task status information display module, for showing described task status information in described 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 true CN105867984A (en) 2016-08-17
CN105867984B 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)

Cited By (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
CN108959062A (en) * 2017-05-22 2018-12-07 腾讯科技(深圳)有限公司 Web page element acquisition methods and device
CN110990170A (en) * 2019-11-29 2020-04-10 广州市百果园信息技术有限公司 Data structure, communication method, device, storage medium and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1870508A (en) * 2005-05-25 2006-11-29 中兴通讯股份有限公司 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
CN103034503A (en) * 2012-12-25 2013-04-10 北京奇虎科技有限公司 Script executing method, system and browser
CN104035977A (en) * 2014-05-23 2014-09-10 小米科技有限责任公司 Webpage loading method and device
CN104462516A (en) * 2014-12-22 2015-03-25 联想(北京)有限公司 Information prompt method and mobile terminal
CN104750470A (en) * 2013-12-27 2015-07-01 广州华多网络科技有限公司 Client and application communicating method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1870508A (en) * 2005-05-25 2006-11-29 中兴通讯股份有限公司 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
CN103034503A (en) * 2012-12-25 2013-04-10 北京奇虎科技有限公司 Script executing method, system and browser
CN104750470A (en) * 2013-12-27 2015-07-01 广州华多网络科技有限公司 Client and application communicating method and device
CN104035977A (en) * 2014-05-23 2014-09-10 小米科技有限责任公司 Webpage loading method and device
CN104462516A (en) * 2014-12-22 2015-03-25 联想(北京)有限公司 Information prompt method and mobile terminal

Cited By (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
CN108959062A (en) * 2017-05-22 2018-12-07 腾讯科技(深圳)有限公司 Web page element acquisition methods and device
CN110990170A (en) * 2019-11-29 2020-04-10 广州市百果园信息技术有限公司 Data structure, communication method, device, storage medium and equipment

Also Published As

Publication number Publication date
CN105867984B (en) 2017-09-05

Similar Documents

Publication Publication Date Title
US20230342412A1 (en) System and method for dynamically enabling customized web content and applications
US9268758B2 (en) Method for associating third party content with online document signing
US7680927B2 (en) System and method for providing testing for a communities framework
US20150095820A1 (en) Service for generation of customizable display widgets
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
US8930824B2 (en) Facilitating propagation of user interface patterns or themes
US20040167989A1 (en) Method and system for creating and managing a website
JP2009531793A (en) System and method for converting web community and web application data
TW201723897A (en) Method, device, and system for displaying information associated with a web page
US20200226615A1 (en) Customer service representative dashboard application
US20080126537A1 (en) Method for automatic definition and assembly of composite portal applications
US20170230474A1 (en) Service component management methods and systems
US10417317B2 (en) Web page profiler
US20140244784A1 (en) Website Impersonation System and Method
WO2017107851A1 (en) Method and device for releasing and updating desktop application component
CN111177613A (en) Page processing method, device, equipment and storage medium
US20120173965A1 (en) Dynamic web portal page
CN110213105A (en) It is a kind of cross-platform micro- using creation method
US20160269446A1 (en) Template representation of security resources
CN105867984A (en) Method, device and client for displaying task state in web page as well as mobile equipment
US10089406B2 (en) Generating web pages with integrated content
CN109284488B (en) Method, device and medium for modifying front-end table column data based on local storage
US10268490B2 (en) Embedding user interface snippets from a producing application into a consuming application
CN113792208B (en) Picture interaction method, device, equipment, medium and program product based on webpage

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