Positioning method, device, terminal device and computer-readable storage medium

By receiving and responding to the position request of the terminal device, obtaining and selecting high-precision satellite and fusion position information, the accuracy and efficiency problems of the FLP positioning scheme when the GPS signal is weak is solved, and the stability and accuracy are improved.

CN114660642BActive Publication Date: 2025-05-27GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210279052.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-21
Publication Date
2025-05-27
Estimated Expiration
2042-03-21

AI Technical Summary

Technical Problem

The existing FLP positioning scheme has poor positioning accuracy when the GPS signal is weak, and most applications will not call the FLP module, resulting in the high-precision position information it provides cannot be used, which in turn affects the positioning accuracy and call efficiency.

Method used

By receiving the application's satellite position request and the fusion position request, the satellite position information and the fusion position information are obtained in response, and the preferred position information is obtained according to its positioning accuracy and sent to the application, avoiding the FLP module and the GPS module from requesting each other to form a loop, improving operational stability and positioning accuracy.

Benefits of technology

It realizes operation stability and high-precision position information selection in multiple position request scenarios, improves the positioning accuracy and call efficiency of the FLP module, and overcomes the problem of poor positioning accuracy of GPS in weak signal scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114660642B_ABST
    Figure CN114660642B_ABST
Patent Text Reader

Abstract

This application is applicable to the field of positioning technology and provides a positioning method. By receiving a satellite position request from a first application and a fused position request from a second application, it responds to the satellite position request or the fused position request to obtain satellite position information and fused position information; according to the positioning accuracy of the satellite position information and the fused position information, it obtains preferred position information and sends it to the first application; it sends the fused position information to the second application. By flexibly configuring the response logic of the position request, it can avoid the loop of mutual requests formed when the FLP module requests satellite position information while the GPS module requests fused position information, thereby avoiding service conflicts where the GPS module cannot be turned off, improving the operating stability of the terminal device when receiving multiple position requests simultaneously, and by obtaining preferred position information from the satellite position information and the fused position information, it realizes the selection and flexible reporting of high-precision position information, which can improve the positioning accuracy and call efficiency of the FLP module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of positioning technology, and particularly relates to a positioning method, device, terminal device, and computer-readable storage medium. Background Art

[0002] With the rapid development of positioning technology, a terminal device can obtain location information through two basic positioning services: a GPS (Global Positioning System) module and a network location service (Network Location Provider). It can also obtain location information through an FLP (Fused Location Provider) module, which can make up for the defect of poor positioning accuracy of the basic positioning method in some scenarios.

[0003] Currently, the FLP positioning solution equipped in the native system of a terminal device usually reports the single location information provided by the network location service when the GPS signal is weak, which easily leads to poor positioning accuracy. Moreover, most applications (Applications, APPs) do not call the FLP module to obtain location information, but call the GPS module or the network location service, resulting in the inability to utilize the more accurate location information provided by the FLP module. Therefore, how to improve the positioning accuracy and call efficiency of the FLP module has become an urgent problem to be solved currently. Summary of the Invention

[0004] In view of this, the embodiments of this application provide a positioning method, device, terminal device, and computer-readable storage medium to solve the problems of poor positioning accuracy and low call efficiency of the existing FLP positioning solution.

[0005] The first aspect of the embodiments of this application provides a positioning method applied to a terminal device. The method includes:

[0006] Receiving a satellite position request from a first application and a fused position request from a second application, and obtaining satellite position information and fused position information in response to the satellite position request or the fused position request;

[0007] Obtaining preferred position information according to the positioning accuracy of the satellite position information and the fused position information, and sending the preferred position information to the first application;

[0008] Sending the fused position information to the second application.

[0009] In the first aspect of the embodiments of the present application, a positioning method is provided. By receiving a satellite position request of a first application and a fused position request of a second application, satellite position information and fused position information are obtained in response to the satellite position request or the fused position request. According to the positioning accuracy of the satellite position information and the fused position information, preferred position information is obtained and sent to the first application. The fused position information is sent to the second application. By flexibly configuring the response logic of the position request, it is possible to avoid a mutual request loop formed when the FLP module requests satellite position information while the GPS module requests fused position information, thereby avoiding a service conflict where the GPS module cannot be turned off, improving the running stability of the terminal device when receiving multiple position requests simultaneously, and by obtaining preferred position information from the satellite position information and the fused position information, the selection and flexible reporting of high-precision position information can be achieved, which can improve the positioning accuracy and call efficiency of the FLP module.

[0010] In the first aspect of the embodiments of the present application, a positioning device is provided, including an application layer and a framework layer. The application layer includes a first application and a second application;

[0011] The framework layer is used to:

[0012] Receive the satellite position request of the first application and the fused position request of the second application, and obtain satellite position information and fused position information in response to the satellite position request or the fused position request;

[0013] According to the positioning accuracy of the satellite position information and the fused position information, obtain preferred position information and send it to the first application;

[0014] Send the fused position information to the second application.

[0015] In the third aspect of the embodiments of the present application, a terminal device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the positioning method provided in the first aspect of the embodiments of the present application are implemented.

[0016] In the fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the positioning method provided in the first aspect of the embodiments of the present application are implemented.

[0017] It can be understood that the beneficial effects of the above fourth aspect can be referred to the relevant descriptions in the above first aspect, and will not be elaborated here. Description of the Drawings

[0018] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0019] Figure 1 It is a schematic structural diagram of a terminal device provided by an embodiment of the present application;

[0020] Figure 2 It is a schematic architecture diagram of an operating system in which a terminal device provided by an embodiment of the present application operates;

[0021] Figure 3 It is a schematic architecture diagram of the operating system when responding to a positioning request of an application provided by an embodiment of the present application;

[0022] Figure 4 It is a first flowchart of a positioning method provided by an embodiment of the present application;

[0023] Figure 5 It is a second flowchart of a positioning method provided by an embodiment of the present application;

[0024] Figure 6 It is a third flowchart of a positioning method provided by an embodiment of the present application;

[0025] Figure 7 It is a timing diagram of the operating system when first receiving a satellite position request of a first application and then receiving a fusion position request of a second application, and the satellite position request of the first application is released first and the fusion position request of the second application is released later provided by an embodiment of the present application;

[0026] Figure 8 It is a timing diagram of the operating system when first receiving a satellite position request of a first application and then receiving a fusion position request of a second application, and the fusion position request of the second application is released first and the satellite position request of the first application is released later provided by an embodiment of the present application;

