Positioning method, device, terminal and storage medium

By creating the ephemeris data directory before the terminal is started, the problem of long positioning time caused by directory creation failure during hot start positioning function is solved, and a faster positioning process is achieved.

CN114265097BActive Publication Date: 2025-09-05FIBOCOM WIRELESS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111354740.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-16
Publication Date
2025-09-05
Estimated Expiration
2041-11-16

AI Technical Summary

Technical Problem

When the terminal hot-starts the positioning function, the positioning time is too long. The reason is that the directory storing the ephemeris data cannot be created when the application is started, resulting in the need to search for the ephemeris data again, which increases the positioning time.

Method used

Before the terminal starts the positioning function, a first directory for storing ephemeris data, such as a PE directory, is created in advance. Its creation is triggered during the boot process through a directory creation function to ensure that the ephemeris data can be directly called during hot start.

Benefits of technology

By pre-creating the ephemeris data directory, the time for re-searching the ephemeris data when hot-starting the positioning function is reduced, thus shortening the positioning time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114265097B_ABST
    Figure CN114265097B_ABST
Patent Text Reader

Abstract

The present application relates to a positioning method, apparatus, terminal, and storage medium. The positioning method includes: before starting a positioning function, creating a first directory for storing ephemeris data searched by the terminal during positioning; obtaining the ephemeris data searched by the terminal during positioning and storing the ephemeris data in the first directory; and when the terminal hot-starts the positioning function, retrieving the stored ephemeris data from the first directory to perform positioning using the ephemeris data. This positioning method can reduce positioning time when the terminal hot-starts the positioning function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of positioning technology, and in particular to a positioning method, device, terminal and storage medium. Background Art

[0002] With the development of positioning technology, hot start positioning technology has emerged. Hot start positioning technology uses the stored ephemeris data from the last positioning to perform positioning when the terminal has not moved much or the time interval since the last positioning is short.

[0003] However, currently when a terminal hot-starts the positioning function, the positioning time is too long. Summary of the Invention

[0004] Embodiments of the present application provide a positioning method, apparatus, terminal, and storage medium, which can reduce the positioning time when a terminal hot-starts a positioning function.

[0005] A positioning method, applied to a terminal, comprising:

[0006] Before starting the positioning function, creating a first directory, where the created first directory is used to store ephemeris data searched by the terminal during the positioning process;

[0007] Acquire the ephemeris data searched by the terminal during the positioning process, and store the ephemeris data in the first directory;

[0008] When the terminal hot-starts the positioning function, the stored ephemeris data is called from the first directory to perform positioning using the ephemeris data.

[0009] In one embodiment, creating the first directory includes:

[0010] Creating a second directory, where the second directory is used to trigger the creation of the first directory;

[0011] When the second directory is created, the first directory is created.

[0012] In one embodiment, the first directory is a PE directory, and creating the first directory includes:

[0013] Create a GNSS catalog;

[0014] When the GNSS directory is created, the PE directory is created. The PE directory is a subdirectory of the GNSS directory.

[0015] In one embodiment, the second directory is a cert directory, and creating the second directory includes:

[0016] Create a SUPL directory;

[0017] When the SUPL directory is created, create a client-cert directory;

[0018] After the client-cert directory is created, create the client-key directory.

[0019] When the client-key directory is created, the cert directory is created, and when the cert directory is created, the first directory is created.

[0020] In one embodiment, creating the first directory includes:

[0021] calling a directory creation function, wherein the directory creation function is configured with a first creation instruction for creating the first directory;

[0022] The first directory is created by the directory creation function.

[0023] In one embodiment, creating the second directory includes:

[0024] Calling the directory creation function, wherein the directory creation function is further configured with a second creation instruction for creating the second directory, the second creation instruction being configured before the first creation instruction;

[0025] The second directory is created by the directory creation function.

[0026] In one embodiment, the method further comprises:

[0027] When the first directory is created, searching for the first directory from the terminal;

[0028] In response to the result that the first directory search fails, a prompt is given that the first directory creation fails.

