CN112073462A - Positioning method and device - Google Patents

Positioning method and device Download PDF

Info

Publication number
CN112073462A
CN112073462A CN202010779896.3A CN202010779896A CN112073462A CN 112073462 A CN112073462 A CN 112073462A CN 202010779896 A CN202010779896 A CN 202010779896A CN 112073462 A CN112073462 A CN 112073462A
Authority
CN
China
Prior art keywords
positioning
target
environment
page
positioning service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010779896.3A
Other languages
Chinese (zh)
Other versions
CN112073462B (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.)
Changsha Youheng Network Technology Co Ltd
Original Assignee
Changsha Youheng Network 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 Changsha Youheng Network Technology Co Ltd filed Critical Changsha Youheng Network Technology Co Ltd
Priority to CN202010779896.3A priority Critical patent/CN112073462B/en
Publication of CN112073462A publication Critical patent/CN112073462A/en
Application granted granted Critical
Publication of CN112073462B publication Critical patent/CN112073462B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • H04W64/003Locating users or terminals or network equipment for network management purposes, e.g. mobility management locating network equipment

Abstract

The invention provides a positioning method and a positioning device, and relates to the technical field of computer application. Receiving a positioning request triggered by a user in a page, wherein the page runs in a target environment; determining target positioning service corresponding to the target environment from a plug-in packaged with a plurality of positioning services according to the corresponding relation between a preset operation environment and the positioning service type; and obtaining user position data by utilizing the target positioning service. The technical scheme of the invention improves the configuration efficiency of the positioning service.

Description