[0027] Figure 9 It is a fourth flowchart of a positioning method provided by an embodiment of the present application;

[0028] Figure 10 It is a timing diagram of the operating system when first receiving a fusion position request of a second application and then receiving a satellite position request of a first application, and the satellite position request of the first application is released first and the fusion position request of the second application is released later provided by an embodiment of the present application;

[0029] Figure 11It is a timing schematic diagram of an operating system when the fusion location request of a second application is received first, the satellite location request of a first application is received later, the fusion location request of the second application is released first, and the satellite location request of the first application is released later provided by an embodiment of the present application;

[0030] Figure 12 It is a structural schematic diagram of a positioning device provided by an embodiment of the present application. Detailed implementation manners

[0031] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0032] It should be understood that when used in the specification of the present application and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0033] It should also be understood that the term "and / or" as used in the specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0034] As used in the specification of the present application and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" according to the context.

[0035] In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0036] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but rather mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized.

[0037] In applications, the FLP positioning solution usually provided by the native system of current terminal devices generally reports a single location information provided by the network positioning service when the GPS signal is weak, which easily leads to poor positioning accuracy. Moreover, most applications do not call the FLP module to obtain location information, but instead call the GPS module or the network positioning service, resulting in the unused of the higher-precision location information provided by the FLP module. Therefore, how to improve the positioning accuracy and call efficiency of the FLP module has become an urgent problem to be solved currently.

[0038] In addition, when a terminal device obtains fused location information through the FLP module, it needs to request satellite location information to calculate the fused location information based on the satellite location information; while when obtaining satellite location information through the GPS module, it may need to request fused location information to compare with the satellite location information to obtain a preferred location information with higher positioning accuracy. The logic of the native operating system makes it easy for the terminal device to cause the FLP module to request satellite location information while the GPS module requests fused location information when processing fused location requests and satellite location requests simultaneously, resulting in a loop of mutual requests, triggering the operating system to generate BUGs, and ultimately causing the GPS module to be unable to be turned off, occupying the operating system resources and affecting the normal operation of the operating system.

[0039] In view of the above technical problems, an embodiment of the present application provides a positioning method. By receiving a satellite position request of a first application and a fused position request of a second application, the satellite position request or the fused position request is responded to obtain satellite position information and fused position information; according to the positioning accuracy of the satellite position information and the fused position information, preferred position information is obtained and sent to the first application; the fused position information is sent to the second application. By flexibly configuring the response logic of the position request, it is possible to avoid a mutual request loop formed when the FLP module requests satellite position information while the GPS module requests fused position information, thereby avoiding a service conflict where the GPS module cannot be turned off, improving the operating stability of the terminal device when receiving multiple position requests simultaneously, and by obtaining preferred position information from the satellite position information and the fused position information, the selection and flexible reporting of high-precision position information can be realized, which can improve the positioning accuracy and call efficiency of the FLP module.

[0040] The positioning method provided by the embodiment of the present application can be applied to terminal devices with positioning functions or capable of receiving positioning information. The terminal device can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific type of the terminal device.

[0041] Figure 1 An exemplary structural schematic diagram of the terminal device 1 is shown. The terminal device 1 may include a processor 10, a memory 20, a power module 30, an audio module 40, a camera module 50, a sensor module 60, an input module 70, a display module 80, a wireless communication module 90, etc. Among them, the audio module 40 may include a speaker 41 and a microphone 42, etc., the camera module 50 may include a short-focus camera 51, a long-focus camera 52, and a flash 53, etc., the sensor module 60 may include an infrared sensor 61, an acceleration sensor 62, a position sensor 63, a fingerprint sensor 64, and an iris sensor 65, etc., the input module 70 may include a touch panel 71 and an external input unit 72, etc., and the wireless communication module 90 may include wireless communication units such as Bluetooth, ZigBee, Optical Wireless, Wireless Local Area Network (WLAN), and Near Field Communication (NFC).

[0042] In an application, the processor 10 may be a central processing unit (CPU), or the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0043] In an application, in some embodiments, the memory 20 may be an internal storage unit of the terminal device, such as the hard disk or memory of the terminal device. In other embodiments, the memory 20 may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the terminal device. Further, the memory 20 may also include both the internal storage unit and the external storage device of the terminal device. The memory 20 is used to store the operating system 21, application programs 22, computer programs 23, and data, etc. The memory 20 may also be used to temporarily store data that has been output or will be output. Among them, when the processor 10 executes the computer program 23 stored on the memory 20, the steps in the following various positioning method embodiments are implemented.

[0044] As Figure 2 shown, the schematic diagram of the architecture of the operating system running on the terminal device 1 provided by the embodiments of the present application. The layered architecture can divide the operating system into multiple layers, and the layers communicate through software interfaces. In some embodiments, the operating system may be successively an application layer 100, a framework layer 200, a system runtime library layer 300, a hardware abstraction layer 400, and a Linux kernel layer 500 from top to bottom.

[0045] It should be noted that the type of the operating system may be the Android system, or an operating system customized and developed based on the Android system, or other different types of operating systems. The embodiments of the present application do not make any limitation on the specific type of the operating system.

[0046] In an application, the following introduces and explains the five-layer hierarchy of the operating system:

[0047] The application layer 100 may include built-in applications 120 built into the system and upper-layer applications 110 provided by third-party application providers. The application programs in the application layer 100 can directly interact with users to implement different functions provided by the application programs. For example, the application layer 100 may specifically include built-in applications such as mail, phone, calendar, camera, contacts, and Bluetooth, and may also include upper-layer applications such as map positioning, food delivery, and video playback.

[0048] The framework layer (Application Framework) 200 may include application programming interfaces (Application Programming Interface, API) and programming frameworks. The application programming interfaces can be used to provide interfaces for developers of the operating system to develop application programs, and can also be used for applications in the application layer to call corresponding basic services when implementing different functions. For example, the framework layer may include different types of application programming interfaces such as a window manager 210, a content provider 220, a phone manager 230, a location manager 240, and a view system 250.

[0049] Among them, the window manager 210 is used to manage window programs. Specifically, it can be used to obtain the window size, and can also be used to determine whether there is a status bar, whether the screen is locked, whether to capture the screen, etc.

[0050] The content provider 220 is used to store and obtain data, and enable the above data to be accessed by application programs. The above data may include videos, images, audio, call records, contacts, browsing history, bookmarks, etc.