[0029] A positioning device is applied to a terminal, wherein the method further includes:

[0030] A directory creation module, configured to create a first directory before starting the positioning function, wherein the created first directory is used to store the ephemeris data searched by the terminal during the positioning process;

[0031] A storage module, configured to obtain the ephemeris data searched by the terminal during positioning, and store the ephemeris data in the first directory;

[0032] The positioning module is configured to call the stored ephemeris data from the first directory when the terminal hot-starts the positioning function, so as to perform positioning using the ephemeris data.

[0033] A terminal includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0034] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0035] The positioning method, device, terminal, and storage medium described above include the following steps: before starting the positioning function, creating a first directory for storing ephemeris data searched by the terminal during the positioning process; obtaining the ephemeris data searched by the terminal during the positioning process and storing the ephemeris data in the first directory; and when the terminal hot-starts the positioning function, retrieving the stored ephemeris data from the first directory to perform positioning using the ephemeris data. Because the first directory for storing ephemeris data has already been created before the terminal starts the positioning function, when the terminal needs to locate, the ephemeris data obtained during the positioning process can be normally stored in the first directory. Therefore, when the terminal hot-starts the positioning function, the ephemeris data stored in the first directory can be normally retrieved, thereby performing positioning using the ephemeris data. This solves the problem of the terminal being unable to create a directory for storing ephemeris data during the positioning process, resulting in an inability to store ephemeris data, and thus an inability to perform positioning using pre-stored ephemeris data, requiring re-acquisition of ephemeris data for positioning. Since re-acquiring ephemeris data takes a certain amount of time, the positioning time of the hot-start positioning function is excessively long, thereby reducing the positioning time of the terminal when the positioning function is hot-started. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0037] Figure 1 is a schematic flow chart of a positioning method in one embodiment;

[0038] Figure 2 is a detailed flow chart of step 110 in one embodiment;

[0039] Figure 3is a detailed flow chart of step 220 in one embodiment;

[0040] Figure 4 is a detailed flow chart of step 210 in one embodiment;

[0041] Figure 5 A detailed flowchart of creating a first directory in one embodiment;

[0042] Figure 6 is a structural block diagram of a positioning method in one embodiment;

[0043] Figure 7 FIG. 1 is a schematic diagram of the internal structure of a terminal in an embodiment. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0045] It is understood that the terms "first," "second," etc., used herein may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first directory may be referred to as a second directory, and similarly, a second directory may be referred to as a first directory, without departing from the scope of this application. The first directory and the second directory are both directories, but they are not the same directory.

[0046] refer to Figure 1 , Figure 1 FIG. 1 is a flow chart of a positioning method in an embodiment. This embodiment uses the method applied to a terminal as an example. In one embodiment, Figure 1 As shown, the positioning method includes steps 110 to 130.

[0047] Step 110: Before starting the positioning function, create a first directory.

[0048] The first directory created is used to store the ephemeris data that the terminal searches for during positioning. Ephemeris data, also known as an ephemeris table, refers to a table of celestial orbital parameters, specifically a list of data describing the predicted locations of celestial bodies or satellites at regular intervals. Typically, the first directory is created in the terminal's file system partition (EFS partition).

[0049] In this step, the first directory is created before the terminal starts the positioning function so that the ephemeris data obtained during the positioning process can be stored normally.

[0050] Step 120: Acquire the ephemeris data searched by the terminal during the positioning process, and store the ephemeris data in the first directory.

[0051] In this step, the ephemeris data searched by the terminal during the positioning process is stored in a first directory so that the terminal can retrieve the ephemeris data from the first directory when hot-starting the positioning function. Generally, the terminal only needs to search for ephemeris data when cold-starting the positioning function. A cold start refers to the process of initiating the positioning function in an unfamiliar environment, from which the terminal communicates with surrounding satellites and calculates its position. Cold-starting the positioning function takes the longest time. For example, when GPS is cold-started, it clears all historical information and restarts. It then attempts to locate and lock onto satellites, which takes a long time due to the lack of previous information. GPS uses a method similar to polling to lock onto signals from all satellites, which is significantly slower than knowing which satellites to search in advance. For example, the following situations are considered cold starts: initial use; battery depletion resulting in loss of ephemeris data; and movement of more than 1,000 kilometers while the device is powered off.