Positioning method and device
Technical Field
The embodiment of the invention relates to the technical field of computer application, in particular to a positioning method and device.
Background
The web page may be open in a variety of operating environments, such as a browser, an application, and so forth. When a user uses a web page, a positioning function in the web page is often required to be triggered to position the user.
And the positioning modes supported by different operating environments may be different. Whenever a page is configured to need to run in a certain runtime environment, a developer needs to perform a complex configuration process to locate service-related configurations for the page.
Disclosure of Invention
The embodiment of the invention provides a positioning method and a positioning device, which are used for solving the problem of complex positioning service configuration in the traditional scheme.
A first aspect of the present invention provides a positioning method, including:
receiving a positioning request triggered by a user in a page, wherein the page runs in a target environment;
determining target positioning service corresponding to the target environment from a plug-in packaged with a plurality of positioning services according to the corresponding relation between a preset operation environment and the positioning service type;
and obtaining user position data by utilizing the target positioning service.
A second aspect of the present invention provides a positioning apparatus comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a positioning request triggered by a user in a page, and the page runs in a target environment;
the first determining module is used for determining target positioning services corresponding to the target environment from the plug-ins packaged with various positioning services according to the corresponding relation between the preset running environment and the positioning service types;
and the first positioning module is used for acquiring user position data by utilizing the target positioning service.
A third aspect of the present invention provides a client, including a storage component and a processing component;
the storage component stores one or more computer instructions, wherein the one or more computer instructions are for the processing component to invoke execution;
the processing component is to:
receiving a positioning request triggered by a user in a page, wherein the page runs in a target environment;
determining target positioning service corresponding to the target environment from a plug-in packaged with a plurality of positioning services according to the corresponding relation between a preset operation environment and the positioning service type;
and obtaining user position data by utilizing the target positioning service.
In the invention, the corresponding relation between the operation environment and the positioning service type is preset, and the various positioning services are uniformly packaged in the plug-in, so that the target positioning service corresponding to the target environment of the page operation is determined from the plug-in packaged with the various positioning services based on the corresponding relation, the problem that when a certain page is configured to be operated in a certain operation environment, a developer needs to execute a complex configuration process to perform the configuration related to the positioning service for the page is solved, the development and the configuration of new positioning services for different operation environments are not needed, the development efficiency is improved, and the maintainability is enhanced.
These and other aspects of the invention are apparent from and will be elucidated with reference to the embodiments described hereinafter.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the conventional solutions of the present invention, the drawings used in the description of the embodiments or the conventional solutions will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of one embodiment of a positioning method provided by the present invention;
FIG. 2 is a schematic structural diagram of an embodiment of a positioning device provided in the present invention;
fig. 3 is a schematic structural diagram of an embodiment of a client according to the present invention.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
In some of the flows described in the present specification and the above-described drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be performed out of the order presented herein or in parallel, and the order of the operations, such as 101, 102, etc., is merely used to distinguish various operations, and the order of the operations does not represent any order of execution per se. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The embodiment of the invention is mainly suitable for the scene that the user needs to acquire the position data when using the webpage. Specifically, the user may trigger a positioning function in the web page to request to acquire the position data, and at this time, the user may perform positioning in a certain positioning manner to acquire the user position data. Generally, a web page may be opened in multiple operating environments, and the positioning modes supported by different operating environments may be different.
In the conventional scheme, each time a certain page is configured to run in a certain running environment, a developer needs to execute a complex configuration process to perform positioning service-related configuration on the page, so that the development efficiency is low, and the maintainability is poor.
Therefore, in order to solve the above problems encountered in the conventional solutions and improve development efficiency and maintainability, the inventors propose a technical solution of the present invention: receiving a positioning request triggered by a user in a page, wherein the page runs in a target environment; determining target positioning service corresponding to the target environment from a plug-in packaged with a plurality of positioning services according to the corresponding relation between a preset operation environment and the positioning service type; and obtaining user position data by utilizing the target positioning service. The method has the advantages that the corresponding relation between the operation environment and the positioning service type is preset, and the multiple positioning services are uniformly packaged in the plug-in, so that the target positioning service corresponding to the target environment of the page operation is determined from the plug-in packaged with the multiple positioning services based on the corresponding relation, the problem that when a certain page is configured to be operated in a certain operation environment, developers need to execute a complex configuration process to perform configuration related to the positioning service for the page is solved, the development and configuration of new positioning services for different operation environments are not needed, the development efficiency is improved, and the maintainability is enhanced.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, which is a flowchart of an embodiment of a positioning method provided by the present invention, the method may include the following steps:
101: and receiving a positioning request triggered by a user in a page, wherein the page runs in a target environment.
In this embodiment, the page may refer to a web page, and the web page may be embedded in a plurality of different operating environments and operate in the plurality of operating environments, such as various application programs. The user may open and use the web page in a variety of different operating environments to implement the functionality provided by the web page.
Optionally, the web page may be run in a plurality of execution environments, which may include at least one of: a browser running environment, an application running environment, and an applet running environment. The browser operating environment may refer to that the web page may be operated in a browser, and a user may open and use the web page through the browser, where the type of the browser may be any type, and is not limited herein. The application execution environment may refer to that the web page may be executed in an application, and a user may open and use the web page through the application, where the application may refer to an application including the web page, and is not particularly limited herein. The applet running environment may mean that the web page may be run in an applet, and a user may open and use the web page through the applet. In this embodiment, the three specific operating environments are taken as examples to explain the operating environments. In an actual scenario, the running environment of the web page may be various, which is not illustrated.
The target environment of the page operation can refer to any one of multiple operation environments.
Receiving a positioning request triggered by a user in a page may be in response to the user triggering a positioning operation in the page and generating a positioning request based on the positioning operation. Specifically, the operation of triggering the positioning in the page in response to the user may include an operation of inputting address information on the page in response to the user, an operation of clicking a positioning button on the page in response to the user, and the like. The mode of the user triggering the positioning operation in the page may be set according to the actual situation, and is not specifically limited herein.
102: and determining the target positioning service corresponding to the target environment from the plug-in packaged with the multiple positioning services according to the corresponding relation between the preset running environment and the positioning service type.
The positioning service may refer to positioning in a certain positioning manner to obtain position data, and in this embodiment, the position data may refer to longitude and latitude data. The positioning services may be of different types, and different types of positioning services may be positioned using different positioning means. Alternatively, the plurality of location services may include browser location services, application location services, applet location services, IP location services, and the like. The browser positioning service may refer to positioning by using a positioning mode of a browser, the application positioning service may refer to positioning by using a positioning mode of an application, and the applet positioning service may refer to positioning by using a positioning mode of an applet. Different positioning manners may be implemented according to actual situations, for example, the positioning manner of the application program may be that the application program performs positioning by using its own positioning capability or performs positioning by using the positioning capability of an external positioning tool, which is not particularly limited.
In practical application, the type of the positioning service may correspond to an operating environment, and in general, the operating environment may support a plurality of positioning services, and the positioning service may be different to obtain the position data. If a certain type of location service exists in the multiple types of location services, which can obtain the location data more quickly and accurately than other types of location services, it can be determined that the operating environment corresponds to the type of location service. For example, the operating environment a may support three positioning services, namely, positioning service a, positioning service b, and positioning service c, and if positioning is performed by using the positioning service a, the position data may be obtained more quickly and accurately than by using the positioning services b and c, and it may be determined that the operating environment a corresponds to the positioning service a.
The positioning service type can be corresponded to the operation environment, and the corresponding relation between the operation environment and the positioning service type can be preset. For example, the corresponding relationship may include a browser running environment corresponding to a browser positioning service, an application running environment corresponding to an application positioning service, an applet running environment corresponding to an applet positioning service, and the like. The corresponding relationship between the operating environment and the positioning service type may be set according to actual conditions, and is not specifically limited herein.
Furthermore, the multiple positioning services can be packaged in a unified manner, and the multiple positioning services and the corresponding relationship between the preset positioning service type and the running environment can be integrated to obtain the plug-in containing the multiple positioning services. The plug-in can provide a calling interface for calling by various different running environments, and the plug-in can acquire proper positioning service for positioning.
Specifically, obtaining a suitable location service from the plugin for location may be determining a target location service corresponding to a target environment from the plugin according to a preset correspondence between an operating environment and a location service type. For example, if the target operating environment of the page is a browser, selecting a browser positioning service from the plug-in as a target positioning service; if the target operation environment of the page is the application program, selecting the application program positioning service from the plug-in as the target positioning service; and if the target running environment of the page is the applet, selecting the applet positioning service from the plug-in as a target positioning service and the like.
Optionally, determining, according to a preset correspondence between the operating environment and the type of the location service, a target location service corresponding to the target environment from within the plugin may further include:
and determining the target positioning service corresponding to the target environment from the plug-in according to the identification information of the target environment and the corresponding relation between the preset running environment and the positioning service type.
The target environment calls the plug-in through the provided interface when acquiring the corresponding positioning service, the interface can contain the identification information of the target environment so that the plug-in can determine the target environment, and then the target positioning service corresponding to the target environment is determined from the plug-in according to the corresponding relation between the preset running environment and the type of the positioning service.
103: user location data is obtained using a target location service.
The target positioning service obtained from the plug-in is used for positioning, and user position data such as longitude and latitude data can be obtained.
In practical application, in response to a positioning operation triggered by a user in a page, a positioning request can be obtained based on the positioning operation, a running environment of the page is taken as a target environment, and a target positioning service is selected from a plug-in packaged with a plurality of positioning services based on the target environment. Specifically, according to the preset corresponding relationship between the operating environment and the type of the positioning service, a target positioning service corresponding to the target environment can be determined from the plug-in, and the target positioning service is used for positioning to obtain user position data.
Taking the ordering of the clients in the home services industry as an example, a certain client can open an ordering page through a browser, and input address information in the ordering page to allow service personnel to clearly receive ordering information, at the moment, the ordering page serves as a webpage page, a user is responded, namely, a positioning operation triggered by the client in the webpage page is responded, and a positioning request can be obtained based on the positioning operation. At this time, if the running environment of the next page is a browser, the browser is used as a target environment, and a target positioning service is selected from the plug-ins packaged with multiple positioning services based on the running environment of the browser. Specifically, the target environment, that is, an interface provided by the browser, is used to call the plug-in, where the interface may include identification information of the browser, so that the plug-in determines the browser, and then determines a target location service, that is, a browser location service, corresponding to the browser from within the plug-in according to a corresponding relationship between a preset operating environment and a location service type. The location data of the user, such as longitude and latitude data, can be obtained by using the browser location service for location.
In the embodiment, the corresponding relation between the operating environment and the positioning service type is preset, and the multiple positioning services are uniformly packaged in the plug-in, so that the target positioning service corresponding to the target environment in which the page operates is determined from the plug-in which the multiple positioning services are packaged based on the corresponding relation, the problem that when a certain page is configured to operate in a certain operating environment, developers need to execute a complex configuration process to perform configuration related to the positioning service for the page is solved, the development and configuration of new positioning services for different operating environments are not needed, the development efficiency is improved, and the maintainability is enhanced.
In practical application, part of the positioning services have limitations set by the permission during positioning, for example, in some application programs, the positioning permission of the application program needs to be acquired by adopting the application program positioning service, if the positioning permission cannot be acquired, the application program positioning service cannot be used for positioning, and the user position data cannot be acquired. Thus, in some embodiments, the method may further comprise:
and if the user position data cannot be successfully obtained by using the target positioning service, obtaining the user position data by using the IP positioning service.
Wherein the IP location service is encapsulated within the plug-in.
If the user location data is not successfully obtained by using the target location service, that is, the location by using the target location service fails, the location service type may be switched at this time, for example, the location by using the IP location service. The IP positioning service does not need to acquire the positioning authority of the application program, can successfully position when the target positioning service is limited by the positioning authority, and acquires the user position data.
When the positioning by the target positioning service fails, the IP positioning service is utilized to perform positioning to obtain the user position data, the positioning can be completed, the user position data can be successfully obtained, the condition that the user position data cannot be obtained when the positioning by the target positioning service fails is avoided, and the use experience of a user is enhanced.
In order to further enhance the user experience, when the positioning fails by using the target positioning service, the user can be informed of the reason of the positioning failure, so that the user can clearly determine the reason of the positioning failure and perform corresponding processing. Thus, in some embodiments, the method may further comprise:
if the user position data cannot be successfully obtained by using the target positioning service, determining the reason of positioning failure;
and outputting prompt information corresponding to the positioning failure reasons, wherein the prompt information corresponding to the same positioning failure reason under different operating environments is the same.
In practical applications, there may be many reasons for the failure of positioning using the target positioning service, such as a positioning authority problem, a network problem, and the like. Specifically, the positioning permission problem may include that the positioning permission of the target positioning service cannot be obtained in the target environment, that is, the target positioning service cannot be supported, and the target positioning service cannot be used for positioning, and at this time, the positioning using the target positioning service fails; or, the network problem may include that when the target environment has a poor network signal and cannot obtain network support, the target location service cannot be used for smooth location even in the network condition, which may result in location failure. The positioning failure reason may be various, and may be determined according to an actual situation, which is not specifically limited herein.
The different positioning services have different processing modes for positioning failure, for example, when positioning failure is performed by using a browser positioning service, a user can be prompted to open a positioning permission page of current equipment operated by the browser, for example, the positioning permission page can comprise a smart phone, a tablet computer and the like, and the user requests to acquire the browser positioning permission; when the positioning fails by using the application positioning service, a user can be prompted to open a native positioning permission page of the electronic equipment operated by the application, such as a smart phone, a tablet computer and the like, and request to acquire the application positioning permission; when the positioning by the small program positioning service fails, the user can be prompted to open a small program positioning authority page, request to acquire the small program positioning authority and the like. Further, the positioning failure reasons obtained by different positioning services can be integrated, and prompt information corresponding to the positioning failure reasons is output, so that the user can clearly determine the failure reasons.
For example, the prompt message may indicate that the positioning right of the application cannot be obtained, the application positioning service cannot be used for positioning, and the positioning right is opened; or, the network signal cannot be detected or is poor, positioning cannot be performed by using the applet positioning service, please perform an operation when the network signal is good, and the like. The corresponding prompt messages of the same positioning failure reason under different operation environments can be the same. The setting of the prompt information may be handled according to actual conditions, and is not particularly limited herein.
When the positioning fails by using the target positioning service, the reason of the positioning failure is determined, and the prompt information corresponding to the reason of the positioning failure is output, so that the user can conveniently and clearly determine the reason of the positioning failure, corresponding processing is carried out on the reason of the positioning failure, and the use experience of the user is enhanced.
In practical application, after the user location data, that is, the longitude and latitude data, is obtained by using the target location service, there is a problem that the obtained location data is inconsistent with the location data required by the page in format, and at this time, the obtained location data needs to be converted. Thus, in some embodiments, the method may further comprise:
and if the coordinate system corresponding to the target positioning service is different from the coordinate system supported by the page, performing coordinate conversion on the user position data so as to be matched with the page.
The Coordinate System of the position data obtained by different positioning services is different, and may include different Coordinate systems such as a WGS-84 Coordinate System (World geographic System-1984 Coordinate System, geocentric Coordinate System), a GCJ-02 Coordinate System (national institute of measurement 02 standard Coordinate System), and a BD-09 Coordinate System (hundredth Coordinate System).
When the target positioning service is used for positioning, whether a coordinate system corresponding to the target positioning service is the same as a coordinate system supported by the page or not can be determined, and if so, the position data obtained by the target positioning service can be directly processed; if not, the position data obtained by the target positioning service needs to be subjected to coordinate system conversion, and the position data is converted into position data in a coordinate system supported by the page. The conversion relation between different coordinate systems can be preset, and the conversion relation can be packaged in the plug-in.
The position data acquired by the target positioning service is converted into the coordinate system, so that the position data required by the webpage page in the coordinate system can be acquired, and subsequent data processing is facilitated. The conversion relation is packaged in the plug-in, so that data conversion can be performed in time when the requirement on the webpage is changed, and the position data under the coordinate system of the webpage requirement can be obtained.
As shown in fig. 2, which is a schematic structural diagram of an embodiment of a positioning apparatus provided in the present invention, the apparatus may include the following modules:
a receiving module 201, configured to receive a positioning request triggered by a user in a page, where the page runs in a target environment;
a first determining module 202, configured to determine, according to a preset correspondence between an operating environment and a type of a location service, a target location service corresponding to a target environment from a plug-in which multiple location services are encapsulated;
a first positioning module 203, configured to obtain user position data by using a target location service.
In the embodiment, the corresponding relation between the operating environment and the positioning service type is preset, and the multiple positioning services are uniformly packaged in the plug-in, so that the target positioning service corresponding to the target environment in which the page operates is determined from the plug-in which the multiple positioning services are packaged based on the corresponding relation, the problem that when a certain page is configured to operate in a certain operating environment, developers need to execute a complex configuration process to perform configuration related to the positioning service for the page is solved, the development and configuration of new positioning services for different operating environments are not needed, the development efficiency is improved, and the maintainability is enhanced.
In some embodiments, the first determining module 202 may include:
and the determining unit is used for determining the target positioning service corresponding to the target environment from the plug-in packaged with the multiple positioning services according to the identification information of the target environment and the corresponding relation between the preset running environment and the positioning service type.
In some embodiments, the apparatus may further comprise:
and the conversion module is used for performing coordinate conversion on the user position data to match with the page if the coordinate system corresponding to the target positioning service is different from the coordinate system supported by the page.
The position data acquired by the target positioning service is converted into the coordinate system, so that the position data required by the webpage page in the coordinate system can be acquired, and subsequent data processing is facilitated. The conversion relation is packaged in the plug-in, so that data conversion can be performed in time when the requirement on the webpage is changed, and the position data under the coordinate system of the webpage requirement can be obtained.
In some embodiments, the apparatus may further comprise:
and the second positioning module is used for acquiring the user position data by using the IP positioning service if the user position data cannot be acquired successfully by using the target positioning service, and the IP positioning service is packaged in the plug-in.
When the positioning by the target positioning service fails, the IP positioning service is utilized to perform positioning to obtain the user position data, the positioning can be completed, the user position data can be successfully obtained, the condition that the user position data cannot be obtained when the positioning by the target positioning service fails is avoided, and the use experience of a user is enhanced.
In some embodiments, the apparatus may further comprise:
the second determining module is used for determining the reason of positioning failure if the user position data cannot be successfully obtained by utilizing the target positioning service;
and the output module is used for outputting prompt information corresponding to the positioning failure reasons, wherein the prompt information corresponding to the same positioning failure reason under different operating environments is the same.
When the positioning fails by using the target positioning service, the reason of the positioning failure is determined, and the prompt information corresponding to the reason of the positioning failure is output, so that the user can conveniently and clearly determine the reason of the positioning failure, corresponding processing is carried out on the reason of the positioning failure, and the use experience of the user is enhanced.
Fig. 3 is a schematic structural diagram of an embodiment of a client according to the present invention, which includes a storage component 301 and a processing component 302;
storage component 301 stores one or more computer instructions for processing component 302 to invoke for execution;
the processing component 302 is to:
receiving a positioning request triggered by a user in a page, wherein the page runs in a target environment;
determining target positioning service corresponding to a target environment from a plug-in packaged with a plurality of positioning services according to the corresponding relation between a preset operation environment and the positioning service type;
user location data is obtained using a target location service.
In the embodiment, the corresponding relation between the operating environment and the positioning service type is preset, and the multiple positioning services are uniformly packaged in the plug-in, so that the target positioning service corresponding to the target environment in which the page operates is determined from the plug-in which the multiple positioning services are packaged based on the corresponding relation, the problem that when a certain page is configured to operate in a certain operating environment, developers need to execute a complex configuration process to perform configuration related to the positioning service for the page is solved, the development and configuration of new positioning services for different operating environments are not needed, the development efficiency is improved, and the maintainability is enhanced.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of positioning, comprising:
receiving a positioning request triggered by a user in a page, wherein the page runs in a target environment;
determining target positioning service corresponding to the target environment from a plug-in packaged with a plurality of positioning services according to the corresponding relation between a preset operation environment and the positioning service type;
and obtaining user position data by utilizing the target positioning service.
2. The method of claim 1, wherein the plurality of operating environments comprise at least one of: a browser running environment, an application running environment, and an applet running environment.
3. The method of claim 1, further comprising:
and if the coordinate system corresponding to the target positioning service is different from the coordinate system supported by the page, performing coordinate conversion on the user position data so as to be matched with the page.
4. The method of claim 1, further comprising:
and if the user position data cannot be successfully obtained by using the target positioning service, obtaining the user position data by using an IP positioning service, wherein the IP positioning service is packaged in the plug-in.
5. The method of claim 1, further comprising:
if the user position data cannot be successfully obtained by using the target positioning service, determining a positioning failure reason;
and outputting prompt information corresponding to the positioning failure reasons, wherein the prompt information corresponding to the same positioning failure reason under different operating environments is the same.
6. The method according to claim 1, wherein the determining, according to the correspondence between the preset operating environment and the type of the positioning service, the target positioning service corresponding to the target environment from the plug-in which the plurality of positioning services are encapsulated comprises:
and determining the target positioning service corresponding to the target environment from the plug-ins packaged with various positioning services according to the identification information of the target environment and the corresponding relation between the preset running environment and the positioning service type.
7. A positioning device, comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a positioning request triggered by a user in a page, and the page runs in a target environment;
the first determining module is used for determining target positioning services corresponding to the target environment from the plug-ins packaged with various positioning services according to the corresponding relation between the preset running environment and the positioning service types;
and the first positioning module is used for acquiring user position data by utilizing the target positioning service.
8. The apparatus of claim 7, further comprising:
and the conversion module is used for performing coordinate conversion on the user position data to match with the page if the coordinate system corresponding to the target positioning service is different from the coordinate system supported by the page.
9. The apparatus of claim 7, further comprising:
a second determining module, configured to determine a reason for failure in positioning if the user location data is not successfully obtained using the target positioning service;
and the output module is used for outputting prompt information corresponding to the positioning failure reasons, wherein the prompt information corresponding to the same positioning failure reason under different operating environments is the same.
10. A client is characterized by comprising a storage component and a processing component;
the storage component stores one or more computer instructions, wherein the one or more computer instructions are for the processing component to invoke execution;
the processing component is to:
receiving a positioning request triggered by a user in a page, wherein the page runs in a target environment;
determining target positioning service corresponding to the target environment from a plug-in packaged with a plurality of positioning services according to the corresponding relation between a preset operation environment and the positioning service type;
and obtaining user position data by utilizing the target positioning service.
CN202010779896.3A 2020-08-05 2020-08-05 Positioning method and device Active CN112073462B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010779896.3A CN112073462B (en) 2020-08-05 2020-08-05 Positioning method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010779896.3A CN112073462B (en) 2020-08-05 2020-08-05 Positioning method and device