[0051] The phone manager 230 is used to provide the communication function of the terminal device 1. For example, the management of call status, including answering calls and hanging up calls, etc.

[0052] The location manager 240 is used to obtain the location information of the terminal device 1, which may include different types of location information such as satellite location information (obtained through the Global Positioning System), network location information (obtained through network positioning services), and fused location information (obtained through fused positioning services).

[0053] The view system 250 is used to provide visual controls, such as controls for displaying text and controls for displaying pictures, etc., and is also used to construct to display the application programs in the application layer 100. The view system 250 can run multiple visual controls simultaneously, enabling the terminal device to display multiple views simultaneously. For example, a view of text and a view of a picture are displayed simultaneously.

[0054] The system runtime library layer (Native) 300 may include C / C++ libraries 310 and Android runtime libraries 320. Among them, the C / C++ libraries 310 may include a graphics library, a font engine, a rendering engine, a multimedia library, a database engine, etc. Among them, the graphics library may specifically be OpenGL For Embedded Systems 3D (a 3D open graphics library running on embedded systems); the font engine is used to provide different fonts, and may specifically be FreeType (a portable font engine); the rendering engine is used to render 2D or 3D graphics, and may specifically be Skia Graphics Library (an engine for rendering 2D graphics); the multimedia library (Media Framework) is used to support the playback, recording, and playback of audio and video in different formats; the database engine is used to provide the storage function of different types of databases, enabling different types of data to be stored in different types of databases according to actual needs, or different types of data to be uniformly stored in one database.

[0055] The Android runtime libraries 320 may include Core Libraries and Android Runtime (ART). Among them, after the Android 5.0 system, the Dalvik virtual machine was replaced by ART. The Core Libraries provide most of the functions of the Java language core libraries, allowing developers to write Android applications using the Java language. Compared with the Java Virtual Machine (JVM), the Dalvik virtual machine is customized for mobile devices, allowing multiple instances of the virtual machine to run simultaneously in limited memory, and each Dalvik application runs as an independent Linux process. The independent process can prevent all programs from being shut down when the virtual machine crashes. The mechanism of ART that replaces the Dalvik virtual machine is different from that of Dalvik. Under Dalvik, every time an application runs, the bytecode needs to be converted into machine code through an immediate compiler, which slows down the running efficiency of the application. In the ART environment, when the application is first installed, the bytecode will be pre-compiled into machine code, making it a real native application.

[0056] The Hardware Abstraction Layer (HAL) 400 is an interface layer located between the operating system kernel and the hardware circuit. Its purpose is to abstract the hardware. To protect the intellectual property rights of hardware manufacturers, it hides the hardware interface details of a specific platform, thereby providing a virtual hardware platform for the operating system, making it hardware-independent and portable across multiple platforms. From the perspective of software and hardware testing, the testing work of software and hardware can be completed separately based on the hardware abstraction layer, enabling the software and hardware testing work to be carried out in parallel.

[0057] The Linux kernel layer 500 can be used to provide system services of the operating system, including security services, memory management, process management, network protocol stack, and driver model services of the operating system.

[0058] It can be understood that Figure 2 Only an architecture diagram of an operating system is exemplarily shown. The operating system architecture can also be four-layer or six-layer. Among them, the four-layer operating system architecture can include: application layer, framework layer, system runtime library layer, and Linux kernel layer. The six-layer operating system architecture can include: application layer, framework layer, system runtime library layer, hardware abstraction layer, Linux kernel layer, and hardware device layer. The method embodiments of this application do not make any limitations on the number of architecture layers and the specific architecture of the operating system.

[0059] Figure 3 An architecture schematic diagram when the operating system responds to the positioning request of an application is exemplarily shown. In one embodiment, based on Figure 2 The shown architecture schematic diagram of the operating system, an application in the application layer 100 (such as a map application or a food delivery application, etc., which need to obtain the location) can initiate a location request; the positioning manager 240 provided by the framework layer 200 can respond to the location request and call the corresponding positioning interface according to the type of the location request; the system runtime library layer 300 receives the positioning request signal of the positioning interface and calls the specific hardware abstraction implementation of the hardware abstraction layer 400 according to the positioning request signal; the hardware abstraction layer 400 can obtain the original location information through a positioning chip (such as a GPS chip or a Beidou chip, etc.) and send it to the system runtime library layer; the system runtime library layer 300 can, after receiving the original location information, perform original location calculation on the original location information and further calculate according to the inertial navigation algorithm to obtain satellite location information or network location information and send it to the framework layer 200.

[0060] It should be noted that when the type of the position request is a satellite position request, the positioning manager 240 responds to the satellite position request and calls the corresponding satellite positioning interface to obtain satellite position information; when the type of the position request is a network positioning request, the positioning manager 240 responds to the network positioning request and calls the corresponding network positioning interface to obtain network position information; when the type of the position request is a fusion positioning request, the positioning manager 240 responds to the fusion positioning request and calls the corresponding fusion positioning interface to obtain satellite position information and network position information, and calculates the fusion position information according to the fusion position algorithm, satellite position information and network position information. Among them, when calculating the fusion position information, a fusion position sensor can also be used to assist in the calculation of the fusion position information, which can improve the positioning accuracy of the calculated fusion position information.

[0061] The GPS module in the embodiments of the present application includes a number of hardware or software services called by the operating system to obtain satellite position information. Specifically, it can include a positioning chip in the hardware abstraction layer 400, a raw position calculation algorithm and an inertial navigation algorithm provided by the system runtime library layer 300, a satellite positioning interface and a positioning manager 240 provided by the framework layer 200, etc. The embodiments of the present application do not make any limitation on the specific hardware or software services included in the GPS module.

[0062] The FLP module in the embodiments of the present application includes a number of hardware or software services called by the operating system to obtain fusion position information. Specifically, it can include a positioning chip in the hardware abstraction layer 400, a raw position calculation algorithm and an inertial navigation algorithm provided by the system runtime 300, a satellite positioning interface, a network positioning interface, a fusion positioning interface and a positioning manager 240 provided by the framework layer 200, etc. The embodiments of the present application do not make any limitation on the specific hardware or software services included in the FLP module.