[0052] It should be noted that if the first directory is created in the file system partition (efs partition) of the terminal, the terminal can find the first directory by traversing all directories in the file system partition, and then store the ephemeris data in the first directory.

[0053] Step 130: When the terminal hot-starts the positioning function, the stored ephemeris data is called from the first directory to perform positioning using the ephemeris data.

[0054] Among them, hot start means that the terminal has not been moved too much at the place where it was last turned off, and the interval from the last positioning time is short. The terminal saves the ephemeris data searched during the last positioning. During hot start, the terminal calculates the terminal's position information based on the saved ephemeris data searched during the last positioning. Since the time of re-searching the ephemeris data is saved, the time for hot start positioning function is generally short.

[0055] In this step, when the terminal hot-starts the positioning function, the stored ephemeris data is called from the first directory, so that positioning is performed using the stored ephemeris data, and the positioning time is shorter.

[0056] Specifically, in the prior art, there are some situations in which the terminal's positioning time during hot-start positioning is too long, almost the same as the positioning time of the cold-start positioning function. The reason for these situations is that the directory for storing the ephemeris data is created when the terminal's application starts the positioning function, that is, the application searches for the ephemeris data by calling the positioning function, and then starts to create the directory for storing the ephemeris data. However, due to access rights and other reasons, the application cannot create a directory for storing the ephemeris data, so the ephemeris data cannot be stored. Therefore, even when the terminal hot-starts the positioning function, it is necessary to search for the ephemeris data again. Since it takes a certain amount of time to re-acquire the ephemeris data, it is equivalent to increasing the time for re-searching the ephemeris data when the positioning function is hot-started, resulting in the problem that the terminal's positioning time is too long when the positioning function is hot-started.

[0057] For example, this embodiment provides some experimental data to show the start-up time of the positioning function after adopting the solution of this embodiment and the start-up time of the positioning function of the prior art, so as to provide a comparative explanation.

[0058] This program Existing technology Cold start positioning time (ms) 16791 16631 Hot start positioning time (ms) 4150 16602

[0059] It can be seen from experimental data that after adopting this solution, the positioning time of the hot start positioning function is reduced compared with the existing technology.

[0060] The technical solution of this embodiment is to create a first directory for storing ephemeris data before the terminal starts the positioning function, so that the ephemeris data is stored in the created first directory, so that the terminal can normally call the ephemeris data stored in the first directory when the positioning function is hot-started, and thus perform positioning through the ephemeris data. Since the first directory has been created before the terminal starts the positioning function, the first directory must exist when the terminal hot-starts the positioning function, thereby ensuring that the ephemeris data searched by the terminal can be saved, and further ensuring that the terminal can call the pre-stored ephemeris data when the positioning function is hot-started, so there is no need to re-search the ephemeris data, which reduces the time spent on re-searching the ephemeris data when the positioning function is hot-started, and achieves the reduction of the positioning time when the terminal hot-starts the positioning function.

[0061] It should be noted that before starting the positioning function, the creation of the first directory can be completed during the terminal startup process. During the terminal startup process, various instructions or functions need to be called to complete the startup. Therefore, by adjusting some terminal startup instructions or functions, the terminal can be triggered to create the first directory during the terminal startup process, so that the first directory is already created after the startup is completed.

[0062] Optionally, if the creation of the first directory is completed during the process of starting the terminal, the terminal of this embodiment may be a terminal in an initialization state. In a possible implementation, the terminal may be flashed to put the terminal in an initialization state.

[0063] The following embodiment describes how to create a first directory based on any of the above embodiments.

[0064] refer to Figure 2 , Figure 2 FIG. 1 is a detailed flow chart of step 110 in one embodiment. In this embodiment, the creation of the first directory is completed during the process of starting the terminal. In one embodiment, as Figure 2 As shown, creating a first directory includes steps 210 to 220.

