Method, device, electronic device and storage medium for obtaining positioning information

By introducing intermediate layer communication services in Linux system, communication with the GPS chips of Android system is realized, solving the problems of complex and high cost of GPS chip adaptation in Linux system, simplifying the adaptation process and improving the flexibility of the system sex.

CN113821360BActive Publication Date: 2024-12-20DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111222084.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-07-12
Filing Date
2021-10-20
Publication Date
2024-12-20
Estimated Expiration
2041-10-20

AI Technical Summary

Technical Problem

In Linux systems, obtaining GPS positioning information requires direct adaptation to the underlying GPS chip, which is complex in debugging and high in labor costs, and needs to be re-adapted when the GPS chip changes, resulting in cumbersome process.

Method used

Data forwarding between the two operating systems is carried out through the intermediate layer communication service. Communication is established between the geographic information service of the first operating system and the satellite navigation module of the second operating system, avoiding direct underlying adaptation and realizing the satellite navigation module. Access does not require changing the communication between the geographic information service and the target interface service, and even changes to the satellite navigation module will not affect access.

Benefits of technology

The adaptation process of GPS chips is simplified, debugging complexity and labor costs are reduced, the flexibility and adaptability of the system are improved, the complexity of underlying adaptation is avoided, and continuous access to the satellite navigation module is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113821360B_ABST
    Figure CN113821360B_ABST
Patent Text Reader

Abstract

The present application proposes a method, device, electronic device and storage medium for obtaining positioning information. The technical solution of the present application is applied to the middle-layer communication service, including: based on the service registered in the first communication system of the first operating system, receiving the positioning request sent by the geographic information service from the first communication system, the positioning request is used to request to obtain the satellite navigation positioning information of the second operating system; based on the service registered in the second communication system of the second operating system, sending the positioning request to the target interface service in the second communication system, the target interface service is the interface service of the satellite navigation module in the second operating system; when the satellite navigation positioning information returned by the target interface service is received from the second communication system based on the second service, the received satellite navigation positioning information is broadcast to the first communication system. The technical solution of the present application is adopted to realize the access of one operating system to the positioning information of another operating system.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on July 12, 2021, with application number 202110785532.0 and invention name “Protocol stack data transmission method, computer device and storage medium based on Linux system”, the entire contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a method, device, electronic device and storage medium for acquiring positioning information. Background Art

[0003] Linux, the full name of GNU / Linux, is a multi-user, multi-tasking operating system based on POSIX (Portable Operating System Interface), which supports multi-threading and multi-CPU (Central Processing Unit).

[0004] In Linux systems, GPS (Global Positioning System) positioning information is generally obtained through the Geoclue system service. Geoclue is a modular geographic information service built on the D-Bus (Desktop Bus, used for communication between processes or between processes and the kernel) communication system. Geoclue defines a set of geographic information APIs (Application Programming Interfaces). Linux systems can connect to the GPS system through the APIs provided by Geoclue to obtain corresponding positioning information.

[0005] In the existing technical solutions, in order to obtain GPS information, the Linux system directly adapts the kernel and the GPS chip at the bottom layer. However, this direct adaptation solution requires debugging of hardware parameters, which is complicated and requires a certain test environment and test equipment. Testers are required to track the test process, which has high labor costs. On the other hand, when the bottom layer GPS chip is changed, it also needs to be re-adapted. Summary of the invention

[0006] The embodiments of the present application provide a method, device, electronic device and storage medium for obtaining positioning information to solve the problems existing in the related technologies. The technical solutions are as follows:

[0007] In a first aspect, an embodiment of the present application provides a method for obtaining positioning information, which is applied to an intermediate layer communication service, including:

[0008] Based on a first service registered in a first communication system of a first operating system, receiving a positioning request sent by a geographic information service from the first communication system, wherein the positioning request is used to request to obtain satellite navigation positioning information of a second operating system;

[0009] Based on a second service registered in a second communication system of the second operating system, sending the positioning request to a target interface service in the second communication system; wherein the target interface service is an interface service of a satellite navigation module in the second operating system;