Publications (2)

Publication Number Publication Date
CN112073462A true CN112073462A (en) 2020-12-11
CN112073462B CN112073462B (en) 2023-10-27

Family

ID=73656378

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010779896.3A Active CN112073462B (en) 2020-08-05 2020-08-05 Positioning method and device

Country Status (1)

Country Link
CN (1) CN112073462B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632410A (en) * 2020-12-24 2021-04-09 平安银行股份有限公司 Environment adaptive positioning method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1449500A (en) * 2000-06-30 2003-10-15 诺基亚有限公司 Method and device for position determination
CN106131795A (en) * 2016-08-30 2016-11-16 维沃移动通信有限公司 A kind of localization method and mobile terminal
CN107040892A (en) * 2017-04-13 2017-08-11 广东欧珀移动通信有限公司 Location information acquisition method, device and the mobile terminal of mobile terminal
CN108076429A (en) * 2017-12-13 2018-05-25 广东欧珀移动通信有限公司 Localization method, device, storage medium and mobile terminal
CN109164477A (en) * 2018-08-29 2019-01-08 维沃移动通信有限公司 A kind of method and mobile terminal of application positioning
CN110389756A (en) * 2019-07-23 2019-10-29 深圳市元征科技股份有限公司 Software Development Kit funcall method, system and electronic equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1449500A (en) * 2000-06-30 2003-10-15 诺基亚有限公司 Method and device for position determination
CN106131795A (en) * 2016-08-30 2016-11-16 维沃移动通信有限公司 A kind of localization method and mobile terminal
CN107040892A (en) * 2017-04-13 2017-08-11 广东欧珀移动通信有限公司 Location information acquisition method, device and the mobile terminal of mobile terminal
CN108076429A (en) * 2017-12-13 2018-05-25 广东欧珀移动通信有限公司 Localization method, device, storage medium and mobile terminal
CN109164477A (en) * 2018-08-29 2019-01-08 维沃移动通信有限公司 A kind of method and mobile terminal of application positioning
CN110389756A (en) * 2019-07-23 2019-10-29 深圳市元征科技股份有限公司 Software Development Kit funcall method, system and electronic equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632410A (en) * 2020-12-24 2021-04-09 平安银行股份有限公司 Environment adaptive positioning method and system

