Summary of the invention
The purpose of this invention is to provide a kind of WAP page and preserve the methods, devices and systems of telephone number, it can be saved in the telephone number on the WAP page local address book.
For achieving the above object, the present invention adopts following technical scheme:
A kind of WAP page is preserved the method for telephone number, comprising:
Step 1: portable terminal sends the HTTP request, and the URL that visit is corresponding obtains the server WAP page, includes the script of preserving telephone number in this WAP page;
Step 2: portable terminal analyzing WAP page content, all page-tag are carried out analyzing and processing;
Step 3: portable terminal obtains all page-tag of preserving number and further handles, according to label body type attribute, and registration mobile phone users click event;
Step 4: when the user clicked the hyperlink of preserving number in the WAP page, portable terminal response user operation was saved to wherein telephone number in the address book of portable terminal.
Further, describedstep 4 comprises:
Step 41: according to label body type attribute, parse operation type;
Step 42: when action type is when preserving telephone number, call the portable terminal bottom and preserve the number function, the value of label body name attribute is saved as the name of number in the address book, the number series among the label body href is saved as the particular content of number in the address book.
Further, describedstep 4 also comprises:
Step 42 ': when action type when dialing phone number, call portable terminal dialing numbers function and directly dial number series among the label body href.
Further, describedstep 4 also comprises:
Step 421 ": when action type for dialing and when preserving telephone number; call the portable terminal bottom and preserve the number function; the value of label body name attribute is saved as the name of number in the address book, the number series among the label body href is saved as the particular content of number in the address book;
Step 422 ": call portable terminal dialing numbers function and directly dial number series among the label body href.
A kind of portable terminal comprises:
WAP page acquisition module is used to send the HTTP request, and the URL that visit is corresponding obtains the server WAP page, includes the script of preserving telephone number in this WAP page;
Parsing module is used for the analyzing WAP page content, and all page-tag are carried out analyzing and processing;
Registering modules is used to obtain all page-tag of preserving number and further handles, according to label body type attribute, and registration mobile phone users click event;
Preserve module, be used for when the user when the WAP page is clicked the hyperlink of preserving number, portable terminal response user operates, and wherein telephone number is saved in the address book of portable terminal.
Further, described preservation module comprises:
Analyzing sub-module is used for the attribute according to label body type, the parse operation type;
First preserves submodule, be used for when action type is the preservation telephone number, call the portable terminal bottom and preserve the number function, the value of label body name attribute is saved as the name of number in the address book, the number series among the label body href is saved as the particular content of number in the address book.
Further, described preservation module also comprises:
First dials submodule, be used for when action type when dialing phone number, call portable terminal dialing numbers function and directly dial number series among the label body href.
Further, described preservation module also comprises:
Second preserves submodule, be used for when action type for dialing and when preserving telephone number, call the portable terminal bottom and preserve the number function, the value of label body name attribute is saved as the name of number in the address book, the number series among the label body href is saved as the particular content of number in the address book;
Second dials submodule, is used for calling the number series that portable terminal dialing numbers function is directly dialed label body href.
A kind of server comprises:
Receiver module is used for the HTTP request that mobile terminal receive sends;
Sending module is used to return the WAP page of asking corresponding URL with described HTTP, includes the script of preserving telephone number in this WAP page.
A kind of communication system comprises server and portable terminal, wherein,
Described server comprises:
Receiver module is used for the HTTP request that mobile terminal receive sends;
Sending module is used to return the WAP page of asking corresponding URL with described HTTP, includes the script of preserving telephone number in this WAP page;
Described portable terminal comprises:
WAP page acquisition module is used to send the HTTP request, and the URL that visit is corresponding obtains the server WAP page;
Parsing module is used for the analyzing WAP page content, and all page-tag are carried out analyzing and processing;
Registering modules is used to obtain all page-tag of preserving number and further handles, according to label body type attribute, and registration mobile phone users click event;
Preserve module, be used for when the user when the WAP page is clicked the hyperlink of preserving number, portable terminal response user operates, and wherein telephone number is saved in the address book of portable terminal.
The WAP page provided by the invention is preserved the methods, devices and systems of telephone number, the telephone number on the WAP page can be saved in local address book, has simplified user's operation, provides convenience for the user uses, and has optimized user experience.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The invention provides a kind of WAP page and preserve the method for telephone number, as shown in Figure 1, comprising:
Step 1: portable terminal sends HTTP (HyperText Transfer Protocol, HTML (Hypertext Markup Language)) request, URL (the Uniform Resource Locator that visit is corresponding, URL(uniform resource locator)), obtain the server WAP page, include the script of preserving telephone number in this WAP page;
Among the present invention, need at server end the WAP page to be edited in advance, make it include the script of preserving telephone number.The function that this script is realized promptly is the telephone number (title of correspondence when also preferably identifying the number preservation) that identifies in the WAP page, then this telephone number is saved in the address book of portable terminal.The writing to adopt of script well known to a person skilled in the art that any technology realizes.
Step 2: portable terminal analyzing WAP page content, all page-tag are carried out analyzing and processing;
Step 3: portable terminal obtains all page-tag of preserving number and further handles, according to label body type attribute, and registration mobile phone users click event;
Step 4: when the user clicked the hyperlink of preserving number in the WAP page, portable terminal response user operation was saved to wherein telephone number in the address book of portable terminal.
In this step, owing to from the WAP page that server obtains, included the script of preserving telephone number, and step 2-3 handles the page, also registered the mobile phone users click event, therefore, when the user clicks the hyperlink of preserving number, just can realize the preservation of telephone number in the WAP page at an easy rate in this step.
Therefore, the present invention can be saved in the telephone number on the WAP page local address book, has simplified user's operation, provides convenience for the user uses, and has optimized user experience.
Fig. 2 is more detailed improved embodiment on the basis of Fig. 1.As shown in Figure 2,abovementioned steps 4 preferably includes:
Step 41: according to label body type (type) attribute, the parse operation type is so that operate accordingly according to this action type that parses in subsequent step;
Step 42: when action type is when preserving telephone number (i.e. " save " shown in the figure), call the portable terminal bottom and preserve the number function, the value of label body name (title) attribute is saved as the name of number in the address book, number series among the label body href (Hyperlink Reference, hyperlink is quoted) is saved as the particular content of number in the address book.
For the label in the WAP page, the href property value is the number series of operation, and the name property value is for preserving the name in the address book, and the type property value is an action type.According to the difference of this three's attribute, carried out correspondingly handling operation, thereby made things convenient for the preservation of user among the present invention telephone number.
The WAP page with the wireless IVR channel of phoenix correspondence is an example, the telephone number that dynamic community column in this WAP page (being used to allow the user listen to entertainment) is corresponding is 125906725, and the telephone number that the sound column of phoenix (being used to allow the user participate in program has argument) is corresponding is 125906722.At this moment, for dynamic community column, the property value of name then is " phoenix is wireless dynamic community " in its corresponding label, the property value of href then is " 125906725 ", the type property value can be " save ", also can be " callsave " shown in Fig. 2, not preserve when needing that the type property value can be " call " when this telephone number; And for the sound column of phoenix, the property value of name then is " sound of the wireless phoenix of phoenix " in its corresponding label, and the property value of href then is " 125906722 ", and the type property value can be " save ", " call " or " callsave " equally.
Be to have adopted the mode of calling portable terminal bottom preservation number function to preserve number in above-mentioned steps 42.One skilled in the art will appreciate that this only is an execution mode more preferably, those skilled in the art can also adopt other modes to realize, for example, directly the address book file are carried out read-write operation etc. at dissimilar portable terminals.
In Fig. 2, in order to realize dialing the function of telephone number in the WAP page, describedstep 4 can also comprise:
Step 42 ': when action type when dialing phone number (i.e. " call " shown in the figure), call portable terminal dialing numbers function and directly dial number series among the label body href.
Certainly, one skilled in the art will appreciate that and telephone number is not preserved this moment, and only realized the function that dials phone number.
Simultaneously, in Fig. 2, for the function that realizes not only dialing phone number but also preserving telephone number, describedstep 4 can also comprise:
Step 421 ": when action type when dialing and preserving telephone number (i.e. " callsave " shown in the figure); call the portable terminal bottom and preserve the number function; the value of label body name attribute is saved as the name of number in the address book, the number series among the label body href is saved as the particular content of number in the address book;
Step 422 ": call portable terminal dialing numbers function and directly dial number series among the label body href.
Significantly, above-mentioned steps 422 " can be prior to step 421 " carry out, or these two steps also can be carried out simultaneously.
The method of preserving telephone number with the above-mentioned WAP page is corresponding, and the present invention also provides a kind of portable terminal, server and communication system.
As shown in Figure 3, portable terminal provided by the invention comprises:
WAPpage acquisition module 301 is used to send the HTTP request, and the URL that visit is corresponding obtains the server WAP page, includes the script of preserving telephone number in this WAP page;
Parsingmodule 302 is used for the analyzing WAP page content, and all page-tag are carried out analyzing and processing;
Registeringmodules 303 is used to obtain all page-tag of preserving number and further handles, according to label body type attribute, and registration mobile phone users click event;
Preserve module 304, be used for when the user when the WAP page is clicked the hyperlink of preserving number, portable terminal response user operates, and wherein telephone number is saved in the address book of portable terminal.
Preferably, describedpreservation module 304 comprises:
Analyzing sub-module is used for the attribute according to label body type, the parse operation type;
First preserves submodule, be used for when action type is the preservation telephone number, call the portable terminal bottom and preserve the number function, the value of label body name attribute is saved as the name of number in the address book, the number series among the label body href is saved as the particular content of number in the address book.
Preferably, describedpreservation module 304 also comprises:
First dials submodule, be used for when action type when dialing phone number, call portable terminal dialing numbers function and directly dial number series among the label body href.
Preferably, describedpreservation module 304 also comprises:
Second preserves submodule, be used for when action type for dialing and when preserving telephone number, call the portable terminal bottom and preserve the number function, the value of label body name attribute is saved as the name of number in the address book, the number series among the label body href is saved as the particular content of number in the address book;
Second dials submodule, is used for calling the number series that portable terminal dialing numbers function is directly dialed label body href.
As shown in Figure 4, server provided by the invention comprises:
Receiver module 401 is used for the HTTP request that mobile terminal receive sends;
Sendingmodule 402 is used to return the WAP page of asking corresponding URL with described HTTP, includes the script of preserving telephone number in this WAP page.
As shown in Figure 5, communication system provided by the invention comprises server 40 and portable terminal 30, wherein,
Described server 40 comprises:
Receiver module 401 is used for the HTTP request that mobile terminal receive sends;
Sendingmodule 402 is used to return the WAP page of asking corresponding URL with described HTTP, includes the script of preserving telephone number in this WAP page;
Described portable terminal 30 comprises:
WAPpage acquisition module 301 is used to send the HTTP request, and the URL that visit is corresponding obtains the server WAP page;
Parsingmodule 302 is used for the analyzing WAP page content, and all page-tag are carried out analyzing and processing;
Registeringmodules 303 is used to obtain all page-tag of preserving number and further handles, according to label body type attribute, and registration mobile phone users click event;
Preserve module 304, be used for when the user when the WAP page is clicked the hyperlink of preserving number, portable terminal response user operates, and wherein telephone number is saved in the address book of portable terminal.
Portable terminal of the present invention, server and communication system can be saved in the telephone number on the WAP page local address book, have simplified user's operation, provide convenience for the user uses, and have optimized user experience.
The above is preferred embodiment of the present invention only, is not to be used for limiting practical range of the present invention; If do not break away from the spirit and scope of the present invention, the present invention is made amendment or is equal to replacement, all should be encompassed in the middle of the protection range of claim of the present invention.