[0065] Step 210: Create a second directory.

[0066] The second directory is used to trigger the creation of the first directory. Optionally, the second directory is a directory that will inevitably be successfully created during the terminal startup process.

[0067] Step 220: When the second directory is created, create the first directory.

[0068] In this step, when the second directory is created, the second directory is used to trigger the creation of the first directory. It should be noted that directory creation completion only indicates that the directory creation is completed, but the result of the creation may be success or failure.

[0069] Specifically, since the second directory will inevitably be successfully created during the terminal startup process, the first directory can be created after the second directory is created. This is equivalent to completing the creation of the first directory during the startup process. Therefore, the first directory already exists after the terminal completes the startup.

[0070] The technical solution of this embodiment is to create a second directory during the boot process and create a first directory after the second directory is created. Since the second directory is a directory that will inevitably be successfully created during the boot process of the terminal, the first directory can be created after the second directory is created. In this way, the first directory can be created in a piggyback manner. It is only necessary to configure the process code for triggering the creation of the first directory through the second directory, which simplifies the complexity of creating the first directory.

[0071] It should be noted that the first directory can be the last directory that the application cannot create, or a subdirectory of the last directory, which is not limited here. It is understandable that the last directory for storing ephemeris data can also be directly created, that is, the first directory is the last directory for storing ephemeris data.

[0072] Generally, in order to improve the ease of creating the first directory during the startup process of the terminal, the first directory is set to the last-level directory that the application cannot create. During the startup process of the terminal, it is only necessary to create the last-level directory that the application cannot create. The remaining directories can continue to be created when the application calls the terminal's positioning function.

[0073] For example, ephemeris data is typically stored in a PE directory, which is also a GNSS directory. The GNSS directory is one of the root directories of the file system partition. Research has found that applications cannot create a GNSS directory within a file system partition. Even if a GNSS directory exists within the file system partition, applications still cannot create a PE directory within the GNSS directory. Therefore, the PE directory can be created directly, allowing the terminal to store ephemeris data retrieved during positioning directly in the PE directory.

[0074] refer to Figure 3 , Figure 3 FIG. 2 is a detailed flowchart of step 220 in one embodiment. In one embodiment, the first directory is a PE directory, and creating the first directory includes steps 310 to 320.

[0075] Step 310: Create a GNSS directory.

[0076] In this step, a root directory of the PE directory, ie, the GNSS directory, is first created in the file system partition, thereby creating a PE directory under the GNSS directory.

[0077] Step 320: When the GNSS directory is created, create the PE directory, which is a subdirectory of the GNSS directory.

[0078] In this step, a GNSS directory is first created, and then a PE directory for storing ephemeris data is created under the GNSS directory.

[0079] It is understood that if the PE directory is the last level of directory storage for ephemeris data, the terminal can directly store the ephemeris data after searching for it, without having to create further directories, thus increasing the likelihood that the ephemeris data will be properly stored. If the PE directory is the last level of directory creation that the application cannot create, the remaining directories can be created when the application calls the terminal's positioning function, simplifying the directory creation process during the terminal startup process and improving startup efficiency.

[0080] It should be noted that although the first directory is created after the second directory is created, analysis shows that not all directories can be piggybacked on by the first directory. Therefore, it is necessary to identify the directories that the first directory can piggyback on in order to successfully create the first directory.

[0081] For example, during the terminal startup process, the SUPL directory, client-cert directory, client-key directory, and cert directory are generally created. However, research has found that even after the SUPL directory is created, creating the first directory may still fail. For example, in ten experiments, the first directory may fail to create properly several times. Similarly, creating the first directory after the client-cert directory and after the client-key directory may also fail. Research has found that creating the first directory after the cert directory has a higher probability of success. Therefore, the cert directory is used as a piggyback on the first directory to ensure a higher success rate in creating the first directory.