[0063] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the structure of the terminal device 1 and the architecture of the operating system running on the terminal device 1. In other embodiments of the present application, the terminal device 1 may include more or fewer components than those illustrated, or combine certain components, or different components. For example, it may further include an output device, a network access device, etc. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0064] As Figure 4 shown, the positioning method provided by the embodiments of the present application is applied to the terminal device 1 provided by the above embodiments, and includes the following steps S401 to step S403:

[0065] Step S401: Receive the satellite position request of the first application and the fused position request of the second application, and respond to the satellite position request or the fused position request to obtain satellite position information and fused position information.

[0066] In an application, when the terminal device simultaneously receives the satellite position request of the first application and the fused position request of the second application, the specific situation of simultaneous reception can be that after receiving the satellite position request of the first application and before the satellite position request of the first application is released, the fused position request of the second application is received; or it can be that after receiving the fused position request of the second application and before the fused position request of the second application is released, the satellite position request of the first application is received. The terminal device can respond to the satellite position request to obtain satellite position information and fused position information, or can respond to the fused position information request to obtain satellite position information and fused position information. Specifically, it can determine the responded position request according to the time sequence of receiving the satellite position request and the fused position request, or can determine the responded position request according to a preset response rule. For example, the preset response rule can be to preferentially respond to the satellite position request, or can be to preferentially respond to the fused position request. It should be noted that when responding to the satellite position request to obtain satellite position information and fused position information, it does not respond to the fused position request to obtain satellite position information and fused position information; similarly, when responding to the fused position request to obtain satellite position information and fused position information, it does not respond to the satellite position request to obtain satellite position information and fused position information.

[0067] It should be noted that simultaneously receiving the satellite position requests and fused position requests of two applications is only exemplary. The terminal device can simultaneously receive the satellite position requests or fused position requests of multiple applications and only respond to one satellite position request or fused position request. The specific response logic is the same as that for simultaneously receiving the satellite position requests and fused position requests of two applications and will not be elaborated here.

[0068] In one embodiment, step S401 includes:

[0069] Detect the strength of the satellite signal, where the satellite signal is used to obtain satellite position information;

[0070] When the strength of the satellite signal is greater than a preset threshold, receive the satellite position request of the first application and the fused position request of the second application, respond to the satellite position request to obtain the first satellite position information, and respond to the fused position request to obtain the second satellite position information and fused position information;

[0071] When the strength of the satellite signal is less than or equal to the preset threshold, receive the satellite position request of the first application and the fused position request of the second application, and respond to the satellite position request or the fused position request to obtain satellite position information and fused position information.

[0072] In an application, a terminal device can control a satellite positioning interface or a GPS chip to transmit a test signal to a GPS satellite and receive a feedback signal from the GPS satellite. The strength of the satellite signal can be determined based on parameters such as the signal feedback time from transmitting the test signal to receiving the feedback signal and the strength of the feedback signal.

[0073] In an application, when the strength of the satellite signal is greater than a preset threshold, it indicates that the positioning accuracy of the satellite position information obtained through the satellite signal is relatively high. When receiving a satellite position request from a first application and a fused position request from a second application simultaneously, the satellite position request can be independently responded to obtain the first satellite position information, and the fused position request can be independently responded to obtain the second satellite position information and the fused position information. It should be noted that since the positioning accuracy of the satellite position information is relatively high, when receiving a satellite position request, only the satellite position information can be obtained, and there is no need to obtain the fused position information, which will not cause the FLP module to request satellite position information while the GPS module requests fused position information, and the operating system of the terminal device can work stably while ensuring the positioning accuracy.

[0074] In an application, when the strength of the satellite signal is less than or equal to the preset threshold, it indicates that the positioning accuracy of the satellite position information obtained through the satellite signal is relatively low. When receiving a satellite position request from a first application and a fused position request from a second application simultaneously, one of the position requests, either the satellite position request or the fused position request, can be responded to obtain the satellite position information and the fused position information. The specific response logic can refer to the description of the above embodiments and will not be elaborated here.

[0075] It should be noted that when the positioning accuracy of the satellite position information is relatively low and a satellite position request is received, the satellite position information and the fused position information can be obtained. When the positioning accuracy of the satellite position information is less than that of the fused position information, the fused position information can be reported to the application layer to improve the positioning accuracy. In addition, by only responding to one of the satellite position request or the fused position request to obtain the satellite position information and the fused position information when receiving a satellite position request from a first application and a fused position request from a second application simultaneously, it is possible to avoid a loop where the FLP module requests satellite position information while the GPS module requests fused position information, resulting in the GPS module being unable to be turned off, improving the operating stability of the operating system and the positioning accuracy of the position information reported when responding to the satellite position request. Among them, the specific size of the preset threshold can be set according to actual needs, and the embodiments of the present application do not make any limitation on the specific size of the preset threshold.

[0076] Step S402: Obtain the preferred position information according to the positioning accuracies of the satellite position information and the fused position information, and send it to the first application.

[0077] In an application, after obtaining satellite position information and fused position information in response to a satellite position request or a fused position request, the positioning accuracy of the satellite position information and the fused position information can be obtained, and the position information with higher positioning accuracy is used as the preferred position information and sent to the first application, so as to improve the positioning accuracy of the position information reported in response to the satellite position request and improve the call efficiency of the FLP module.

[0078] In one embodiment, step S402 includes:

[0079] Obtain the positioning accuracy of the satellite position information and the fused position information;

[0080] When the positioning accuracy of the satellite position information is greater than the positioning accuracy of the fused position information, the satellite position information is used as the preferred position information and sent to the first application;

[0081] When the positioning accuracy of the fused position information is greater than the positioning accuracy of the satellite position information, the fused position information is used as the preferred position information and sent to the first application.

[0082] In an application, the terminal device can respectively obtain the positioning accuracy of the satellite position information and the fused position information, and compare the positioning accuracy of the satellite position information and the fused position information to obtain the preferred position information. Specifically, when the positioning accuracy of the satellite position information is greater than the positioning accuracy of the fused position information, the satellite position information is used as the preferred position information and sent to the first application; when the positioning accuracy of the fused position information is greater than the positioning accuracy of the satellite position information, the fused position information is used as the preferred position information and sent to the first application.

[0083] Step S403: Send the fused position information to the second application.