[0010] In case that the satellite navigation positioning information returned by the target interface service is received from the second communication system based on the second service, the received satellite navigation positioning information is broadcast to the first communication system.

[0011] In a second aspect, an embodiment of the present application provides a device for acquiring positioning information, which is applied to an intermediate layer communication service, including:

[0012] A first service using module, configured to receive a positioning request sent by a geographic information service of the first operating system from the first communication system based on a first service registered in the first communication system of the first operating system, wherein the positioning request is used to request to obtain satellite navigation positioning information of the second operating system;

[0013] A second service using module, configured to send the positioning request to a target interface service in the second communication system based on a second service registered in the second communication system of the second operating system, wherein the target interface service is an interface service of a satellite navigation module of the second operating system;

[0014] The broadcast module is used to broadcast the received satellite navigation positioning information to the first communication system when the satellite navigation positioning information returned by the target interface service is received from the second communication system based on the second service.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for obtaining positioning information in any embodiment of the present application.

[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, a method for obtaining positioning information in any embodiment of the present application is implemented.

[0017] The advantages or beneficial effects of the above technical solution include at least:

[0018] In the technical solution provided in the present application, an intermediate layer communication service is provided to relay communication between two operating systems. The intermediate layer communication service registers corresponding services in the communication systems of the two operating systems respectively, and then forwards data according to the corresponding services. Specifically, the geographic information service of the first operating system can communicate with the target interface service of the second operating system through the intermediate layer communication service, and the target interface service can communicate with the underlying satellite navigation module. In this way, in order to access the satellite navigation module corresponding to the second operating system, the first operating system does not need to directly adapt to the satellite navigation module at the bottom layer. It only needs to establish communication between the geographic information service and the target interface service serving the satellite navigation module through an intermediate layer communication service at the upper layer, so that the first operating system can access the satellite navigation module. Moreover, even if the satellite navigation module is changed, it will not affect the communication between the geographic information service and the target interface service. The first operating system can still access the satellite navigation module through this technical solution.

[0019] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present application will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.

[0021] Figure 1 is a flowchart of a method for acquiring positioning information according to an embodiment of the present application;

[0022] Figure 2 This is an application example of the process of obtaining positioning information of this application;

[0023] Figure 3 is a structural block diagram of a device for acquiring positioning information according to an embodiment of the present application;

[0024] Figure 4 is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present application. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.

[0026] Figure 1 FIG. 1 is a flow chart showing a method for obtaining positioning information according to an embodiment of the present application. Figure 1 As shown, the method is applied to the middle layer communication service and may include the following steps:

[0027] S110, based on the first service registered in the first communication system of the first operating system, receiving a positioning request sent by a geographic information service from the first communication system, wherein the positioning request is used to request to obtain satellite navigation positioning information of the second operating system;

[0028] S120, based on the second service registered in the second communication system of the second operating system, sending a positioning request to a target interface service in the second communication system; wherein the target interface service is an interface service of a satellite navigation module in the second operating system;

[0029] S130: When satellite navigation positioning information returned by the target interface service is received from the second communication system based on the second service, the received satellite navigation positioning information is broadcast to the first communication system.

[0030] In an embodiment of the present invention, the first operating system deploys and supports the second operating system through container technology, and the second operating system has a hardware driver for satellite navigation positioning so that satellite navigation positioning information can be obtained. For example, the two can share the Linux kernel and be implemented through containerization technologies such as LXC, LXD, and Docker. For example, the second operating system can implement a complete set of kernels and hardware abstraction layers in the user space of the first operating system and implement system calls to the kernel of the first operating system through the kernel.

[0031] For example, the first operating system includes various GNU / Linux distributions, such as Ubuntu, Debian, RedHat, etc. It should be noted that the first operating system is not limited to running on a physical machine, and can also be an operating system hosted on other operating systems, such as WSL in Windows system.

[0032] For example, the second operating system includes the Android operating system, including the Android OS released by Google, AOSP, and various derivative systems based on AOSP, such as MIUI, EMUI, One UI, etc. There are also many other types of operating systems that can be run as the second operating system in the first operating system through virtualization, containerization, etc. For example, Tizen, Hongmeng, Meego, etc. can all be used as examples of the second operating system.

[0033] Although not explicitly described, those skilled in the art can understand that in the technical solution of the present disclosure, the first and second operating systems can also be the same operating system, such as running Android in Android.

[0034] In the following embodiments, the hardware abstraction layer is an encapsulation of the operating system kernel driver, which provides a hardware access interface for various application layer requirements and shields the driver implementation details of the underlying hardware, such as the HAL (Hardware Abstraction Layer) in the Android system and the OAL in the Tizen system.

[0035] Interaction with satellite navigation and positioning hardware devices is achieved through the corresponding hardware abstraction layer interface description language. Hardware abstraction layer interface description language, also known as hardware abstraction layer interface definition language, is a language specification used to describe the interface of software components, enabling software components (written in different languages) to communicate with each other. In the Android system, the hardware abstraction layer interface description language is HIDL, which defines the interface between the Android Framework and the Android HAL implementation; in the Tizen system, the hardware abstraction layer interface description language is OAL Interface IDL, which defines the interface between Native subsystems and HardwareAdaptation Layer implementation; the IDL of other systems can be queried from the architecture manual of the corresponding system.

[0036] In some embodiments, the communication mechanism of the first operating system is a bus communication mechanism. The bus BUS is an inter-process communication mechanism IPC in the operating system. Taking the Linux operating system as an example, the specific implementation of the bus includes but is not limited to D-Bus, kdbus, ZeroMQ, etc.; the communication mechanism of the second operating system is the Binder communication mechanism.

[0037] The middle layer communication service can be applied to the user space, and the user can directly interact with the middle layer communication service, which can also be considered as a process running. For example, the Geoclue service in the Linux system communicates with the interface service of the GPS chip under Android through the Ginder middle layer communication service.

[0038] The services registered in the communication system can be considered as an abstraction of application process or service registration. For example, if an application process registers an interface address on the bus, it can obtain the service of the corresponding bus. If the bus provides a service query interface, the process can query whether a service exists through this interface.

[0039] The first service is a service registered by the middle layer communication service on the first communication system of the first operating system. After registering the first service, the middle layer communication service establishes a communication connection with the first communication system, and the middle layer communication service can communicate with the service or application process in the first operating system through the service established in the first communication system.

[0040] The second service is a service registered by the middle layer communication service on the second communication system of the second operating system. After registering the second service, the middle layer communication service establishes a communication connection with the second communication system, and the middle layer communication service can communicate with other services or application processes in the second operating system through the service established in the second communication system.

[0041] The operating system can set up a variety of services or application processes. Among them, the geographic information service can provide geographic data and computing services for other services or application processes in the operating system or system, such as map services, spatial data format conversion, etc. The geographic information service can access the location provider to obtain geographic data and provide it to the target application. For example, the geographic information service can access the location information of the GPS system.

[0042] The satellite navigation module can be a chip in a hardware device for obtaining satellite navigation positioning information. It communicates with the upper layer through its driver, and the driver configures the corresponding interface service to interact with the user. For example, under the Android system, the Android GPS HAL uses HIDL (HAL interface definition language) for communication with its user applications or services. When the GPS chip and its driver are changed, HIDL can remain unchanged.

[0043] The embodiment of the present application provides a communication connection between the geographic information service of the first operating system and the interface service of the GPS chip through the middle layer communication service. The underlying kernel of the first operating system does not need to be adapted to the GPS chip at the underlying level, but directly connects to the hardware abstraction layer of the GPS chip of the second operating system through the service between the upper layer applications. Moreover, even if the underlying GPS chip is changed, it does not affect the service connection between the upper layer applications, and the geographic information service in the first operating system can still access the interface service of the GPS chip provided by the second operating system.

[0044] In some embodiments, the above method may also include a process of registering a service, or re-registering a service, and then obtaining the above positioning information based on the re-registered service. The specific registration process is as follows:

[0045] Based on the communication mechanism of the first communication system, registering a first service for communication between the middle layer communication service and the geographic information service in the first communication system;

[0046] Based on the communication mechanism of the second communication system, a second service for communication between the intermediate layer communication service and the target interface service is registered in the second communication system.

[0047] Exemplarily, the communication mechanism of the first communication system is bus communication, and the registration process of the first service includes: based on the first interface on the bus of the first operating system where the geographic information service is deployed and the address of the first interface, registering a first function on the bus, wherein the first function is used to return the positioning request received from the first interface to the middle-layer communication service.

[0048] For example, the first function is the method_call() method of the bus.

[0049] The middle-layer communication service can call the first function during operation, and return the positioning request received by the first interface to the middle-layer communication service through the first function. For example, the Geoclue service sends a positioning request message to the first interface on the D-bus, and the Ginder middle-layer communication service receives the positioning request returned by the first interface on the D-bus through the first function.

[0050] Exemplarily, the communication mechanism of the second communication system is Binder communication, and the registration process of the second service includes: based on the target interface service mapping to the first storage space in the Binder driver of the second operating system, registering a second function in the Binder driver, wherein the second function is used to store the positioning request received by the middle-layer communication service in the first storage space.

[0051] For example, the second function is the transact() method of Binder.

[0052] When the middle layer communication service receives the positioning request, it calls the second function and stores the positioning request in the storage space pointed to by the pointer of the second function. This storage space is a Binder-driven storage space and has a mapping relationship with the storage space of the target interface service. In this way, when the positioning request is stored in the storage space pointed to by the pointer of the second function, the target interface service can obtain the positioning request from the storage space according to the above mapping relationship. The target interface service sends this positioning request to the satellite navigation module, and the satellite navigation module starts to search for stars and obtain the corresponding satellite navigation positioning information.

[0053] Exemplarily, the registration process of the second service may further include:

[0054] Based on the target interface service mapping to the second storage space in the Binder driver, a third function is registered in the Binder driver, wherein the second storage space is used to store the satellite navigation positioning information acquired by the satellite navigation module, and the third function is used to acquire the satellite navigation positioning information from the second storage space and return it to the middle layer communication service.

[0055] For example, the third function is the read() method of Binder.

[0056] After sending the positioning request to the second communication system, the middle layer communication service can monitor through the third function whether there is data input in the storage space pointed to by the third function pointer, and if so, call the data back to the middle layer communication service.

[0057] In some embodiments, after establishing the registration of the first service and the second service, the middle-layer communication service can also set a specific time point or time period, and send a corresponding positioning request to the target interface service through the second function. The satellite navigation module can obtain the positioning request through the target interface service, and then start searching for satellites to obtain the corresponding satellite navigation positioning information. The middle-layer communication service then calls back the satellite navigation positioning information returned by the target interface service through the third function.

[0058] In some embodiments, the satellite navigation positioning information generated by the satellite navigation module in the satellite search phase may be data encapsulated in the NMEA standard protocol. The data obtained in the satellite search phase is stored in the second storage space mapped by the target interface service. The middle layer communication service obtains the data encapsulated in the NMEA standard protocol from the second storage space through the callback of the third function. The middle layer communication service may perform the following operations on the data encapsulated in the NMEA standard protocol:

[0059] The status flag in the received data encapsulated in the NMEA standard protocol is checked, and when the status flag is in a valid state, the satellite navigation positioning information is extracted from the data encapsulated in the NMEA standard protocol.

[0060] The satellite navigation positioning information is extracted from the data encapsulated by the NMEA standard protocol as valid positioning information, and the middle layer communication service broadcasts the valid positioning information to the bus of the first operating system. The geographic information service can obtain the broadcasted positioning information through the bus.

[0061] The NMEA standard protocol is to establish a unified standard communication protocol in different GPS navigation devices. The satellite navigation module transmits information such as position and speed to the target receiver through the serial port according to the standard specifications of this protocol.

[0062] The data encapsulated in the NMEA standard protocol includes many fields, such as GGA (Global Positioning System Fix Data, GPS positioning information), GSA (GPS DOP and Active Satellites, current satellite information), GSV (GPS Satellites in View, visible satellite information), RMC (Recommended Minimum Specific GPS / TRANSIT Data, recommended positioning information), VTG (Track Made Good and Ground Speed, ground speed information), GLL (Geographic Position, positioning geographic information) and other fields. Among them, these fields include status flags. The middle layer communication service performs a preliminary analysis on the data encapsulated in the NMEA standard protocol returned by the third function, and checks whether the status flag is in a valid state to determine whether the data contains valid satellite navigation positioning information. Only when it is determined that the status flag is in a valid state, the NMEA data is further analyzed to obtain valid positioning information. Then, the middle layer communication service broadcasts the obtained valid data to the bus so that the geographic information service obtains the positioning information from the bus. Therefore, this embodiment can avoid providing a large amount of invalid positioning information to the geographic information service, and improve the transmission efficiency of the process.

[0063] The middle-layer communication service can also directly broadcast the data returned by the third function to the bus without parsing, but the data returned in this way contains invalid positioning information, and the geographic information service needs to further parse the data received from the bus to extract valid positioning information.

[0064] In some embodiments, after the middle layer communication service obtains valid satellite navigation positioning information, the middle layer communication service may also perform the following operations: construct a satellite data linked list based on the obtained satellite navigation positioning information, and broadcast the satellite data linked list to the bus, wherein the satellite data linked list includes at least the satellite number, signal strength, longitude and latitude, and time. In this way, the geographic information service may obtain the satellite data linked list from the bus and return it to other application processes in the operating system through the bus.

[0065] Figure 2 An application example of the process of obtaining positioning information of the present application is shown. Figure 2 As shown, the following describes the process of the Geoclue service in the Linux system accessing Android's HIDL:

[0066] The Geoclue system geographic information service is deployed on the D-bus bus of the Linux system. The Geoclue service sends a positioning request to the D-bus bus of the Linux system. The Ginder middle-layer communication service receives the positioning request forwarded by the D-bus bus through the first function registered on the D-bus bus. Each application process in the Android system communicates through the Binder communication mechanism. The middle-layer communication service can establish a mutually mapped storage space node with the interface service of the GPS chip in the Binder driver. After receiving the positioning request, the middle-layer communication service stores the positioning request in the first storage space mapped by the interface service of the GPS chip according to the second function of the middle-layer communication service registered in the Binder driver. The interface service of the GPS chip can obtain the positioning request from the first storage space, and then the interface service of the GPS chip sends the positioning request to the GPS chip, and the GPS chip starts to obtain positioning information, which is encapsulated in the NMEA standard protocol.

[0067] The interface service HIDL of the GPS chip stores the NMEA positioning data in the second storage space, and the middle-layer communication service obtains the NMEA positioning data through the second storage space pointed to by the third function pointer. The middle-layer communication service broadcasts the NMEA positioning data to the D-bus bus through its connection relationship with the D-bus bus. The Geoclue service can obtain the broadcasted NMEA positioning data from the D-bus bus.

[0068] The above positioning request and NMEA positioning data forwarding are all transmitted according to the transmission mechanism determined by the middle layer communication service during initial registration. The initial registration process also includes setting the format of the transmitted data, including the baud rate, data bits and other parameters of the data transmission.

[0069] This application example uses the Ginder middle-layer communication service to implement the Linux system's Geoclue service's HIDL access to the Android system's GPS chip. This eliminates the need for the Linux system and GPS chip to adapt to each other at the bottom layer, thus reducing the complexity of debugging.

[0070] Figure 3 FIG. 4 shows a structural block diagram of a device for acquiring positioning information according to an embodiment of the present application. Figure 3 As shown, the device 300 may include the following modules:

[0071] The first service using module 310 is used to receive a positioning request sent by the geographic information service of the first operating system from the first communication system based on the first service registered in the first communication system of the first operating system, wherein the positioning request is used to request to obtain the satellite navigation positioning information of the second operating system;

[0072] A second service using module 320, configured to send a positioning request to a target interface service in the second communication system based on a second service registered in the second operating system, wherein the target interface service is an interface service of a satellite navigation module of the second operating system;

[0073] The broadcast module 330 is used to broadcast the received satellite navigation positioning information to the first communication system when receiving the satellite navigation positioning information returned by the target interface service from the second communication system based on the second service.

[0074] In some embodiments, the apparatus 300 may further include:

[0075] A first service registration module 340, configured to register a first service for communication between the middle layer communication service and the geographic information service in the first communication system based on a communication mechanism of the first communication system;

[0076] The second service registration module 350 is used to register a second service used for communication between the intermediate layer communication service and the target interface service in the second communication system based on the communication mechanism of the second communication system.

[0077] In some embodiments, the communication mechanism of the first communication system is bus communication, and the first service registration module 340 may include:

[0078] The first function registration unit 341 is used to register a first function on the bus based on the first interface on which the geographic information service is deployed on the bus of the first operating system and the address of the first interface, wherein the first function is used to return the positioning request received from the first interface to the middle layer communication service.

[0079] In some embodiments, the communication mechanism of the second communication system is Binder communication, and the second service registration module 350 may include:

[0080] The second function registration unit 351 is used to register a second function in the Binder driver based on the first storage space in the Binder driver of the second operating system mapped with the target interface service, wherein the second function is used to store the positioning request received by the intermediate layer communication service in the first storage space.

[0081] In some embodiments, the second service registration module 350 may further include:

[0082] The third function registration unit 352 is used to register the third function in the Binder driver based on the second storage space mapped by the target interface service, wherein the second storage space is used to store the satellite navigation positioning information acquired by the satellite navigation module, and the third function is used to acquire the satellite navigation positioning information from the second storage space and return it to the middle layer communication service.

[0083] The functions of each module in each device in the embodiments of the present application can be found in the corresponding description in the above method, and will not be repeated here.

[0084] Figure 4 FIG. 1 is a block diagram showing a structure of an electronic device according to an embodiment of the present application. Figure 4 As shown, the electronic device includes: a memory 410 and a processor 420, and the memory 410 stores instructions that can be run on the processor 420. When the processor 420 executes the instruction, the method for obtaining the positioning information in the above-mentioned embodiment is implemented. The number of the memory 410 and the processor 420 can be one or more. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0085] The electronic device may also include a communication interface 430 for communicating with external devices and performing data exchange transmission. The various devices are interconnected using different buses and may be installed on a common motherboard or in other ways as needed. The processor 420 may process instructions executed within the electronic device, including instructions stored in or on a memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to an interface). In other embodiments, if necessary, multiple processors and / or multiple buses may be used together with multiple memories and multiple memories. Similarly, multiple electronic devices may be connected, each device providing some of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0086] Optionally, in a specific implementation, if the memory 410, the processor 420 and the communication interface 430 are integrated on a chip, the memory 410, the processor 420 and the communication interface 430 can communicate with each other through an internal interface.