[0082] refer to Figure 4 , Figure 4 FIG. 2 is a detailed flowchart of step 210 in one embodiment. In one embodiment, the second directory is a cert directory, and creating the second directory includes steps 410 to 440.

[0083] Step 410: Create a SUPL directory.

[0084] Step 420: When the SUPL directory is created, create a client-cert directory.

[0085] Step 430: After the client-cert directory is created, create a client-key directory.

[0086] Step 440: When the client-key directory is created, create the cert directory, and when the cert directory is created, create the first directory.

[0087] The technical solution of this embodiment uses the cert directory as the second directory, and the cert directory is the directory with the highest success rate in triggering the creation of the first directory. Therefore, the corresponding success rate of creating the first directory is high, thereby improving the success rate of creating the first directory.

[0088] refer to Figure 5 , Figure 5The detailed flow chart of creating the first directory in one embodiment is as follows. In one embodiment, the first directory is a PE directory, the second directory is a cert directory, and creating the first directory includes steps 510 to 560.

[0089] Step 510: Create a SUPL directory.

[0090] Step 520: When the SUPL directory is created, create a client-cert directory.

[0091] Step 530: After the client-cert directory is created, create a client-key directory.

[0092] Step 540: When the client-key directory is created, create the cert directory.

[0093] Step 550: When the cert directory is created, create a GNSS directory.

[0094] Step 560: When the GNSS directory is created, create the PE directory, which is a subdirectory of the GNSS directory.

[0095] Any step of this embodiment can refer to the description of any of the above embodiments, and will not be described in detail in this embodiment.

[0096] It should be noted that in this embodiment, after the terminal is powered on, viewing the file system partition through EFS Explorer in QPST reveals the presence of a GNSS directory within the file system partition, and a PE directory within the GNSS directory. After positioning is complete through the terminal, viewing the file system partition again through EFS Explorer in QPST reveals that ephemeris data is already stored within the PE directory, demonstrating that this solution's method of creating the PE directory is effective, thereby improving the positioning time of the hot-start positioning function.

[0097] It is understandable that the first directory in this embodiment is the PE directory. If the PE directory is the last-level directory for storing ephemeris data, the terminal will directly store the ephemeris data when searching for it, without having to create a new directory. This increases the likelihood of normal storage of the ephemeris data. If the PE directory is the last-level directory that the application cannot create, the remaining directories can be created when the application calls the terminal's positioning function. This simplifies the process of creating directories during the terminal's startup process and improves startup efficiency. In addition, this embodiment uses the cert directory as the second directory, and the cert directory is the directory with the highest success rate for triggering the creation of the first directory. Therefore, the corresponding first directory creation success rate is higher, which also increases the success rate of the first directory creation.

[0098] It can be understood that the first directory of the embodiment is the PE directory, and the second directory is the cert directory. Referring to the description of any of the above embodiments, this embodiment has the beneficial effects of the above embodiments.

[0099] In one possible implementation, creating the first directory includes:

[0100] Call the directory creation function;

[0101] The first directory is created by the directory creation function.

[0102] Among them, the directory creation function refers to a function used to create a directory. In this embodiment, the directory creation function is configured with a first creation instruction for creating the first directory. Then, during the terminal startup process, when the directory creation function is called, the first directory can be created by the first creation instruction configured by the directory creation function. Optionally, the directory creation function of this embodiment is the mkdir function. The function of the mkdir function is to create a directory. The usage of the mkdir function is: int mkdir(const char*dirname). Specifically, the function prototype of the mkdir function is: int mkdir(const char*pathname, mode_t mode); it is interpreted as creating a directory named by the parameter pathname in mode, and mode defines the permissions of the newly created directory.

[0103] In this embodiment, the directory creation function can be transplanted into the terminal, so that the terminal can create the first directory through the directory creation function. It should be noted that the directory creation function can be transplanted into the terminal by flashing the terminal.