[0084] In an application, after obtaining the satellite position information and the fused position information in response to the satellite position request of the first application, the fused position information obtained in response to the satellite position request of the first application can be sent to the second application; after obtaining the satellite position information and the fused position information in response to the fused position request of the second application, the preferred position information can be obtained from the satellite position information and the fused position information obtained in response to the fused position request of the second application and sent to the first application. When two applications or multiple applications simultaneously initiate a satellite position request or a fused position request, it is possible to avoid a mutual request loop where the FLP module requests satellite position information while the GPS module requests fused position information, preventing the GPS module from being turned off. Through flexible position request responses, the operating stability of the terminal device when receiving multiple position requests simultaneously can be improved, and by obtaining the preferred position information from the satellite position information and the fused position information, the positioning accuracy when responding to the satellite position request can be improved.

[0085] Such asFigure 5 As shown, in one embodiment, based on Figure 4 the corresponding embodiment, the following steps S501 to S504 are included:

[0086] Step S501, if a satellite position request of a first application is received first and then a fusion position request of a second application is received, respond to the satellite position request to obtain satellite position information and fusion position information;

[0087] Step S502, if a fusion position request of a second application is received first and then a satellite position request of a first application is received, respond to the fusion position request to obtain satellite position information and fusion position information.

[0088] In the application, the response position request can be determined according to the time sequence of receiving the satellite position request and the fusion position request. Specifically, the first received position request can be determined as the response position request, and the obtained satellite position information and / or fusion position information can be sent to the application of the later received position request.

[0089] In the application, taking the first application initiating a satellite position request and the second application initiating a fusion position request as an example, if a satellite position request of the first application is received first and then a fusion position request of the second application is received, respond to the satellite position request of the first application to obtain satellite position information and fusion position information; if a fusion position request of the second application is received first and then a satellite position request of the first application is received, respond to the fusion position request to obtain satellite position information and fusion position information.

[0090] In one embodiment, in step S501, responding to the satellite position request to obtain satellite position information and fusion position information includes:

[0091] Respond to the satellite position request to obtain satellite position information, and calculate the fusion position information according to the satellite position information.

[0092] In the application, after responding to the satellite position request to obtain satellite position information, the fusion position information can be calculated according to the satellite position information. Specifically, the fusion position information can be calculated according to the satellite position information and the fusion position algorithm; the network position information can also be obtained, and the fusion position information can be calculated according to the satellite position information, the network position information, and the fusion position algorithm; the sensor information can also be obtained through the fusion position sensor, and the fusion position information can be calculated according to the satellite position information, the network position information, the sensor information, and the fusion position algorithm. Among them, the fusion position sensor can be a Bluetooth sensor, a Near Field Communication (NFC) sensor, etc., which are sensors that can be used to assist the terminal device in determining the position.

[0093] In one embodiment, in step S502, obtaining satellite position information and fused position information in response to a fused position request includes:

[0094] Obtaining satellite position information in response to a fused position request and calculating fused position information based on the satellite position information.

[0095] In an application, after responding to a fused position request, it is necessary to first obtain satellite position information to calculate fused position information based on the satellite position information. The calculation method of the fused position information is the same as the calculation method of the fused position information after responding to the satellite position request above, and will not be elaborated here.

[0096] Step S503: Obtain preferred position information according to the positioning accuracies of the satellite position information and the fused position information and send it to the first application;

[0097] Step S504: Send the fused position information to the second application.

[0098] In an application, the positioning methods provided in step S503 and step S504 are the same as the positioning methods provided in the above step S402 and step S403, and will not be elaborated here.

[0099] In an application, when two or more applications simultaneously initiate a satellite position request or a fused position request, the position request to be responded to can be determined according to the timing of the received position requests, avoiding a loop where the FLP module requests satellite position information while the GPS module requests fused position information, preventing the GPS module from being turned off. Through flexible position request responses, the operating stability of the terminal device when receiving multiple position requests simultaneously can be improved.

[0100] As Figure 6 shown, in one embodiment, based on Figure 5 the corresponding embodiment, the following steps S601 to S607 are included:

[0101] Step S601: If a satellite position request from the first application is received first and a fused position request from the second application is received later, obtain satellite position information and fused position information in response to the satellite position request;

[0102] Step S602: Obtain preferred position information according to the positioning accuracies of the satellite position information and the fused position information and send it to the first application;

[0103] Step S603: Send the fused position information to the second application.

[0104] In an application, steps S601 to S603 are the same as the positioning methods provided in the above step S501, S503, and step S504, and will not be elaborated here.

[0105] Step S604: If the satellite position request of the first application is released first and the fused position request of the second application is released later, after the satellite position request of the first application is released, respond to the fused position request to obtain satellite position information and fused position information, and enter Step S606.

[0106] In the application, after sending the preferred position information to the first application and the fused position information to the second application, the terminal device can determine whether the satellite position request of the first application is released first or the fused position request of the second application is released first. If the satellite position request of the first application is released first, then the fused position request of the second application is released later. The terminal device can, after the satellite position request of the first application is released, respond to the fused position request of the second application to continue obtaining satellite position information and fused position information, so that the second application can continue to obtain fused position information after the satellite position request of the first application is released.

[0107] In the application, after the satellite position of the first application is released, the fused position request of the second application can be released according to the actual needs of the second application.

[0108] Step S605: If the fused position request of the second application is released first and the satellite position request of the first application is released later, after the fused position request of the second application is released, respond to the satellite position request to obtain satellite position information and fused position information, and enter Step S607.

[0109] In the application, if the fused position request of the second application is released first, then the satellite position request of the first application is released later. The terminal device can, after the fused request of the second application is released, respond to the satellite position request of the first application to continue obtaining satellite position information and fused position information, so that the first application can continue to obtain preferred position information after the fused request of the second application is released.

[0110] Step S606: Send the fused position information to the second application;

[0111] Step S607: Obtain the preferred position information according to the positioning accuracy of the satellite position information and the fused position information, and send it to the first application.

[0112] In the application, the positioning method provided in Step S606 is the same as that provided in the above Step S403, and the positioning method provided in Step S607 is the same as that provided in the above Step S402, which will not be elaborated here.

[0113] Figure 7 Exemplarily shown is the timing diagram of the operating system when the satellite position request of the first application is received first, the fused position request of the second application is received later, and the satellite position request of the first application is released first and the fused position request of the second application is released later (Situation 1).

[0114] In the application, the following combines Figure 7 , to illustrate the specific control method of the operating system in Scenario 1. Among them, steps a1 to a12 represent the steps executed by the operating system in response to the satellite position request of the first application, and steps A1 to A9 represent the steps executed by the operating system in response to the fusion position request of the second application. The GLP (GPS Location Provider) module is used to respond to the satellite position request and call the GPS module to work. Among them, the two timing lines of the FLP module represent parallel processing of the fusion position request of the second application and communication with the GLP module.

