CN106202289B - Webpage positioning method and electronic equipment - Google Patents

Webpage positioning method and electronic equipment Download PDF

Info

Publication number
CN106202289B
CN106202289B CN201610509414.6A CN201610509414A CN106202289B CN 106202289 B CN106202289 B CN 106202289B CN 201610509414 A CN201610509414 A CN 201610509414A CN 106202289 B CN106202289 B CN 106202289B
Authority
CN
China
Prior art keywords
positioning
webpage
data
browser
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610509414.6A
Other languages
Chinese (zh)
Other versions
CN106202289A (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201610509414.6A priority Critical patent/CN106202289B/en
Publication of CN106202289A publication Critical patent/CN106202289A/en
Application granted granted Critical
Publication of CN106202289B publication Critical patent/CN106202289B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a webpage positioning method and electronic equipment, wherein the webpage positioning method comprises the following steps: the browser responds to the webpage opening request to generate a webpage positioning request; the browser sends the webpage positioning request to a target application program on the electronic equipment, wherein the target application program can be positioned through a positioning function of the browser; the browser receives positioning result information sent by the target application program responding to the webpage positioning request; and the browser injects positioning data into the webpage according to the positioning result information. In the technical scheme, the positioning request is sent to the target application request with the positioning function installed on the electronic equipment, the target application program is used for positioning, and the positioning result information fed back by the target application program is received to realize the webpage positioning, so that the technical problem that the coreless browser in the prior art cannot perform the webpage positioning is solved, and the webpage positioning of the coreless browser is realized.

Description

Webpage positioning method and electronic equipment
Technical Field
The invention relates to the technical field of networks, in particular to a webpage positioning method and electronic equipment.
Background
With the continuous development of scientific technology, the network technology is developed rapidly, people can not only obtain various data through the network, but also can obtain relevant position information through the web page in a positioning way, and great convenience is brought to the life of people.
In the prior art, browsers are classified into a cored browser and a coreless browser. The web page location of the coreless browser is usually realized by means of a location function inside an operating system, for example, in an Android system, the web page location requires support of GMS (Google Mobile Service). However, many positioning functions in the smartphone operating system are castrated, for example, GMS services in the Android system are castrated, which results in a problem that a web page cannot be positioned.
Disclosure of Invention
In view of the above, the present invention is directed to a web page positioning method and an electronic device, which overcome the above problems or at least partially solve the above problems.
One aspect of the present invention provides a method for positioning a web page, which is applied to an electronic device, and includes:
the browser responds to the webpage opening request to generate a webpage positioning request;
the browser sends the webpage positioning request to a target application program on the electronic equipment, wherein the target application program can be positioned through a positioning function of the browser;
the browser receives positioning result information sent by the target application program responding to the webpage positioning request;
and the browser injects positioning data into the webpage according to the positioning result information.
Optionally, the browser injects positioning data into the webpage according to the positioning result information, including:
if the positioning result information contains positioning success information, the browser acquires position data in the positioning success information;
and the browser injects the position data into the webpage as the positioning data.
Optionally, the browser injects positioning data into the webpage according to the positioning result information, including:
if the positioning result information contains positioning failure information or positioning overtime information, the browser injects the positioning failure information or the positioning overtime information into the webpage as the positioning data, or injects preset position data into the webpage as the positioning data.
Optionally, the preset position data includes: the browser obtains previous positioning data, local position data or common positioning data before responding to a webpage opening request, wherein the common positioning data are position data with the highest use frequency in a preset time period.
Optionally, after injecting the positioning data into the web page, the method further includes:
the browser acquires target position data input by a user;
and the browser modifies the positioning data into the target position data and sends the target position data to the target application program, so that the target application program corrects the subsequent positioning according to the target position data.
Optionally, the generating, by the browser, a web page positioning request in response to the web page opening request includes:
the browser responds to a webpage opening request, when a webpage is started to be opened, the browser injects the previous positioning data acquired by the browser before responding to the webpage opening request into the webpage, and generates the webpage positioning request;
the browser injects positioning data into the webpage according to the positioning result information, and the method comprises the following steps:
and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the prior positioning data.
Optionally, the generating, by the browser, a web page positioning request in response to the web page opening request includes:
the browser responds to a webpage opening request, when a webpage is started to be opened, local position data acquired by the browser before responding to the webpage opening request are injected into the webpage, and a webpage positioning request is generated;
the browser injects positioning data into the webpage according to the positioning result information, and the method comprises the following steps:
and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the local position data.
Optionally, the generating, by the browser, a web page positioning request in response to the web page opening request includes:
the browser responds to a webpage opening request, when a webpage is started to be opened, common positioning data acquired by the browser before the webpage opening request is responded are injected into the webpage, and the webpage positioning request is generated, wherein the common positioning data are position data with the highest use frequency in a preset time period;
the browser injects positioning data into the webpage according to the positioning result information, and the method comprises the following steps:
and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the common positioning data.
In another aspect of the present invention, an electronic device is provided, including:
the browsing unit is used for responding to the webpage opening request and generating a webpage positioning request;
the sending unit is used for sending the webpage positioning request to a target application program on the electronic equipment, wherein the target application program can be positioned through a positioning function of the target application program;
a receiving unit, configured to receive positioning result information sent by the target application program in response to the web page positioning request;
and the injection unit is used for injecting positioning data into the webpage according to the positioning result information.
Optionally, the injection unit is configured to: if the positioning result information contains positioning success information, the browser acquires position data in the positioning success information; and the browser injects the position data into the webpage as the positioning data.
Optionally, the injection unit is further configured to: if the positioning result information contains positioning failure information or positioning overtime information, the browser injects the positioning failure information or the positioning overtime information into the webpage as the positioning data, or injects preset position data into the webpage as the positioning data.
Optionally, the preset position data includes:
the browser obtains previous positioning data, local position data or common positioning data before responding to a webpage opening request, wherein the common positioning data are position data with the highest use frequency in a preset time period.
Optionally, the electronic device further includes:
the acquisition unit is used for acquiring target position data input by a user after the positioning data is injected into the webpage;
and the updating unit is used for modifying the positioning data into the target position data and sending the target position data to the target application program so that the target application program can modify the subsequent positioning according to the target position data.
Optionally, the browsing unit is further configured to: responding to a webpage opening request, and when starting to open a webpage, injecting the previous positioning data acquired before responding to the webpage opening request into the webpage and generating the webpage positioning request;
the injection unit is used for: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the prior positioning data.
Optionally, the browsing unit is further configured to: responding to a webpage opening request, when starting to open a webpage, injecting local position data acquired before responding to the webpage opening request into the webpage, and generating a webpage positioning request;
the injection unit is used for: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the local position data.
Optionally, the browsing unit is further configured to: responding to a webpage opening request, and when starting to open a webpage, injecting common positioning data acquired before responding to the webpage opening request into the webpage and generating the webpage positioning request, wherein the common positioning data is position data with the highest use frequency in a preset time period;
the injection unit is used for: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the common positioning data.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages:
when the webpage positioning is needed, a positioning request is sent to a target application request with a positioning function installed on the electronic equipment, so that the positioning is carried out through a target application program, positioning result information fed back by the target application program is received, and positioning data is injected into the webpage according to the positioning result information, so that the technical problem that a coreless browser in the prior art cannot carry out the webpage positioning is solved, and the webpage positioning of the coreless browser is realized.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flowchart illustrating a web page locating method according to an embodiment of the invention;
fig. 2 shows a schematic view of an electronic device according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the invention provides a webpage positioning method and electronic equipment, which are used for solving the technical problem that a coreless browser in the prior art cannot position a webpage.
Referring to fig. 1, an embodiment of the present application provides a web page positioning method applied to an electronic device, including:
s10: the browser responds to the webpage opening request to generate a webpage positioning request;
s20: the browser sends the webpage positioning request to a target application program on the electronic equipment, wherein the target application program can be positioned through a positioning function of the browser;
s30: the browser receives positioning result information sent by the target application program responding to the webpage positioning request;
s40: and the browser injects positioning data into the webpage according to the positioning result information.
When a browser opens a web page, it is usually necessary to locate the position of the user in order to provide more effective services to the user, such as: when a certain shopping website is opened, the current position information of the electronic equipment needs to be positioned, and then commodity recommendation can be carried out according to the positioning result. For web page positioning, the embodiment of the present application provides a new positioning method, and when a user initiates a web page opening request, S10 is executed: the browser generates a web page positioning request in response to the web page opening request. The web page location request is used to request location from a target application installed on the electronic device, and for this reason, the next step S20 is performed. Certainly, the browser responds to the webpage opening request to generate a webpage positioning request, and simultaneously generates a webpage data acquisition request, carries out webpage data loading and other webpage opening operations.
S20 the browser sends a web page location request to a target application on the electronic device. The target application program can be positioned through the positioning function of the target application program, and positioning result information can be sent to the browser, so that the current position of the electronic equipment can be obtained no matter whether the browser is a cored browser or a coreless browser, and webpage positioning can be achieved. The target application may be a mapping application, such as: baidu maps, Gaode maps, dog search maps, etc. Specifically, an interface may be set between the browser and the target application program, and the positioning request may be sent to the target application program through the interface, or the positioning request may be sent to the target application program through the operating system, for example, the browser sends the positioning request to the operating system, and the operating system calls the target application program according to the positioning request and sends the positioning request to the target application program. The positioning request sent by the operating system is not limited by a target application program and has universality.
And when receiving the positioning request, the target application program responds to the positioning request to position the current position of the electronic equipment to obtain positioning result information. The target application program has a positioning function, is a map and navigation application program, has the excellent performance of accurate and quick positioning, and can obtain an accurate positioning result. And after the target application program obtains the positioning result information in the positioning mode, feeding the positioning result information back to the browser.
S30 the browser receives the positioning result information sent by the target application program responding to the webpage positioning request. Similarly, the browser may receive the positioning result information through an interface with the target application program, or may receive the positioning result information through the operating system.
Further executing S40, the browser injects the positioning data into the web page according to the received positioning result information. The positioning result information includes three types: 1. and 2, positioning success information, 2, positioning failure information, 3, positioning overtime information, and the browser can inject different positioning data into the webpage according to the received different positioning result information. Specifically, when the positioning result information includes the positioning success information, the browser may obtain the position data in the positioning success information, and inject the obtained position data into the web page as the positioning data. The location data may be location coordinates coords or may be address names corresponding to the location coordinates. An example of callback injection location success information is as follows:
public static final String LOCATION_SUCCESS=
"javascript:hackLocationSuccess({coords:{latitude:%f,longitude:%f,accuracy:%f}})";
when the positioning result information contains positioning failure information or positioning overtime information, the browser injects the positioning failure information or the positioning overtime information into the webpage as positioning data, or injects preset position data into the webpage as the positioning data. The positioning failure information and the positioning timeout information may be specific text information, or may be code information, for example: positioning failure information can be represented by 01231, positioning timeout information can be represented by 01230, and callback injection examples of positioning failure information and positioning timeout information are as follows:
public static final String LOCATION_FAILED=
"javascript:hackLocationFailed({TIMEOUT:0,POSITION_UNAVAILABLE:1,PERMISSION_DENIED:2,UNKNOWN_ERROR:3,code:1});";
public static final String LOCATION_TIMEOUT=
"javascript:hackLocationFailed({TIMEOUT:0,POSITION_UNAVAILABLE:1,PERMISSION_DENIED:2,UNKNOWN_ERROR:3,code:0});";
when injecting preset position data into the webpage as positioning data, the preset position data can be: prior location data, local location data, or general location data acquired by the browser prior to responding to the web page open request. Wherein, the positioning data before is the positioning data that the browser obtained at the last webpage positioning, for example: if the positioning data obtained in the previous webpage positioning is 'Chengdu', the 'Chengdu' is injected into the webpage when the positioning fails; the local location data is a home location of a communication number corresponding to the electronic device, for example: the attribution of the electronic equipment corresponding to the communication number 185XXXX0231 is 'Beijing', the local position data is 'Beijing', and when the positioning fails, the 'Beijing' is injected into a webpage; the common positioning data is the position data with the highest frequency of use within a preset time period, for example: assuming that the preset time period is one week, if the position data with the highest use frequency in one week of the user is "Wuhan", the positioning is failed, and the "Wuhan" is used as the positioning data to be injected into the webpage.
According to the method and the device, after the positioning data are injected into the webpage, the interface for modifying the positioning data is provided for the user, and if the positioning data are inaccurate, the user can input accurate target position data on the interface. The method comprises the steps that a browser obtains target position data input by a user; and the positioning data displayed on the webpage is modified into target position data input by a user, and the target position data is sent to the target application program, so that the target application program has the target position data to modify subsequent positioning, the target application program is helped to obtain more accurate positioning data, and the function of feedback positioning is achieved.
In the practical application process, for a webpage needing webpage positioning, a page loading logic usually obtains positioning data first, and executes a subsequent webpage opening process after obtaining the positioning data, for example, obtaining webpage content data, related content data matched with the positioning data and the like, so that the situation that the webpage waits for the positioning data occurs, the loading of subsequent data is influenced, and the user experience is poor; and when the webpage is opened, injecting positioning data into the webpage for updating the preset position data according to the received positioning result information. The positioning data actually obtained by the target application may or may not be the same as the preset position data. When the data is different, the browser further updates the webpage data related to the positioning data in the webpage according to the positioning data.
The preset position data may be previous positioning data, local position data or common positioning data acquired by the browser before responding to the webpage opening request. Different positioning data injection is carried out aiming at different preset position data:
①, the browser responds to the webpage opening request, when the webpage onPageStarted () is started to be opened, previous positioning data acquired by the browser before responding to the webpage opening request are injected into the webpage, and a webpage positioning request is generated and sent, when the webpage is opened, the onPageFinished () is completed, positioning result information sent by the webpage positioning request fed back by a target application program is injected into the webpage according to the previous positioning data fed back by the target application program, and the positioning data is used for updating the previous positioning data.
②, the browser responds to the webpage opening request, when the webpage onPageStarted () is started to be opened, the local position data acquired by the browser before responding to the webpage opening request is injected into the webpage, and a webpage positioning request is generated and sent, when the webpage is opened, the onPageFinished () is completed, positioning data is injected into the webpage according to the positioning result information sent by the target application program responding to the webpage positioning request, and the local position data is used for updating the local position data.
③, the browser responds to the webpage opening request, when the webpage onPageStarted () is started to be opened, the common positioning data acquired by the browser before responding to the webpage opening request are injected into the webpage, the webpage positioning request is generated and sent, the common positioning data are position data with the highest using frequency in a preset time period, and when the onPageFinished () is completed by the webpage opening, the positioning data are injected into the webpage for updating the common positioning data according to the positioning result information fed back by the target application program responding to the webpage positioning request.
In the specific implementation process, in order to avoid unsuccessful positioning data injection, the injection of the positioning data can be performed twice: when a webpage onPageStarted () is started to be opened, generating and sending a webpage positioning request, receiving positioning result information sent by a target application program responding to the webpage positioning request, and injecting positioning data into the webpage according to the positioning result information; and when the webpage is opened and the onPageFinished () is completed, injecting the positioning data into the webpage in detail according to the positioning result again to realize the successful injection of the positioning data.
In the technical scheme, the browser sends the webpage positioning request to the target application program with the positioning function, so that the positioning result information is obtained through the target application program, positioning data is injected into the webpage according to the positioning result information, the technical problem that the coreless browser cannot complete webpage positioning in the prior art is solved, meanwhile, the positioning is carried out through the target application program with the positioning function, the obtained positioning result is more accurate, user experience is improved, the scheme is not limited by opening a webpage address and is not limited by the positioning function of the electronic equipment, and the more accurate webpage positioning result can be obtained under the condition that a website is not changed.
Referring to fig. 2, based on a web page positioning method provided in an embodiment of the present application, the present application also provides an electronic device, where the electronic device includes:
a browsing unit 201, configured to generate a web page positioning request in response to the web page opening request;
a sending unit 202, configured to send the web page positioning request to a target application on the electronic device, where the target application can perform positioning through its own positioning function;
a receiving unit 203, configured to receive positioning result information sent by the target application program in response to the web page positioning request;
an injecting unit 204, configured to inject positioning data into the web page according to the positioning result information.
In a specific implementation process, the injection unit 204 is configured to: if the positioning result information contains positioning success information, acquiring position data in the positioning success information; injecting the location data as the positioning data into the web page. And if the positioning result information contains positioning failure information or positioning overtime information, injecting the positioning failure information or the positioning overtime information into the webpage as the positioning data, or injecting preset position data into the webpage as the positioning data. Wherein the preset position data includes: the browser obtains previous positioning data, local position data or common positioning data before responding to a webpage opening request, wherein the common positioning data are position data with the highest use frequency in a preset time period.
Further, the electronic device further includes: an acquisition unit 205 and an update unit 206. An obtaining unit 205, configured to obtain target position data input by a user after injecting the positioning data into the web page. An updating unit 206, configured to modify the positioning data into the target position data, and send the target position data to the target application, so that the target application modifies subsequent positioning according to the target position data.
In a specific implementation process, the browsing unit 201 is further configured to: responding to a webpage opening request, and when starting to open a webpage, injecting the previous positioning data acquired before responding to the webpage opening request into the webpage and generating the webpage positioning request; the injection unit 204 is configured to: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the prior positioning data.
The browsing unit 201 is further configured to: responding to a webpage opening request, when starting to open a webpage, injecting local position data acquired before responding to the webpage opening request into the webpage, and generating a webpage positioning request; the injection unit 204 is further configured to: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the local position data.
The browsing unit 201 is further configured to: responding to a webpage opening request, and when starting to open a webpage, injecting common positioning data acquired before responding to the webpage opening request into the webpage and generating the webpage positioning request, wherein the common positioning data is position data with the highest use frequency in a preset time period; the injection unit 204 is further configured to: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the common positioning data.
With regard to the electronic device in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages:
according to the method and the device, the browser sends the webpage positioning request to the target application program with the positioning function, so that the positioning result information is obtained through the target application program, positioning data is injected into the webpage according to the positioning result information, the technical problem that the coreless browser cannot complete webpage positioning in the prior art is solved, meanwhile, the positioning is carried out through the target application program with the positioning function, the obtained positioning result is more accurate, user experience is improved, and in addition, the scheme is not limited by opening a webpage address and is not limited by the self-provided positioning function of the electronic equipment, and the more accurate webpage positioning result can be obtained under the condition that a website is not changed.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of a gateway, proxy server, system according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The invention discloses a1, a web page positioning method, which is applied to an electronic device and is characterized by comprising the following steps:
the browser responds to the webpage opening request to generate a webpage positioning request;
the browser sends the webpage positioning request to a target application program on the electronic equipment, wherein the target application program can be positioned through a positioning function of the browser;
the browser receives positioning result information sent by the target application program responding to the webpage positioning request;
and the browser injects positioning data into the webpage according to the positioning result information.
2A, the method according to a1, wherein the browser injects positioning data into the web page according to the positioning result information, the method includes:
if the positioning result information contains positioning success information, the browser acquires position data in the positioning success information;
and the browser injects the position data into the webpage as the positioning data.
The method according to a1, wherein the browser injects positioning data into the web page according to the positioning result information, and the method comprises:
if the positioning result information contains positioning failure information or positioning overtime information, the browser injects the positioning failure information or the positioning overtime information into the webpage as the positioning data, or injects preset position data into the webpage as the positioning data.
4A, the method according to a3, wherein the preset position data comprises:
the browser obtains previous positioning data, local position data or common positioning data before responding to a webpage opening request, wherein the common positioning data are position data with the highest use frequency in a preset time period.
5A, the method according to any of A1-4A, wherein after injecting the positioning data into the web page, the method further comprises:
the browser acquires target position data input by a user;
and the browser modifies the positioning data into the target position data and sends the target position data to the target application program, so that the target application program corrects the subsequent positioning according to the target position data.
The method according to a1 or 2A, wherein the browser generates a web page positioning request in response to a web page opening request, comprising:
the browser responds to a webpage opening request, when a webpage is started to be opened, the browser injects the previous positioning data acquired by the browser before responding to the webpage opening request into the webpage, and generates the webpage positioning request;
the browser injects positioning data into the webpage according to the positioning result information, and the method comprises the following steps:
and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the prior positioning data.
The method according to a1 or 2A, wherein the browser generates a web page positioning request in response to a web page opening request, comprising:
the browser responds to a webpage opening request, when a webpage is started to be opened, local position data acquired by the browser before responding to the webpage opening request are injected into the webpage, and a webpage positioning request is generated;
the browser injects positioning data into the webpage according to the positioning result information, and the method comprises the following steps:
and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the local position data.
The method according to a1 or 2A, wherein the browser generates a web page positioning request in response to a web page opening request, comprising:
the browser responds to a webpage opening request, when a webpage is started to be opened, common positioning data acquired by the browser before the webpage opening request is responded are injected into the webpage, and the webpage positioning request is generated, wherein the common positioning data are position data with the highest use frequency in a preset time period;
the browser injects positioning data into the webpage according to the positioning result information, and the method comprises the following steps:
and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the common positioning data.
The invention also discloses, 9B, an electronic device, comprising:
the browsing unit is used for responding to the webpage opening request and generating a webpage positioning request;
the sending unit is used for sending the webpage positioning request to a target application program on the electronic equipment, wherein the target application program can be positioned through a positioning function of the target application program;
a receiving unit, configured to receive positioning result information sent by the target application program in response to the web page positioning request;
and the injection unit is used for injecting positioning data into the webpage according to the positioning result information.
10B, the electronic device according to B9, wherein the injection unit is configured to:
if the positioning result information contains positioning success information, acquiring position data in the positioning success information;
injecting the location data as the positioning data into the web page.
11B, the electronic device according to B9, wherein the injection unit is further configured to:
and if the positioning result information contains positioning failure information or positioning overtime information, injecting the positioning failure information or the positioning overtime information into the webpage as the positioning data, or injecting preset position data into the webpage as the positioning data.
12B, the electronic device according to B11, wherein the preset position data includes:
the browser obtains previous positioning data, local position data or common positioning data before responding to a webpage opening request, wherein the common positioning data are position data with the highest use frequency in a preset time period.
13B, according to B9 ~ 12B any electronic equipment, characterized by still includes:
the acquisition unit is used for acquiring target position data input by a user after the positioning data is injected into the webpage;
and the updating unit is used for modifying the positioning data into the target position data and sending the target position data to the target application program so that the target application program can modify the subsequent positioning according to the target position data.
14B, the electronic device according to B9 or 10B, wherein the browsing unit is further configured to: responding to a webpage opening request, and when starting to open a webpage, injecting the previous positioning data acquired before responding to the webpage opening request into the webpage and generating the webpage positioning request;
the injection unit is used for: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the prior positioning data.
15B, the electronic device according to B9 or 10B, wherein the browsing unit is further configured to: responding to a webpage opening request, when starting to open a webpage, injecting local position data acquired before responding to the webpage opening request into the webpage, and generating a webpage positioning request;
the injection unit is used for: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the local position data.
16B, the electronic device according to B9 or 10B, wherein the browsing unit is further configured to: responding to a webpage opening request, and when starting to open a webpage, injecting common positioning data acquired before responding to the webpage opening request into the webpage and generating the webpage positioning request, wherein the common positioning data is position data with the highest use frequency in a preset time period;
the injection unit is used for: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the common positioning data.

Claims (16)

1. A webpage positioning method is applied to an electronic device and is characterized by comprising the following steps:
responding to the webpage opening request by the coreless browser to generate a webpage positioning request;
the sending, by the coreless browser, the web page positioning request to a target application on the electronic device includes: the coreless browser sends a positioning request to an operating system, the operating system calls the target application program according to the positioning request and sends the positioning request to the target application program, and the target application program can be positioned through a positioning function of the operating system;
the coreless browser receives positioning result information sent by the target application program responding to the webpage positioning request through the operating system;
and the coreless browser injects positioning data into the webpage according to the positioning result information.
2. The method of claim 1, wherein the browser injects positioning data into the web page according to the positioning result information, and the method comprises:
if the positioning result information contains positioning success information, the browser acquires position data in the positioning success information;
and the browser injects the position data into the webpage as the positioning data.
3. The method of claim 1, wherein the browser injects positioning data into the web page according to the positioning result information, and the method comprises:
if the positioning result information contains positioning failure information or positioning overtime information, the browser injects the positioning failure information or the positioning overtime information into the webpage as the positioning data, or injects preset position data into the webpage as the positioning data.
4. The method of claim 3, wherein the preset position data comprises:
the browser obtains previous positioning data, local position data or common positioning data before responding to a webpage opening request, wherein the common positioning data are position data with the highest use frequency in a preset time period.
5. The method of any of claims 1 to 4, wherein after said injecting the positioning data into the web page, the method further comprises:
the browser acquires target position data input by a user;
and the browser modifies the positioning data into the target position data and sends the target position data to the target application program, so that the target application program corrects the subsequent positioning according to the target position data.
6. The method of claim 1 or 2, wherein the browser generating a web page location request in response to a web page open request comprises:
the browser responds to a webpage opening request, when a webpage is started to be opened, the browser injects the previous positioning data acquired by the browser before responding to the webpage opening request into the webpage, and generates the webpage positioning request;
the browser injects positioning data into the webpage according to the positioning result information, and the method comprises the following steps:
and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the prior positioning data.
7. The method of claim 1 or 2, wherein the browser generating a web page location request in response to a web page open request comprises:
the browser responds to a webpage opening request, when a webpage is started to be opened, local position data acquired by the browser before responding to the webpage opening request are injected into the webpage, and a webpage positioning request is generated;
the browser injects positioning data into the webpage according to the positioning result information, and the method comprises the following steps:
and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the local position data.
8. The method of claim 1 or 2, wherein the browser generating a web page location request in response to a web page open request comprises:
the browser responds to a webpage opening request, when a webpage is started to be opened, common positioning data acquired by the browser before the webpage opening request is responded are injected into the webpage, and the webpage positioning request is generated, wherein the common positioning data are position data with the highest use frequency in a preset time period;
the browser injects positioning data into the webpage according to the positioning result information, and the method comprises the following steps:
and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the common positioning data.
9. An electronic device, comprising:
the browsing unit is used for responding to the webpage opening request by the coreless browser to generate a webpage positioning request;
a sending unit, configured to send, by the coreless browser, the web page positioning request to a target application program on the electronic device, where the sending unit includes: the coreless browser sends a positioning request to an operating system, the operating system calls the target application program according to the positioning request and sends the positioning request to the target application program, and the target application program can be positioned through a positioning function of the operating system;
a receiving unit, configured to receive, by the coreless browser, positioning result information sent by the target application program in response to the web page positioning request through the operating system;
and the injection unit is used for injecting positioning data into the webpage by the coreless browser according to the positioning result information.
10. The electronic device of claim 9, wherein the injection unit is to:
if the positioning result information contains positioning success information, acquiring position data in the positioning success information;
injecting the location data as the positioning data into the web page.
11. The electronic device of claim 9, wherein the injection unit is further to:
and if the positioning result information contains positioning failure information or positioning overtime information, injecting the positioning failure information or the positioning overtime information into the webpage as the positioning data, or injecting preset position data into the webpage as the positioning data.
12. The electronic device of claim 11, wherein the preset position data comprises:
the browser obtains previous positioning data, local position data or common positioning data before responding to a webpage opening request, wherein the common positioning data are position data with the highest use frequency in a preset time period.
13. The electronic device of any of claims 9-12, further comprising:
the acquisition unit is used for acquiring target position data input by a user after the positioning data is injected into the webpage;
and the updating unit is used for modifying the positioning data into the target position data and sending the target position data to the target application program so that the target application program can modify the subsequent positioning according to the target position data.
14. The electronic device of claim 9 or 10, wherein the browsing unit is further to: responding to a webpage opening request, and when starting to open a webpage, injecting the previous positioning data acquired before responding to the webpage opening request into the webpage and generating the webpage positioning request;
the injection unit is used for: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the prior positioning data.
15. The electronic device of claim 9 or 10, wherein the browsing unit is further to: responding to a webpage opening request, when starting to open a webpage, injecting local position data acquired before responding to the webpage opening request into the webpage, and generating a webpage positioning request;
the injection unit is used for: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the local position data.
16. The electronic device of claim 9 or 10, wherein the browsing unit is further to: responding to a webpage opening request, and when starting to open a webpage, injecting common positioning data acquired before responding to the webpage opening request into the webpage and generating the webpage positioning request, wherein the common positioning data is position data with the highest use frequency in a preset time period;
the injection unit is used for: and when the webpage is opened, injecting positioning data into the webpage according to the positioning result information for updating the common positioning data.
CN201610509414.6A 2016-06-30 2016-06-30 Webpage positioning method and electronic equipment Active CN106202289B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610509414.6A CN106202289B (en) 2016-06-30 2016-06-30 Webpage positioning method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610509414.6A CN106202289B (en) 2016-06-30 2016-06-30 Webpage positioning method and electronic equipment

Publications (2)

Publication Number Publication Date
CN106202289A CN106202289A (en) 2016-12-07
CN106202289B true CN106202289B (en) 2020-03-10

Family

ID=57464167

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610509414.6A Active CN106202289B (en) 2016-06-30 2016-06-30 Webpage positioning method and electronic equipment

Country Status (1)

Country Link
CN (1) CN106202289B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669737B (en) * 2018-12-19 2023-04-18 百度在线网络技术(北京)有限公司 Application processing method, device, equipment and medium
CN110971753A (en) * 2019-10-12 2020-04-07 平安国际智慧城市科技股份有限公司 Positioning method and device based on browser, mobile terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201489531U (en) * 2009-06-30 2010-05-26 富钧环境工程股份有限公司 Personnel tracking system using Android platform device
CN103020247A (en) * 2012-12-18 2013-04-03 北京奇虎科技有限公司 Page presentation method and device
CN103247226A (en) * 2013-04-23 2013-08-14 北京小米科技有限责任公司 Method and device for determining electronic map

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8914042B2 (en) * 2011-09-23 2014-12-16 Tara Chand Singhal Systems for faster access and download of digital content in mobile wireless devices using wirelless device browser

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201489531U (en) * 2009-06-30 2010-05-26 富钧环境工程股份有限公司 Personnel tracking system using Android platform device
CN103020247A (en) * 2012-12-18 2013-04-03 北京奇虎科技有限公司 Page presentation method and device
CN103247226A (en) * 2013-04-23 2013-08-14 北京小米科技有限责任公司 Method and device for determining electronic map

Also Published As

Publication number Publication date
CN106202289A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN107133180B (en) Dynamic page testing method, testing device and storage medium
WO2016173348A1 (en) Network access method and mobile communications terminal
US9367403B2 (en) Terminal and application restoring method
EP4236412A2 (en) Profile download method and system, and related device
US20170351691A1 (en) Search method and apparatus
US20150161282A1 (en) Method and System for Smart URL Shortening Service
CN103997452A (en) Information sharing method and apparatus among multiple platforms
EP3518109A1 (en) Method and apparatus for realizing communication between web page and native application, and electronic device
CN107729014B (en) Page jump method and structure based on Android
CN103873918A (en) Picture processing method, device and terminal
CN108196878A (en) Generation method, device, electronic equipment and the storage medium of application program installation kit
US20150113423A1 (en) System and method to configure a field device
US9137094B1 (en) Method for setting DNS records
CN106714206A (en) Method and device for detecting network connection by wireless network access point
CN106686038A (en) Method and device for calling cloud desktop
CN104967644A (en) Message push method, apparatus and system
CN111460356A (en) Automatic login method, device, medium and equipment
CN106202289B (en) Webpage positioning method and electronic equipment
CN110990008B (en) Page updating method and device, storage medium and electronic equipment
CN105791249A (en) Third-party application processing method, device and system
CN104767827A (en) Application starting method and device
CN108958855B (en) Page jump method, device and system
US20150317143A1 (en) Method and apparatus for installing webpage application
CN102831179A (en) Webpage processing method and device
CN103532941A (en) Graphical page presentation method and device in CGS (client gateway server) mode

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

Effective date of registration: 20240104

Address after: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right