[0104] The technical solution of this embodiment creates the first directory through a directory creation function. For a terminal in an initialized state, the directory creation function is called during the boot process, which is equivalent to utilizing the terminal's boot mechanism. The creation of the first directory can be completed without making too many changes to the terminal's boot process, thereby simplifying the first directory creation process. At the same time, since the terminal's boot process is slightly modified, the success rate of the terminal's normal boot can be guaranteed.

[0105] In one possible implementation, creating the second directory includes:

[0106] Calling the directory creation function;

[0107] The second directory is created by the directory creation function.

[0108] The directory creation function is further configured with a second creation instruction for creating the second directory, and the second creation instruction is configured before the first creation instruction. Therefore, during the boot process, when the terminal calls the directory creation function, it can first create the second directory using the second creation instruction configured by the directory creation function, and then create the first directory using the first creation instruction configured by the directory creation function.

[0109] The technical solution of this embodiment creates the second directory and the first directory respectively through the same directory creation function, which reduces the mapping process between different functions, makes the creation of the second directory and the first directory more continuous, and also shortens the creation time of the first directory.

[0110] In one possible implementation, the positioning method in any of the above embodiments further includes:

[0111] When the first directory is created, searching for the first directory from the terminal;

[0112] In response to the result that the first directory search fails, a prompt is given that the first directory creation fails.

[0113] In this embodiment, after the first directory is created, the terminal searches for the first directory. If the search is successful, the terminal can normally hot-start the positioning function. If the terminal cannot find the first directory, that is, if the search fails, a prompt indicating that the first directory creation failed is displayed. It should be noted that if the first directory is created during the startup process, the terminal searches for the first directory after the startup is complete.

[0114] It can be understood that by spontaneously detecting whether the first directory exists in the terminal after the first directory is created, and prompting that the first directory creation failed if it does not exist, it is possible to promptly determine whether the first directory is created normally, avoiding the time-consuming problem of subsequent manual search for the first directory, and improving the efficiency of checking whether the first directory is created normally.

[0115] It should be understood that although Figure 1-5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1-5 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0116] refer to Figure 6 , Figure 6 FIG. 1 is a structural block diagram of a positioning method in an embodiment. This embodiment is described by taking the application of the device to a terminal as an example. In one embodiment, Figure 6 As shown, the positioning device includes a directory creation module 610, a storage module 620 and a positioning module 630, wherein:

[0117] The directory creation module 610 is used to create a first directory before starting the positioning function. The created first directory is used to store the ephemeris data searched by the terminal during the positioning process; the storage module 620 is used to obtain the ephemeris data searched by the terminal during the positioning process and store the ephemeris data in the first directory; the positioning module 630 is used to call the stored ephemeris data from the first directory when the terminal hot-starts the positioning function, so as to perform positioning through the ephemeris data.

[0118] In one embodiment, the directory creation module 610 includes a first creation unit and a second creation unit, wherein: the first creation unit is used to create a second directory, and the second directory is used to trigger the creation of the first directory; the second creation unit is used to create the first directory when the creation of the second directory is completed.

[0119] In one embodiment, the first directory is a PE directory, and the second creation unit is specifically used to create a GNSS directory; when the GNSS directory is created, the PE directory is created, and the PE directory is a subdirectory of the GNSS directory.

[0120] In one embodiment, the second directory is a cert directory, and the first creation unit is specifically configured to create a SUPL directory; upon completion of the SUPL directory creation, create a client-cert directory; upon completion of the client-cert directory creation, create a client-key directory; upon completion of the client-key directory creation, create the cert directory, and create the first directory upon completion of the cert directory creation.

[0121] In one embodiment, the second creation unit is specifically configured to call a directory creation function, where the directory creation function is configured with a first creation instruction for creating the first directory; and the first directory is created through the directory creation function.

[0122] In one embodiment, the first creation unit is specifically used to call the directory creation function, and the directory creation function is also configured with a second creation instruction for creating the second directory, and the second creation instruction is configured before the first creation instruction; the second directory is created through the directory creation function.

[0123] In one embodiment, the device further includes a search module and a prompt module, wherein: the search module is used to search for the first directory from the terminal when the first directory is created; the prompt module is used to prompt that the first directory creation fails in response to the result of failure in searching the first directory.