[0115] Step a1, at time t0, the first application sends a satellite position request;

[0116] Step a2, the GLP module responds to the satellite position request and obtains satellite position information; in step a1 or step a2, the flag bit Has_Gps_Request can be set to 1. The flag bit Has_Gps_Request is used to indicate that there is an application in the operating system that obtains satellite position information through the satellite position request;

[0117] Step a3, the GLP module calls the FLP module to start the FLP module;

[0118] Step a4, the GLP module sends a fusion position information acquisition request to the FLP module;

[0119] Step A1, at time t1, the second application sends a fusion position request; in Scenario 1, step A1 can occur after step a1 and before step a11, that is, time t1 is after time t0 and before time t2;

[0120] Step A2, the FLP module receives the fusion position request and determines whether the operating system has responded to the satellite position request (which can be achieved by judging the flag bit Has_Gps_Request. If the flag bit Has_Gps_Request is 1, it means that the operating system has responded to the satellite position request). If so, the fusion position information is not obtained repeatedly;

[0121] Step a5, the GLP module receives the satellite acquisition information acquisition request from the FLP module. The GLP module does not obtain the satellite position information repeatedly and sends the satellite position information obtained in step a2 to the FLP module in step a6;

[0122] Step a7, the FLP module calculates the fusion position information based on the satellite position information and one or more parameters provided in the above embodiments;

[0123] Step a8, the FLP module sends the calculated fusion position information to the GLP module;

[0124] Step A3, the FLP module sends the calculated fused location information to the second application;

[0125] Step a9, the GLP module determines the preferred location information based on the fused location information received in step a8 and the satellite location information obtained in step a2;

[0126] Step a10, the GLP module sends the preferred location information to the first application;

[0127] Step a11, at time t2, the first application releases the satellite location request;

[0128] Step a12, since the first application releases the satellite location request, the GLP module stops sending the fused location information acquisition request to the FLP module, stops acquiring the fused location information, and sets the flag bit Has_Gps_Request to 0;

[0129] Step A4, the FLP module determines whether the application continues to request the fused location information. If so, it continues to acquire the satellite location information, and the FLP module sends a satellite location information acquisition request to the GLP module; In step A4, it can be determined whether the application continues to request the fused location information by judging the flag bit mRequest.reportLocation. When the flag bit mRequest.reportLocation is set to 1, it indicates that there is an application continuing to request the fused location information. When the flag bit mRequest.reportLocation is set to 0, it indicates that there is no application continuing to request the fused location information;

[0130] Step A5, the GLP module sends the satellite location information to the FLP module;

[0131] Step A6, the FLP module calculates the fused location information based on the satellite location information and one or more parameters provided in the above embodiments;

[0132] Step A7, the FLP module sends the calculated satellite location information to the second application;

[0133] Step A8, at time t3, the second application releases the fused location request; In case one, step A8 is sent after step a11, that is, time t3 is after time t2;

[0134] Step A9, since the second application releases the fused location request, the FLP module stops sending the satellite location information acquisition request to the GLP module and stops acquiring the satellite location information.

[0135] Figure 8An exemplary timing diagram of the operating system is shown when a satellite position request of a first application is received first, followed by a fusion position request of a second application, and the fusion position request of the second application is released first, and the satellite position request of the first application is released later (Situation 2).

[0136] In the application, the following will be combined with Figure 8 to describe the specific control method of the operating system in Situation 2. Among them, steps b1 to b17 represent the steps executed by the operating system in response to the satellite position request of the first application, and steps B1 to B5 represent the steps executed by the operating system in response to the fusion position request of the second application.

[0137] Among them, steps b1 to b10 are the same as steps a1 to a10 above, and will not be elaborated here.

[0138] Step B1, at time t1, the second application sends a fusion position request; in Situation 2, step B1 can occur after step b1 and before step a16, that is, after time t0 and before time t2;

[0139] Steps B2 and B3 are the same as steps A2 and A3 above, and will not be elaborated here;

[0140] Step B4, at time t3, the second application releases the fusion position request; in Situation 2, step B4 can be sent after step B1 and before step b16, that is, after time t1 and before time t2;

[0141] Step B5, the FLP module determines whether the application continues to request satellite position information. If so, it will not interrupt the calculation of the fusion position information, that is, it will not close the FLP module; in step B5, it can be determined whether the application continues to request satellite position information by judging the flag bit Has_Gps_Request. When the flag bit Has_Gps_Request is set to 1, it means that there is an application in the operating system that obtains satellite position information through a satellite position request;

[0142] Step b11, the GLP module sends satellite position information to the FLP module. Among them, the satellite position information in step b11 can be the satellite position information obtained in step b2, or the satellite position information re-obtained before step b11;

[0143] Steps b12 to b17 are the same as steps a7 to a12 above, and will not be elaborated here.

[0144] As Figure 9 shown, in one embodiment, based on Figure 5 the corresponding embodiment, it includes the following steps S901 to S907:

[0145] Step S901: If a fusion location request of the second application is received first and a satellite location request of the first application is received later, respond to the fusion location request to obtain satellite location information and fusion location information;

[0146] Step S902: Obtain preferred location information according to the positioning accuracy of the satellite location information and the fusion location information, and send it to the first application;

[0147] Step S903: Send the fusion location information to the second application.

[0148] In the application, steps S901 to S903 are the same as the positioning methods provided by the above steps S501, S503, and S504, and will not be elaborated here.

[0149] Step S904: If the satellite location request of the first application is released first and the fusion location request of the second application is released later, after the satellite location request of the first application is released, respond to the fusion location request to obtain satellite location information and fusion location information, and enter step S906;

[0150] Step S905: If the fusion location request of the second application is released first and the satellite location request of the first application is released later, after the fusion location request of the second application is released, respond to the satellite location request to obtain satellite location information and fusion location information, and enter step S907.

[0151] In the application, the positioning methods provided by steps S904 and S905 are the same as the positioning methods provided by the above steps S604 and S605, and will not be elaborated here.

[0152] Step S906: Send the fusion location information to the second application;

[0153] Step S907: Obtain preferred location information according to the positioning accuracy of the satellite location information and the fusion location information, and send it to the first application.

