Summary of the invention
The technical problem that the present invention mainly solves provides the method to set up of a kind of portable terminal and browser of mobile terminal proxy configurations information, can set rapidly the browser agent configuration information of portable terminal.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: a kind of method to set up of browser of mobile terminal proxy configurations information is provided, and the method comprises: to user's display position map; Obtain the proxy configurations information corresponding with positional information that positional information that the user selects and user arrange in situational map, to generate the corresponding table of positional information and proxy configurations information; The corresponding table of storage is in order to inquiry; Obtain the current positional information of portable terminal; From the correspondence table, inquire about the browser agent configuration information corresponding with positional information according to positional information; The browser agent configuration information of portable terminal is set according to the proxy configurations information that inquires.
Wherein, the step of obtaining the current positional information of portable terminal specifically comprises: cell ID location and/or WLAN (wireless local area network) location by global positioning system location, base station obtain the current positional information of portable terminal.The step of obtaining the current positional information of portable terminal also comprises afterwards: judge whether positional information is present in the corresponding table; If be present in the corresponding table, then the positional information obtained of executive basis is inquired about the step of the proxy configurations information corresponding with positional information from the correspondence table; If be not present in the corresponding table, the browser agent configuration information of portable terminal then be set be the proxy configurations information of acquiescence.
Wherein, the step of obtaining the current positional information of portable terminal of cell ID location and/or the WLAN (wireless local area network) location by global positioning system location, base station specifically comprises: the cell ID location by global positioning system location, base station and/or WLAN (wireless local area network) are located with the default cycle and are periodically obtained the current positional information of portable terminal.
Wherein, proxy configurations information comprises proxy server address, port numbers, user name and password.
For solving the problems of the technologies described above, another technical solution used in the present invention is: a kind of portable terminal is provided, and this portable terminal comprises setting module, locating module, enquiry module and module is set.Setting module is used for generating according to user's operation the correspondence table of positional information and proxy configurations information, wherein, setting module specifically comprises display unit, user interface section and memory cell, display unit is used for to user's display position map, user interface section is used for obtaining the proxy configurations information corresponding with positional information that positional information that situational map that the user shows at display unit selects and user arrange, to generate corresponding table, memory cell is used for the corresponding table of storage in order to inquiry.Locating module is used for obtaining the current positional information of portable terminal, and the positional information that enquiry module is used for obtaining according to locating module is from the correspondence table inquiry browser agent configuration information corresponding with positional information; The browser agent configuration information that module is used for arranging according to the proxy configurations information that enquiry module inquires portable terminal is set.
Wherein, locating module is with the default current positional information of cycle timing acquisition portable terminal.Portable terminal also comprises judge module, and this judge module is used for judging whether positional information is present in corresponding table, if be present in the corresponding table, then enquiry module is inquired about the proxy configurations information corresponding with positional information according to the positional information of obtaining from the correspondence table; If be not present in the corresponding table, the proxy configurations information of browser agent configuration information for giving tacit consent to that module arranges portable terminal is set then.
Wherein, the locate mode of locating module is cell ID location and/or the WLAN (wireless local area network) location of global positioning system location, base station.
Wherein, proxy configurations information comprises proxy server address, port numbers, user name and password, and portable terminal is mobile phone, panel computer or personal digital assistant.
The present invention obtains the current positional information of portable terminal; According to positional information inquiry browser agent configuration information corresponding with positional information from default correspondence table; The browser agent configuration information of portable terminal is set according to the proxy configurations information that inquires.The present invention can be automatically according to the browser agent configuration information of the set positions portable terminal at user place, when the user is in the position of setting, the automatic browser agent configuration information of the portable terminal proxy configurations information that is set to set.The present invention can quick-setting proxy configurations information and is difficult for makeing mistakes, and is convenient for users to use.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.Following examples only are used for explanation the present invention, but should not be used for limiting scope of the present invention.
See also Fig. 1, Fig. 1 is the structural representation of portable terminal one embodiment of the present invention.
In the present embodiment, portable terminal can comprise setting module 11, locating module 12, judge module 13, enquiry module 141 and module 142 is set.
Wherein, setting module 11 is used for generating according to user's operation the correspondence table of positional information and proxy configurations information.Particularly, setting module 11 can comprise display unit 111, user interface section 112 and memory cell 113.Display unit 111 is used for to user's display position map, and the user can select different positions in situational map, then for each position corresponding proxy configurations information is set.The user is the corresponding position on the touch location map directly, also can input the coordinate of longitude and latitude of selected position with the position on the chosen position map, and the present invention is not construed as limiting this.Proxy configurations information comprises proxy server address, port numbers, user name and password.User interface section 112 is used for obtaining the proxy configurations information corresponding with positional information that positional information that situational map that the user shows at display unit 111 selects and user arrange, to generate corresponding table.113 of memory cell are used for the corresponding table of storage.It is pointed out that in the correspondence table, can also can be set to according to actual needs the corresponding relation of the corresponding proxy configurations information of a plurality of positional informations for concerning one to one between positional information and the proxy configurations information, be not construed as limiting at this.
Locating module 12 is used for obtaining the current positional information of portable terminal.The locate mode of locating module 12 can be located for global positioning system, the cell ID of base station is located or the Wi-Fi location, certainly, also can locate for global positioning system, any two kinds combination or three kinds of auxiliary uses in the cell ID of base station location and the Wi-Fi location, be not construed as limiting at this.Locating module 12 is with the default current positional information of cycle timing acquisition portable terminal, particularly, can be provided with the timer (not shown) on the portable terminal, the user arranges the cycle at timer, and locating module 12 can obtain the current positional information of portable terminal one time in each cycle.The length in cycle can be decided according to self designing of portable terminal, and the present invention is not construed as limiting this.
Judge module 13 is used for judging whether positional information is present in corresponding table.
After locating module 12 obtained the current positional information of portable terminal, judge module 13 judged whether this positional information is present in the corresponding table.If this positional information is present in the corresponding table, enquiry module 141 is inquired about the proxy configurations information corresponding with positional information according to the positional information of obtaining from the correspondence table, the browser agent configuration information that module 142 these proxy configurations information are set to portable terminal is set; If this positional information is not present in and should shows, then enquiry module 141 notices arrange module 142 and the browser agent configuration information of portable terminal is set is the proxy configurations information of acquiescence.
Tell about the process that present embodiment arranges the browser agent configuration information below in conjunction with table 1.Wherein, table 1 is the correspondence table of positional information and the proxy configurations information of portable terminal embodiment of the present invention.
Table 1
The locate mode of locating module 12 is the global positioning system location in the present embodiment.If it is 113 ° of 46' of east longitude that locating module 12 gets access to the positional information of current mobile terminal, 22 ° of 27' of north latitude, judge module 13 judges that this positional information is present in the corresponding table, judge module 13 notice enquiry modules 141 are inquired about and 113 ° of 46' of east longitude the proxy configurations information that 22 ° of 27' of north latitude are corresponding from the correspondence table.The browser agent configuration information that module 142 arranges this proxy configurations information portable terminal is set.Particularly, the address that module 142 acting servers are set is set to server.proxy.com, and the acting server port is set to 8080 and automatically input user name " Zhang " and user cipher " 123456 ".Be not present in the corresponding table if judge module 13 judgement locating modules 12 get access to the position positional information of current mobile terminal, the proxy configurations information that module 142 browser agent configuration informations are set to give tacit consent to then is set.Next cycle, locating module 12 obtains the positional information of current mobile terminal again.Certainly, positional information in the corresponding table also can be the specified scope centered by some latitude and longitude coordinates, such as 113 ° of 46' ± 0 ° 6' of east longitude, 22 ° of 27' ± 0 ° 5' of north latitude, all are in all corresponding identical proxy configurations information in position in this longitude and latitude specified scope.The size of longitude and latitude scope can set up on their own according to user's use needs, and the present invention is not construed as limiting this.
Wherein, portable terminal can be mobile phone, panel computer or personal digital assistant in the present embodiment, and the present invention is not construed as limiting this.
Setting module 11 generates the correspondence table of positional information and proxy configurations information in the present embodiment according to user's operation, locating module 12 obtains the current positional information of portable terminal, enquiry module 141 arranges the browser agent configuration information that proxy configurations information corresponding with current positional information in the module 142 correspondence tables is set to portable terminal according to the corresponding table of place information inquiry.The present invention can be automatically according to the browser agent configuration information of the set positions portable terminal at user place, if when the user is in the position of setting, the automatic browser agent configuration information of the portable terminal proxy configurations information that is set to set; When if the user is not in the position of setting, the proxy configurations information that the browser agent configuration information of automatic portable terminal is set to give tacit consent to.The present invention can quick-setting proxy configurations information and is difficult for makeing mistakes, and is convenient for users to use.
See also Fig. 2, Fig. 2 is the flow chart of method to set up one embodiment of browser of mobile terminal proxy configurations information of the present invention.Present embodiment may further comprise the steps.
Step S201: the correspondence table that generates positional information and proxy configurations information according to user's operation.
Wherein, portable terminal is to user's display position map, and the user can select different positions in situational map, then for each position corresponding proxy configurations information is set.The user is the corresponding position on the touch location map directly, also can input the coordinate of longitude and latitude of selected position with the position on the chosen position map, and the present invention is not construed as limiting this.Proxy configurations information comprises proxy server address, port numbers, user name and password.Obtain the proxy configurations information corresponding with positional information that positional information that the user selects and user arrange in situational map after, generate corresponding table and also store this correspondence table.It is pointed out that in the correspondence table, can also can be set to according to actual needs the corresponding relation of the corresponding proxy configurations information of a plurality of positional informations for concerning one to one between positional information and the proxy configurations information, be not construed as limiting at this.
Step S202: obtain the current positional information of portable terminal.
Wherein, portable terminal by global positioning system location, base station cell ID location and/or Wi-Fi location and periodically obtain the current positional information of portable terminal with the default cycle.Particularly, the user can arrange the cycle voluntarily, and each cycle is obtained the current positional information of portable terminal one time.The length in above-mentioned cycle can be decided according to self designing of portable terminal, and the present invention is not construed as limiting this.
Step S203: judge whether positional information is present in the corresponding table.If not, execution in step S206, if, execution in step S204 then.
Step S204: from the correspondence table, inquire about the proxy configurations information corresponding with positional information according to the positional information of obtaining.
As shown in table 1, if the positional information of the current mobile terminal that gets access to is 113 ° of 46' of east longitude, 22 ° of 27' of north latitude, question blank 1 obtains and 113 ° of 46' of east longitude, the proxy configurations information that 22 ° of 27' of north latitude are corresponding.
Step S205: the browser agent configuration information that portable terminal is set according to proxy configurations information.
Particularly, the address of acting server is set to server.proxy.com, and the acting server port is set to 8080 and automatically input user name " Zhang " and user cipher " 123456 ".
Step S206: the browser agent configuration information of portable terminal is set is the proxy configurations information of acquiescence.
Wherein, if positional information is not present in the corresponding table proxy configurations information that automatic browser agent configuration information is set to give tacit consent to.
The present invention generates the correspondence table of positional information and proxy configurations information according to user's operation, obtain the current positional information of portable terminal and according to the corresponding table of place information inquiry, and the proxy configurations information corresponding with current positional information is set to the browser agent configuration information of portable terminal in the correspondence table.The present invention can be automatically according to the browser agent configuration information of the set positions portable terminal at user place, if when the user is in the position of setting, the automatic browser agent configuration information of the portable terminal proxy configurations information that is set to set; When if the user is not in the position of setting, the proxy configurations information that the browser agent configuration information of automatic portable terminal is set to give tacit consent to.The present invention can quick-setting proxy configurations information and is difficult for makeing mistakes, and is convenient for users to use.
Below only be embodiments of the invention; be not so limit claim of the present invention; every equivalent structure or equivalent flow process conversion that utilizes specification of the present invention and accompanying drawing content to do; or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.