[0124] The division of the modules in the above positioning device is only for illustration. In other embodiments, the positioning device may be divided into different modules as needed to complete all or part of the functions of the above positioning device.

[0125] The specific definition of the positioning device can be found in the definition of the positioning method above and will not be repeated here. Each module in the positioning device described above can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the modules described above can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0126] Figure 7 FIG. 1 is a schematic diagram of the internal structure of a terminal in one embodiment. Figure 7As shown, the terminal includes a processor and a memory connected via a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire terminal. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement a positioning method provided in each of the following embodiments. The internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium. The terminal can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, etc.

[0127] The various modules in the positioning device provided in the embodiments of the present application may be implemented in the form of a computer program. The computer program may be executed on a terminal or server. The program modules comprising the computer program may be stored in a memory of the terminal. When the computer program is executed by a processor, the steps of the method described in the embodiments of the present application are implemented.

[0128] The present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, cause the processors to perform the steps of the positioning method.

[0129] A computer program product comprising instructions which, when executed on a computer, cause the computer to perform a positioning method.

[0130] As used herein, any reference to memory, storage, database, or other medium may include nonvolatile and / or volatile memory. Nonvolatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).

[0131] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A positioning method, characterized in that: Applied to a terminal, the method includes: When the terminal is in an initialization state and before starting the positioning function, create a second directory, where the second directory is used to trigger the creation of the first directory; the initialization state of the terminal is achieved by flashing the terminal; When the second directory is created, the first directory is created, where the created first directory is used to store the ephemeris data searched by the terminal during the positioning process; Acquire the ephemeris data searched by the terminal during the positioning process, and store the ephemeris data in the first directory; When the terminal hot-starts the positioning function, the stored ephemeris data is called from the first directory to perform positioning using the ephemeris data.

2. The method according to claim 1, characterized in that The first directory is a PE directory, and the creating of the first directory includes: Create a GNSS catalog; When the GNSS directory is created, the PE directory is created. The PE directory is a subdirectory of the GNSS directory.

3. The method according to claim 1, characterized in that The second directory is a cert directory, and creating the second directory includes: Create a SUPL directory; When the SUPL directory is created, create a client-cert directory; After the client-cert directory is created, create the client-key directory. When the client-key directory is created, the cert directory is created, and when the cert directory is created, the first directory is created.

4. The method according to claim 1, wherein The creating of the first directory includes: calling a directory creation function, wherein the directory creation function is configured with a first creation instruction for creating the first directory; The first directory is created by the directory creation function.

5. The method according to claim 4, characterized in that The step of creating the second directory includes: Calling the directory creation function, wherein the directory creation function is further configured with a second creation instruction for creating the second directory, the second creation instruction being configured before the first creation instruction; The second directory is created by the directory creation function.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the first directory is created, searching for the first directory from the terminal; In response to the result that the first directory search fails, a prompt is given that the first directory creation fails.

7. A positioning device, characterized in that: Applied to a terminal, the device includes: a directory creation module, configured to create a second directory when the terminal is in an initialization state and before starting a positioning function, the second directory being used to trigger the creation of the first directory; the terminal being in the initialization state being achieved by flashing the terminal; and after the second directory is created, creating the first directory, the created first directory being used to store ephemeris data searched by the terminal during the positioning process; A storage module, configured to obtain the ephemeris data searched by the terminal during positioning, and store the ephemeris data in the first directory; The positioning module is configured to call the stored ephemeris data from the first directory when the terminal hot-starts the positioning function, so as to perform positioning using the ephemeris data.

8. The positioning device according to claim 7, characterized in that The directory creation module includes a first creation unit and a second creation unit, the first directory is a PE directory, and the second creation unit is specifically used to create a GNSS directory; When the GNSS directory is created, the PE directory is created. The PE directory is a subdirectory of the GNSS directory.

9. A terminal comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Terminal positioning method and device

    CN109270559A