[0154] In the application, the positioning method provided by step S906 is the same as the positioning method provided by the above step S403, and the positioning method provided by step S907 is the same as the positioning method provided by the above step S402, and will not be elaborated here.

[0155] Figure 10 Exemplarily, a timing diagram of the operating system is shown when a fusion location request of the second application is received first, a satellite location request of the first application is received later, the satellite location request of the first application is released first, and the fusion location request of the second application is released later (Situation 3).

[0156] In the application, the following combines Figure 10, the specific control method of the operating system in Scenario 3 is described. Among them, steps C1 to C7 represent the steps executed by the operating system in response to the fusion location request of the second application, and steps c1 to c10 represent the steps executed by the operating system in response to the satellite location request of the first application. Among them, the two timing lines of the GLP module represent the concurrent processing of the satellite location request of the first application and the communication with the FLP module.

[0157] Step C1, at time t0, the second application sends a fusion location request;

[0158] Step C2, the FLP module determines whether the operating system has responded to the satellite location request or the fusion location request. If not, it starts the FLP module and can set the flag bit Is_Flp_Working to 1. When the flag bit Is_Flp_Working is set to 1, it indicates that the FLP module is responding to the fusion location request;

[0159] Step C3, the FLP module sends a satellite location information acquisition request to the GLP module;

[0160] Step c1, at time t1, the first application sends a satellite location request, and the flag bit Has_Gps_Request can be set to 1, indicating that there is an application in the operating system that obtains satellite location information through the satellite location request; in Scenario 3, step c1 can occur after step C1 and before step C8, that is, after time t0 and before time t2;

[0161] Step c2, the GLP module determines whether the FLP module is responding to the fusion location request (which can be achieved by judging whether the flag bit Is_Flp_Working is set to 1). If so, it does not repeat the acquisition of satellite location information;

[0162] Step c3, the GLP module sends a fusion location information acquisition request to the FLP module, and the FLP module does not repeat the acquisition of fusion location information;

[0163] Step C4, the GLP module responds to the satellite location information acquisition request in step C3, acquires the satellite location information and sends it to the FLP module;

[0164] Step C5, the FLP module calculates the fusion location information based on the satellite location information and one or more parameters provided in the above embodiments;

[0165] Step C6, the FLP module sends the calculated fusion location information to the second application;

[0166] Step c4, the FLP module sends the calculated fusion location information to the GLP module;

[0167] Step c5: The GLP module determines the preferred location information based on the fused location information received in step c4 and the satellite location information obtained in step C4.

[0168] Step c6: The GLP module sends the preferred location information to the first application.

[0169] Step C7: The second application releases the fused location request. The FLP module stops sending the satellite location information acquisition request to the GLP module and sets the flag bit Is_Flp_Working to 0. In case three, step C7 can occur after step c1 and before step c9, that is, after time t1 and before time t3.

[0170] Step c7: The GLP module determines whether the application continues to request satellite location information (which can be achieved by determining whether the flag bit Has_Gps_Request is set to 1). If so, it continues to obtain the satellite location information. During this period, the FLP module remains enabled to continue calculating the fused location.

[0171] Step c8: The determination and sending of the preferred location information can be completed by referring to steps c4, c5, and c6, which will not be elaborated here.

[0172] Step c9: At time t3, the second application releases the satellite location request.

[0173] Step c10: Since the second application releases the satellite location request, the GLP module stops sending the fused location information acquisition request to the FLP module, stops obtaining the fused location information, and sets the flag bit Has_Gps_Request to 0.

[0174] Figure 11 An exemplary timing diagram of the operating system is shown when the fused location request of the second application is received first, followed by the satellite location request of the first application, and the fused location request of the second application is released first, and the satellite location request of the first application is released later (case four).

[0175] In the application, the following combines Figure 11 , to illustrate the specific control method of the operating system in case four. Among them, steps D1 to D8 represent the steps executed by the operating system in response to the fused location request of the second application, and steps d1 to d8 represent the steps executed by the operating system in response to the satellite location request of the first application.

[0176] Among them, steps D1 to D6 are the same as steps C1 to C6 above, and steps d1 to d6 are the same as steps c1 to c6 above, which will not be elaborated here.

[0177] Step d7, at time t3, the first application releases the satellite position request; in Scenario 4, step d6 can be sent after step D1 and before step D7, that is, before time t0 and after time t2;

[0178] Step d8, since the first application releases the satellite position request, the GLP module stops initiating the request for obtaining the fused position information to the FLP module, stops obtaining the fused position information, and sets the flag bit Has_Gps_Request to 0;

[0179] Step D7, the second application releases the fused position request, the FLP module stops initiating the request for obtaining the satellite position information to the GLP module, sets the flag bit Is_Flp_Working to 0, and stops obtaining the satellite position information at step D8; it should be noted that before step D7, the fused position information can be continuously obtained with reference to steps D3, D4, and D5, and the fused position information is sent to the second application in step D6. Scenario 4 exemplarily shows the scenario where the second application releases the fused position request after the first application releases the satellite position request.

[0180] The positioning method provided by the embodiments of the present application receives the satellite position request of the first application and the fused position request of the second application, and obtains the satellite position information and the fused position information in response to the satellite position request or the fused position request; according to the positioning accuracy of the satellite position information and the fused position information, the preferred position information is obtained and sent to the first application; the fused position information is sent to the second application. By flexibly configuring the response logic of the position request, it is possible to avoid the loop of mutual requests formed when the FLP module requests the satellite position information while the GPS module requests the fused position information, thereby avoiding the service conflict where the GPS module cannot be turned off, improving the running stability of the terminal device when receiving multiple position requests simultaneously, and by obtaining the preferred position information from the satellite position information and the fused position information, the selection and flexible reporting of high-precision position information can be realized, which can improve the positioning accuracy and call efficiency of the FLP module, and by obtaining the fused position information through the FLP module, the positioning accuracy of the terminal device in a weak signal scenario can be improved, overcoming the problem of poor positioning accuracy of the GPS position information in a weak signal scenario.

[0181] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution is prior or subsequent. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0182] Such as Figure 12As shown in the figure, an embodiment of the present application further provides a positioning device, which is used to execute the steps in the above-mentioned positioning method embodiment applied to a terminal device. The positioning device may be a virtual appliance in the terminal device, run by the processor of the terminal device, or the terminal device itself.