Also Published As

Publication number Publication date
CN112073462B (en) 2023-10-27

Similar Documents

Publication Publication Date Title
CN108984388B (en) Method and terminal equipment for generating automatic test case
US10257316B2 (en) Monitoring of node.js applications
CN110289983B (en) Load balancing application creation method and device, computer equipment and storage medium
CN109376088B (en) Automatic test system and automatic test method
CN110442502B (en) Point burying method, device, equipment and storage medium
CN110659206A (en) Simulation architecture establishing method, device, medium and electronic equipment based on microservice
CN104503768A (en) Call method and device for application programming interface (API)
CN110727524A (en) Method and device for realizing remote procedure call
CN114168460A (en) Remote debugging method, device and storage medium for front-end code in hybrid development
CN110515855B (en) Simulation control method, server and system for application program
CN112073462B (en) Positioning method and device
CN113407823A (en) IOS message pushing method and system
CN109495319B (en) Method, device and equipment for determining fault information of CDN node
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN109995931B (en) Method and device for realizing automatic calling
CN108347456A (en) A kind of application program method for down loading and device
CN110691263A (en) Method, medium, electronic device and system for synchronizing local time and server time
CN105262829B (en) Geographical position monitoring method and system
CN111338898B (en) Application state acquisition method and device, electronic equipment and readable storage medium
CN114745749A (en) Virtual network element testing method and device, electronic equipment and readable storage medium
CN114282760A (en) Workflow generation method and device combining dynamic form and dynamic flow
US10977146B2 (en) Application operation monitoring apparatus and application operation monitoring method
CN117155890B (en) Method and device for processing applet message and electronic equipment
CN111198721A (en) Application program running method and device
CN116893913B (en) Remote program execution method, device, system, electronic equipment and storage medium

Legal Events

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