[0087] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the Advanced RISC Machines (ARM) architecture.

[0088] An embodiment of the present application provides a computer-readable storage medium (such as the memory 410 described above), which stores computer instructions. When the program is executed by a processor, the method provided in the embodiment of the present application is implemented.

[0089] Optionally, the memory 410 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of an electronic device for obtaining positioning information, etc. In addition, the memory 410 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 410 may optionally include a memory remotely arranged relative to the processor 420, and these remote memories may be connected to the electronic device for obtaining positioning information via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0090] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0091] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0092] Any process or method description in the flow chart or otherwise described herein can be understood to represent a module, fragment or portion of a code including one or more (two or more) executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.

[0093] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.

[0094] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0095] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.

[0096] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for obtaining positioning information, characterized in that: Applied to middle-layer communication services, including: Based on a first service registered in a first communication system of a first operating system, receiving a positioning request sent by a geographic information service from the first communication system, wherein the positioning request is used to request to obtain satellite navigation positioning information of a second operating system; Based on a second service registered in a second communication system of the second operating system, sending the positioning request to a target interface service in the second communication system; wherein the target interface service is an interface service of a satellite navigation module in the second operating system; In a case where the satellite navigation positioning information returned by the target interface service is received from the second communication system based on the second service, broadcasting the received satellite navigation positioning information to the first communication system; The communication mechanism of the second communication system is Binder communication, and the registration process of the second service includes: Based on the first storage space mapped by the target interface service in the Binder driver of the second operating system, a second function is registered in the Binder driver, wherein the second function is used to store the positioning request received by the middle layer communication service in the first storage space.