[0183] As Figure 12 shown in the figure, the positioning device 12 provided in the embodiment of the present application includes an application layer 100 and a framework layer 200. The application layer 100 includes a first application and a second application;

[0184] The framework layer 200 is used for:

[0185] Receiving a satellite position request from the first application and a fused position request from the second application, and obtaining satellite position information and fused position information in response to the satellite position request or the fused position request;

[0186] Obtaining preferred position information according to the positioning accuracy of the satellite position information and the fused position information, and sending it to the first application;

[0187] Sending the fused position information to the second application.

[0188] In the application, each module in the positioning device may be a software program module, or may be implemented by different logic circuits integrated in the processor, or may also be implemented by multiple distributed processors.

[0189] It should be noted that the information interaction, execution process, etc. between the above modules, because they are based on the same concept as the method embodiment of the present application, for their specific functions and the technical effects brought, please refer to the method embodiment part for details, and will not be elaborated here.

[0190] Those skilled in the art can clearly understand that for the convenience and conciseness of description, only the above-mentioned division of each functional module is used as an example for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. Each functional module in the embodiment can be integrated in a processing module, or each module exists physically alone, or two or more modules are integrated in one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. In addition, the specific names of each functional module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working process of the modules in the above system can refer to the corresponding process in the foregoing method embodiment, and will not be elaborated here.

[0191] The embodiments of the present application also provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in the above-described embodiments of each positioning method can be implemented.

[0192] If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of the present application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps in the above-described embodiments of each method can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can at least include: any entity or device capable of carrying the computer program code to the photographing terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc, etc.

[0193] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0194] Those of ordinary skill in the art can realize that the modules and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0195] In the embodiments provided by the present application, it should be understood that the disclosed terminal device and method can be implemented in other ways. For example, the above-described embodiment of the terminal device is merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be an indirect coupling or communication connection through some interfaces, devices or modules, and can be in an electrical, mechanical or other form.

[0196] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included within the protection scope of the present application.

Claims

1. A positioning method, characterized in that, applied to a terminal device, the method includes: When receiving a satellite position request of a first application and a fused position request of a second application simultaneously, responding to the satellite position request or the fused position request to obtain satellite position information and fused position information; Obtaining preferred position information according to the positioning accuracy of the satellite position information and the fused position information, and sending the preferred position information to the first application; Sending the fused position information to the second application; Wherein, the obtaining preferred position information according to the positioning accuracy of the satellite position information and the fused position information, and sending the preferred position information to the first application includes: Obtaining the positioning accuracy of the satellite position information and the fused position information; When the positioning accuracy of the satellite position information is greater than the positioning accuracy of the fused position information, using the satellite position information as the preferred position information and sending it to the first application; When the positioning accuracy of the fused position information is greater than the positioning accuracy of the satellite position information, using the fused position information as the preferred position information and sending it to the first application.

2. The positioning method according to claim 1, characterized in that, The receiving the satellite position request of the first application and the fused position request of the second application, and responding to the satellite position request or the fused position request to obtain satellite position information and fused position information includes: Detecting the strength of the satellite signal, where the satellite signal is used to obtain the satellite position information; When the strength of the satellite signal is greater than a preset threshold, receiving the satellite position request of the first application and the fused position request of the second application, responding to the satellite position request to obtain first satellite position information, and responding to the fused position request to obtain second satellite position information and fused position information; When the strength of the satellite signal is less than or equal to the preset threshold, receiving the satellite position request of the first application and the fused position request of the second application, and responding to the satellite position request or the fused position request to obtain satellite position information and fused position information.

3. The positioning method according to claim 1, characterized in that, The receiving the satellite position request of the first application and the fused position request of the second application, and responding to the satellite position request or the fused position request to obtain satellite position information and fused position information includes: If the satellite position request of the first application is received first and the fused position request of the second application is received later, responding to the satellite position request to obtain satellite position information and fused position information; If the fused position request of the second application is received first and the satellite position request of the first application is received later, responding to the fused position request to obtain satellite position information and fused position information.

4. The positioning method according to claim 3, characterized in that, If the satellite position request of the first application is received first and the fused position request of the second application is received later, after sending the fused position information to the second application, it further includes: If the satellite position request of the first application is released first and the fused position request of the second application is released later, after the satellite position request of the first application is released, respond to the fused position request to obtain satellite position information and fused position information; If the fused position request of the second application is released first and the satellite position request of the first application is released later, after the fused position request of the second application is released, respond to the satellite position request to obtain satellite position information and fused position information.

5. The positioning method according to claim 3, wherein, if the fused position request of the second application is received first and the satellite position request of the first application is received later, after sending the fused position information to the second application, further comprising: If the fused position request of the second application is released first and the satellite position request of the first application is released later, after the fused position request of the second application is released, respond to the satellite position request to obtain satellite position information and fused position information; If the satellite position request of the first application is released first and the fused position request of the second application is released later, after the satellite position request of the first application is released, respond to the fused position request to obtain satellite position information and fused position information.

6. The positioning method according to any one of claims 3 to 5, wherein, responding to the satellite position request to obtain satellite position information and fused position information includes: responding to the satellite position request to obtain satellite position information, and calculating fused position information according to the satellite position information; responding to the fused position request to obtain satellite position information and fused position information includes: responding to the fused position request to obtain satellite position information, and calculating fused position information according to the satellite position information.

7. A positioning device, wherein, comprises an application layer and a framework layer, and the application layer includes a first application and a second application; The framework layer is used for: when receiving the satellite position request of the first application and the fused position request of the second application simultaneously, responding to the satellite position request or the fused position request to obtain satellite position information and fused position information; obtaining preferred position information according to the positioning accuracy of the satellite position information and the fused position information, and sending it to the first application; sending the fused position information to the second application; wherein, obtaining preferred position information according to the positioning accuracy of the satellite position information and the fused position information and sending it to the first application includes: obtaining the positioning accuracy of the satellite position information and the fused position information; when the positioning accuracy of the satellite position information is greater than the positioning accuracy of the fused position information, using the satellite position information as the preferred position information and sending it to the first application; when the positioning accuracy of the fused position information is greater than the positioning accuracy of the satellite position information, using the fused position information as the preferred position information and sending it to the first application.

8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the computer program, the steps of the positioning method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the steps of the positioning method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and device for position determination

    CN1449500A

  • Communication terminal, positioning system, and positioning method

    JP2008151661A

  • System for adaptive location determination and method using by the same

    KR1020120081304A