2. The method according to claim 1, characterized in that The method further comprises: registering the first service used for communication between the middle layer communication service and the geographic information service in the first communication system based on a communication mechanism of the first communication system; Based on the communication mechanism of the second communication system, the second service for communication between the intermediate layer communication service and the target interface service is registered in the second communication system.

3. The method according to claim 2, characterized in that The communication mechanism of the first communication system is bus communication, and the registration process of the first service includes: Based on a first interface on the bus of the first operating system where the geographic information service is deployed and an address of the first interface, a first function is registered on the bus, wherein the first function is used to return a positioning request received from the first interface to the middle layer communication service.

4. The method according to claim 1, characterized in that The registration process of the second service also includes: Based on the target interface service mapping to the second storage space in the Binder driver, a third function is registered in the Binder driver, wherein the second storage space is used to store the satellite navigation positioning information acquired by the satellite navigation module, and the third function is used to obtain the satellite navigation positioning information from the second storage space and return it to the intermediate layer communication service.

5. A device for acquiring positioning information, characterized in that: Applied to middle-layer communication services, including: A first service using module, configured to receive a positioning request sent by a geographic information service of the first operating system from the first communication system based on a first service registered in the first communication system of the first operating system, wherein the positioning request is used to request to obtain satellite navigation positioning information of the second operating system; A second service using module, configured to send the positioning request to a target interface service in the second communication system based on a second service registered in the second communication system of the second operating system, wherein the target interface service is an interface service of a satellite navigation module of the second operating system; a broadcast module, configured to broadcast the received satellite navigation positioning information to the first communication system when the satellite navigation positioning information returned by the target interface service is received from the second communication system based on the second service, wherein the communication mechanism of the second communication system is Binder communication; The second service registration module includes: A second function registration unit is used to register a second function in the Binder driver based on the first storage space mapped by the target interface service in the Binder driver of the second operating system, wherein the second function is used to store the positioning request received by the intermediate layer communication service in the first storage space.

6. The device according to claim 5, characterized in that The device also includes: A first service registration module, configured to register the first service used for communication between the middle layer communication service and the geographic information service in the first communication system based on a communication mechanism of the first communication system; The second service registration module is used to register the second service used for communication between the intermediate layer communication service and the target interface service in the second communication system based on the communication mechanism of the second communication system.

7. The device according to claim 6, characterized in that The communication mechanism of the first communication system is bus communication, and the first service registration module includes: A first function registration unit is used to register a first function on the bus based on a first interface on which the geographic information service is deployed on the bus of the first operating system and the address of the first interface, wherein the first function is used to return a positioning request received from the first interface to the middle layer communication service.

8. The device according to claim 5, characterized in that The second service registration module also includes: A third function registration unit is used to register a third function in the Binder driver based on the second storage space mapped by the target interface service, wherein the second storage space is used to store the satellite navigation positioning information acquired by the satellite navigation module, and the third function is used to acquire the satellite navigation positioning information from the second storage space and return it to the intermediate layer communication service.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.

10. A computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.