Control method and apparatus for global navigation satellite system receiver

CN117289308BActive Publication Date: 2026-10-27BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210693484.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2026-10-27
Estimated Expiration
2042-06-17

AI Technical Summary

Technical Problem

[0003]但是,在卫星定位过程中,由于电子设备的全球导航卫星系统接收器持续工作,导致电子设备的功耗大的问题

Benefits of technology

[0092]本公开的实施例提供的技术方案可以包括以下有益效果:在接收到电子设备中应用程序发起的卫星定位请求,将全球导航卫星系统接收器的状态从关闭状态变更为管控状态,通过确定网络定位信息返回状态和/或应用程序的定位需求,根据网络定位信息返回状态和/或定位需求,对全球导航卫星系统接收器进行控制。这样,在电子设备进行卫星定位过程中,可以对全球导航卫星系统接收器的运行进行管控,以避免电子设备滥用全球导航卫星定位接收器资源的问题,从而可以降低卫星定位过程中的功耗。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117289308B_ABST
    Figure CN117289308B_ABST
Patent Text Reader

Abstract

The present disclosure provides a control method and device of a global navigation satellite system receiver, and relates to the technical field of satellite positioning. The method comprises: in response to receiving a satellite positioning request initiated by an application program in an electronic device, changing the state of the global navigation satellite system receiver from a closed state to a controlled state; determining a network positioning information return state and / or a positioning requirement of the application program; and controlling the global navigation satellite system receiver according to the network positioning information return state and / or the positioning requirement. The present scheme can control the operation of the global navigation satellite system receiver during the satellite positioning process of the electronic device, so as to avoid the problem of abuse of global navigation satellite positioning receiver resources by the electronic device, thereby reducing the power consumption in the satellite positioning process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of terminal equipment technology, and more particularly to the field of satellite positioning technology, specifically to a control method and apparatus for a global navigation satellite system receiver. Background Technology

[0002] In the positioning technology of electronic devices, there are two main positioning methods: network positioning and satellite positioning. Network positioning achieves the positioning operation of the terminal device by obtaining information from surrounding base stations and Wi-Fi (wireless communication technology), while satellite positioning works by turning on the terminal device's Global Navigation Satellite System receiver to search for satellite signals in space and calculate the position based on the satellite signal analysis.

[0003] However, during satellite positioning, the continuous operation of the electronic device's Global Navigation Satellite System receiver leads to high power consumption. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this disclosure provides a control method and apparatus for a global navigation satellite system receiver.

[0005] According to a first aspect of the present disclosure, a control method for a global navigation satellite system receiver is provided, comprising:

[0006] In response to receiving a satellite positioning request initiated by an application in an electronic device, the state of the global navigation satellite system receiver is changed from the off state to the controlled state;

[0007] Determine the network location information return status and / or the location requirements of the application;

[0008] The Global Navigation Satellite System receiver is controlled based on the status returned by the network positioning information and / or the positioning requirements.

[0009] In some embodiments of this disclosure, determining the network location information return status includes:

[0010] Determine whether the application simultaneously initiated a first network location request;

[0011] In response to the application simultaneously initiating the first network location request, the request result of the first network location request is monitored;

[0012] Alternatively, in response to the application not simultaneously initiating the first network location request, a second network location request is initiated to the network location module, and the request result of the second network location request is monitored;

[0013] The return status of the network location information is determined based on the request result of the first network location request or the request result of the second network location request.

[0014] As one possible implementation, determining whether the application simultaneously initiated a first network location request includes:

[0015] The identification information of the satellite positioning request and the identification information of the application are combined into a first information pair and recorded at the first target location;

[0016] In response to receiving a first network location request initiated by the application, the identification information of the first network location request and the identification information of the application are combined into a second information pair and recorded at the second target location;

[0017] Start a first timer, and when the first timer expires, determine whether the identification information of the satellite positioning request exists in the first target location;

[0018] In response to the presence of the identification information for the satellite positioning request in the first target location, determine whether the identification information for the application exists in the second target location;

[0019] In response to the presence of the application's identification information in the second target location, it is determined that the application simultaneously initiated a first network location request;

[0020] In response to the absence of the application's identification information at the second target location, it is determined that the application did not simultaneously initiate the first network location request.

[0021] In some embodiments of this disclosure, the method further includes:

[0022] In response to receiving a request to remove satellite positioning from the application, the identifier information of the request to remove satellite positioning is determined based on the request.

[0023] Based on the identifier information of the satellite positioning request to be removed, the first information pair corresponding to the satellite positioning request to be removed is deleted from the first target location;

[0024] In response to receiving a request to remove network location sent by the application, the identifier information of the network location request to be removed is determined according to the request.

[0025] Based on the identifier information of the network location request to be removed, the second information pair corresponding to the network location request to be removed is deleted from the second target location.

[0026] As one possible implementation, monitoring the result of the first network location request includes:

[0027] Determine the request time corresponding to the first network location request;

[0028] Start a second timer, and when the second timer expires, determine the return time of the latest returned network location information;

[0029] If the return time is less than or equal to the request time, the request result of the first network location request is determined to be a failure.

[0030] In some embodiments of this disclosure, determining the network location information return status based on the request result of the first network location request or the request result of the second network location request includes:

[0031] In response to the failure of either the first network location request or the second network location request, the network location information is determined to return a failure status.

[0032] In some other embodiments of this disclosure, after determining that the request result of the first network location request has failed, the method further includes:

[0033] Delete the second information pair corresponding to the first network location request from the second target location.

[0034] In some embodiments of this disclosure, the method further includes:

[0035] In response to the network positioning information returned by the network positioning module, determine whether the status of the global navigation satellite system receiver is enabled;

[0036] In response to the global navigation satellite system receiver being in an off state, the identification information of all target applications present at the first target location is obtained;

[0037] Based on the identification information of the target application, the network location information is returned to each target application respectively, and the running second timer is turned off.

[0038] The step of controlling the Global Navigation Satellite System receiver based on the returned status of the network positioning information and / or the positioning requirement includes:

[0039] In response to the network positioning information returning a failure status, the status of the Global Navigation Satellite System receiver is changed from controlled status to enabled status.

[0040] In some embodiments of this disclosure, determining the location requirements of the application includes:

[0041] Start a third timer, and when the third timer expires, determine whether the status of the global navigation satellite system receiver is in a controlled state;

[0042] In response to the global navigation satellite system receiver being in a controlled state, the positioning requirement is determined to be a continuous positioning requirement.

[0043] The step of controlling the Global Navigation Satellite System receiver based on the returned status of the network positioning information and / or the positioning requirement includes:

[0044] In response to the positioning requirement being a continuous positioning requirement, the status of the Global Navigation Satellite System receiver is changed from controlled status to enabled status.

[0045] In other embodiments of this disclosure, the method further includes:

[0046] In response to the deletion of the first information pairs in the first target location, the state of the Global Navigation Satellite System receiver is changed to the off state.

[0047] According to a second aspect of this application, a control device for a global navigation satellite system receiver is provided, comprising:

[0048] The state change module is used to change the state of the Global Navigation Satellite System receiver from the off state to the controlled state in response to receiving a satellite positioning request initiated by an application in the electronic device;

[0049] A determination module is used to determine the network location information return status and / or the location requirements of the application.

[0050] The control module is used to control the Global Navigation Satellite System receiver based on the status returned by the network positioning information and / or the positioning requirements.

[0051] In some embodiments of this disclosure, the determining module is specifically used for:

[0052] Determine whether the application simultaneously initiated a first network location request;

[0053] In response to the application simultaneously initiating the first network location request, the request result of the first network location request is monitored;

[0054] Alternatively, in response to the application not simultaneously initiating the first network location request, a second network location request is initiated to the network location module, and the request result of the second network location request is monitored;

[0055] The return status of the network location information is determined based on the request result of the first network location request or the request result of the second network location request.

[0056] As one possible implementation, the determining module is specifically used for:

[0057] The identification information of the satellite positioning request and the identification information of the application are combined into a first information pair and recorded at the first target location;

[0058] In response to receiving a first network location request initiated by the application, the identification information of the first network location request and the identification information of the application are combined into a second information pair and recorded at the second target location;

[0059] Start a first timer, and when the first timer expires, determine whether the identification information of the satellite positioning request exists in the first target location;

[0060] In response to the presence of the identification information for the satellite positioning request in the first target location, determine whether the identification information for the application exists in the second target location;

[0061] In response to the presence of the application's identification information in the second target location, it is determined that the application simultaneously initiated a first network location request;

[0062] In response to the absence of the application's identification information at the second target location, it is determined that the application did not simultaneously initiate the first network location request.

[0063] In some embodiments of this disclosure, the determining module is further configured to:

[0064] In response to receiving a request to remove satellite positioning from the application, the identifier information of the request to remove satellite positioning is determined based on the request.

[0065] Based on the identifier information of the satellite positioning request to be removed, the first information pair corresponding to the satellite positioning request to be removed is deleted from the first target location;

[0066] In response to receiving a request to remove network location sent by the application, the identifier information of the network location request to be removed is determined according to the request.

[0067] Based on the identifier information of the network location request to be removed, the second information pair corresponding to the network location request to be removed is deleted from the second target location.

[0068] In some embodiments of this disclosure, the determining module is further configured to:

[0069] Determine the request time corresponding to the first network location request;

[0070] Start a second timer, and when the second timer expires, determine the return time of the latest returned network location information;

[0071] If the return time is less than or equal to the request time, the request result of the first network location request is determined to be a failure.

[0072] In some embodiments of this disclosure, the determining module is further configured to:

[0073] In response to the failure of either the first network location request or the second network location request, the network location information is determined to return a failure status.

[0074] In other embodiments of this disclosure, the determining module is further configured to:

[0075] After determining that the request result of the first network location request is failed, the second information pair corresponding to the first network location request is deleted from the second target location.

[0076] In some further embodiments of this disclosure, the determining module is further configured to:

[0077] In response to the network positioning information returned by the network positioning module, determine whether the status of the global navigation satellite system receiver is enabled;

[0078] In response to the global navigation satellite system receiver being in an off state, the identification information of all target applications present at the first target location is obtained;

[0079] Based on the identification information of the target application, the network location information is returned to each target application respectively, and the running second timer is turned off.

[0080] Specifically, the control module is used for:

[0081] In response to the network positioning information returning a failure status, the status of the Global Navigation Satellite System receiver is changed from controlled status to enabled status.

[0082] As one possible implementation, the determining module is further configured to:

[0083] Start a third timer, and when the third timer expires, determine whether the status of the global navigation satellite system receiver is in a controlled state;

[0084] In response to the global navigation satellite system receiver being in a controlled state, the positioning requirement is determined to be a continuous positioning requirement.

[0085] The control module is further used for:

[0086] In response to the positioning requirement being a continuous positioning requirement, the status of the Global Navigation Satellite System receiver is changed from controlled status to enabled status.

[0087] In some embodiments of this disclosure, the apparatus further includes:

[0088] The shutdown module is used to change the state of the Global Navigation Satellite System receiver to a shutdown state in response to the deletion of the first information pairs in the first target location.

[0089] According to a third aspect of this disclosure, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the method described in the first aspect above.

[0090] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.

[0091] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in the first aspect above.

[0092] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: upon receiving a satellite positioning request initiated by an application in an electronic device, the state of the Global Navigation Satellite System (GNSS) receiver is changed from a closed state to a controlled state. By determining the network positioning information return status and / or the application's positioning needs, the GNSS receiver is controlled according to the network positioning information return status and / or positioning needs. In this way, the operation of the GNSS receiver can be controlled during the satellite positioning process of the electronic device, thereby avoiding the problem of the electronic device abusing the GNSS receiver resources and reducing power consumption during satellite positioning.

[0093] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0094] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0095] Figure 1 This is a flowchart illustrating a control method for a global navigation satellite system receiver according to an exemplary embodiment;

[0096] Figure 2 This is a flowchart illustrating another control method for a global navigation satellite system receiver according to an exemplary embodiment;

[0097] Figure 3 This is a flowchart illustrating yet another control method for a global navigation satellite system receiver according to an exemplary embodiment;

[0098] Figure 4 This is a flowchart illustrating yet another control method for a global navigation satellite system receiver according to an exemplary embodiment;

[0099] Figure 5 This is a structural block diagram of a control device for a global navigation satellite system receiver according to an exemplary embodiment;

[0100] Figure 6 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0101] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0102] It should be noted that there are two main positioning methods in terminal device positioning technology: network positioning and satellite positioning. Network positioning achieves the positioning operation of the terminal device by obtaining information from surrounding base stations and Wi-Fi information, while satellite positioning works by turning on the terminal device's Global Navigation Satellite System receiver to search for satellite signals in space and calculate the position based on the satellite signal analysis.

[0103] Next, we will explain the principles, power consumption, positioning accuracy, positioning speed and timeliness of network positioning and satellite positioning. Among them, (1) Satellite positioning: The positioning source is a satellite in space. A high-precision position is calculated by the position of the satellite and the pseudorange between the satellite and the user. The power consumption is the highest under this positioning scheme. If the device successfully obtains satellite positioning, the accuracy of this position is the highest, and the accuracy can reach within 10 meters. In terms of positioning speed, if there is ephemeris data in an open outdoor environment, satellite positioning can be obtained in 2 to 3 seconds. If there is ephemeris data in a partially obscured outdoor environment, satellite positioning can be guaranteed within 10 seconds. Indoors, due to environmental problems, the device cannot search for satellite signals and therefore cannot obtain satellite positioning. In terms of timeliness, after the Global Navigation Satellite System receiver calculates the position, it generally reports the satellite position once every second, which can reflect the user's current latest position; (2) Network positioning: The positioning source is a nearby router and base station. The scanning WIFI identification information and base station identification information are used as parameters and uploaded to the server database for traversal and parsing to calculate a second-highest precision position. This positioning scheme consumes very little power; the main power consumption comes from the minor overhead during network communication. If the device scans for many Wi-Fi signals, the network positioning accuracy can be within 40 meters. If there are few or no Wi-Fi signals, and the device is close to a base station signal, the network positioning accuracy can reach 1000 to 2000 meters, and accuracy cannot be guaranteed. Regarding positioning speed, the time spent scanning Wi-Fi and base station signals, uploading data to the server, and waiting for server callback is approximately 1 to 3 seconds to obtain the location. Because the network positioning uses the Wi-Fi and base station signals scanned in the current session, the timeliness is also up-to-date.

[0104] However, during satellite positioning, the continuous operation of the terminal device's Global Navigation Satellite System receiver leads to high power consumption.

[0105] To address the aforementioned problems, this disclosure provides a control method and apparatus for a global navigation satellite system receiver.

[0106] Figure 1 This is a flowchart illustrating a control method for a Global Navigation Satellite System (GNSS) receiver according to an exemplary embodiment. It should be noted that the control method for the GNSS receiver in this embodiment can be applied to the control device for the GNSS receiver in this embodiment, and the control device for the GNSS receiver in this embodiment can be configured in an electronic device. For example... Figure 1 As shown, the control method for a global satellite system receiver according to embodiments of this disclosure can be used in electronic devices, and includes the following steps:

[0107] Step 101: In response to receiving a satellite positioning request initiated by an application in an electronic device, change the state of the Global Navigation Satellite System receiver from the off state to the controlled state.

[0108] In some embodiments of this disclosure, the application refers to an application with positioning functionality, such as a navigation application or a running / fitness application. For example, the application initiates a satellite positioning request after receiving a user's location trigger operation, or the application initiates a satellite positioning request when running a functional module that requires location information.

[0109] Typically, upon receiving a satellite positioning request from an application in an electronic device, the device changes the state of its Global Navigation Satellite System (GNSS) receiver from off to on to obtain satellite positioning information. In the original architecture, the GNSS receiver has two states: off and on. Off represents the GNSS receiver being switched off, while on represents the GNSS receiver being switched on. In some embodiments of this disclosure, based on the original architecture, a new state, the control state, is added to the two existing GNSS receiver states. The control state of the GNSS receiver refers to the state where the GNSS receiver should be on, but is actually not.

[0110] In other words, upon receiving a satellite positioning request, instead of immediately turning on the Global Navigation Satellite System (GNSS) receiver, the GNSS receiver's status is changed from off to controlled to avoid unnecessary activation, thereby reducing the power consumption of electronic devices during satellite positioning.

[0111] Step 102: Determine the status of the network location information return.

[0112] In some embodiments of this disclosure, after receiving a satellite positioning request initiated by an application, network positioning information is first obtained by network positioning. The network positioning information return status refers to whether network positioning information can be obtained by network positioning, that is, whether the network positioning module of the electronic device can receive the network positioning information returned by the network positioning provider.

[0113] One possible implementation is to send a network positioning request to the network positioning module after receiving a satellite positioning request initiated by the application, and monitor the result of the network positioning request. If the network positioning module returns network positioning information within a preset time period, the network positioning information is determined to be successful and the network positioning information is returned to the corresponding application. If the network positioning module does not return network positioning information within the preset time period, the network positioning information is determined to be failed.

[0114] As another possible implementation, since the application may have initiated a network positioning request at the same time as initiating a satellite positioning request, it is possible to first determine whether the application has initiated a first network positioning request at the same time. If the application has initiated a first network positioning request at the same time, the request result of the first network positioning request can be monitored to determine the return status of the network positioning information. If the application has not initiated a first network positioning request at the same time, a second network positioning request can be initiated to the network positioning model, and the request result of the second network positioning request can be monitored to determine the return status of the network positioning information.

[0115] Step 103: Based on the status returned by the network positioning information, control the Global Navigation Satellite System receiver.

[0116] It is understandable that if a network location request is initiated but no network location information is received within a certain period of time, it means that the current network location method may not be able to obtain location information. In order to avoid the front end waiting time being too long, the location method can be changed to satellite location. This way, the Global Navigation Satellite System receiver can be turned on only when necessary, and will not be turned on when network location information can be obtained, thereby reducing the power consumption in the satellite location process.

[0117] In some embodiments of this disclosure, if the network location information returns a success status, it indicates that the network location information has been obtained and returned to the electronic device. Therefore, there is no need to run the Global Navigation Satellite System receiver. At this time, after receiving the application's request to remove satellite location and confirming that all applications' satellite location requests have been removed, the status of the Global Navigation Satellite System receiver can be changed from the controlled status to the off status.

[0118] In some other embodiments of this disclosure, if the network positioning information returns a failure status, it means that the network positioning information could not be obtained within a preset time period. The previous method of network positioning may not be able to obtain positioning information. In order to avoid the front end waiting time being too long, the positioning method can be changed to satellite positioning method, that is, the status of the global navigation satellite system receiver is changed from the control state to the on state.

[0119] According to the control method for a Global Navigation Satellite System (GNSS) receiver according to embodiments of this disclosure, upon receiving a satellite positioning request initiated by an application in an electronic device, the state of the GNSS receiver is changed from a closed state to a controlled state. The method then determines the network positioning information return status and controls the GNSS receiver based on this status. This allows for control over the operation of the GNSS receiver during satellite positioning by the electronic device, preventing the abuse of GNSS receiver resources and reducing energy consumption during the positioning process.

[0120] Next, we will provide a detailed introduction to the implementation method of determining the return status of network location information.

[0121] Figure 2 This is a flowchart illustrating another control method for a Global Navigation Satellite System receiver according to an exemplary embodiment. Figure 2 As shown, the method may include the following steps:

[0122] Step 201: In response to receiving a satellite positioning request initiated by an application in an electronic device, the state of the Global Navigation Satellite System receiver is changed from the off state to the controlled state.

[0123] Step 202: Determine whether the application simultaneously initiated the first network location request.

[0124] In some embodiments of this disclosure, determining whether the application simultaneously initiated a first network location request means determining whether the application also initiated a first network location request when it initiated a satellite location request. This eliminates the need for the application to initiate a network location request again after it has already initiated the first one.

[0125] As one possible implementation, step 202 may include the following steps:

[0126] Step 202-1: Combine the identification information of the satellite positioning request and the identification information of the application into a first information pair and record it at the first target location.

[0127] In some embodiments of this disclosure, the input parameters of the satellite positioning request include, but are not limited to, the identification information of the application initiating the request and the identification information of the satellite positioning request. The identification information of the satellite positioning request can be used as the key and the identification information of the application can be used as the value to form a key-value pair. The constructed key-value pair is the first information pair and is recorded at the first target location.

[0128] It should be noted that the first target location can be a pre-set cache area for storing the first information pairs of satellite positioning requests from the application, and the first information pairs corresponding to the satellite positioning requests cached within the first target location can be actively recorded and actively deleted. For example, the first target location can be a Map object, or it can be a file, etc.

[0129] Optionally, in response to receiving a satellite positioning request initiated by an application in the electronic device, a first information pair corresponding to the satellite positioning request of this application is generated, and the first information pair corresponding to the satellite positioning request of this application is recorded in the first target location. In response to receiving a satellite positioning removal request sent by the application, the identification information of the satellite positioning request to be removed is determined according to the satellite positioning removal request; and the first information pair corresponding to the satellite positioning request to be removed is deleted from the first target location according to the identification information of the satellite positioning request to be removed.

[0130] Step 202-2: In response to receiving the first network location request initiated by the application, the identification information of the first network location request and the identification information of the application are combined into a second information pair and recorded at the second target location.

[0131] In other words, when a first network location request is received from an application, the second information corresponding to the first network location request is recorded at the second target location.

[0132] In some embodiments of this disclosure, the identification information of the first network location request can be used as the key, and the identification information of the application can be used as the value to form a key-value pair. The constructed key-value pair is the second information pair, and it is recorded at the second target location.

[0133] It should be noted that the second target location can be a pre-set cache area for storing second information pairs of network location requests from applications, and the second information pairs corresponding to satellite location requests cached within the second target location can be actively recorded and actively deleted. For example, the second target location can be a Map object, or it can be a file, etc.

[0134] Optionally, in response to receiving a network location request initiated by an application in the electronic device, a second information pair corresponding to the network location request of this application is generated, and the second information pair corresponding to the network location request of this application is recorded in the second target location. In response to receiving a remove network location request sent by the application, the identification information of the network location request to be removed is determined according to the remove network location request; and the second information pair corresponding to the network location request to be removed is deleted from the second target location according to the identification information of the network location request to be removed.

[0135] Step 202-3: Start the first timer, and when the first timer expires, determine whether there is a satellite positioning request identifier in the first target location.

[0136] It should be noted that the first timer can be a pre-selected first delay task with a timing function. The first timer timeout refers to the achievement of the first delay value set by the first delay task. The first delay value can be changed according to the actual satellite positioning situation of the application. Since the satellite positioning request and network positioning request initiated by the application are independent of each other, the purpose of setting the first timer is to ensure the time difference between these two types of requests, so as to ensure the accuracy of determining whether the application has initiated the first network positioning request simultaneously.

[0137] In some embodiments of this disclosure, after receiving a satellite positioning request from an application in an electronic device, a first timer can be started, and when the first timer expires, it can be determined whether there is identification information for the satellite positioning request in the first target location. For example, assuming the first delay value of the first delay task is set to 20 milliseconds, after 20 milliseconds have passed since the satellite positioning request initiated by the application was received, it can be determined whether there is identification information for the satellite positioning request in the first target location.

[0138] The method for determining whether the satellite positioning request identifier exists in the first target location can be as follows: determine whether the identifier for this satellite positioning request exists in the first target location. It can be understood that if the identifier for this satellite positioning request does not exist in the first target satellite, it means the application has initiated the removal of the satellite positioning request identifier, i.e., the satellite positioning request has been removed. Therefore, in this case, it can be assumed that the application has received the returned network positioning information, and the network positioning information return status can be considered successful. If the identifier for this satellite positioning request exists in the first target satellite, it means that the satellite positioning request has not yet been removed.

[0139] Step 202-4: In response to the identification information of the satellite positioning request in the first target location, determine whether the identification information of the application exists in the second target location.

[0140] It is understandable that when the first network positioning request initiated by the application is received, the identification information of the first network positioning request and the identification information of the application are combined into a second information pair and recorded at the second target location. Therefore, it can be determined whether the application has initiated the first network positioning request at the same time based on whether the identification information of the application corresponding to the satellite positioning request exists at the second target location.

[0141] In some embodiments of this disclosure, determining whether application identification information exists in the second target location refers to determining whether the application identification information corresponding to the satellite positioning request exists in the second target location, that is, whether the initiated network positioning request contains the same application as the one that initiated this satellite positioning request. The implementation includes: determining the identification information of the target application that initiated the satellite positioning request; traversing the application identification information in all second information pairs in the second target location, comparing the application identification information in each second information pair with the target application identification information; if an identification information in the second information pair is consistent with the target application identification information, then determining whether application identification information exists in the second target location, thus determining that the application simultaneously initiated the first network positioning request; if no identification information in the second information pair is consistent with the target application identification information, then determining whether application identification information does not exist in the second target location, thus determining that the application did not simultaneously initiate the first network positioning request.

[0142] Step 202-5: In response to the presence of application identification information in the second target location, it is determined that the application has simultaneously initiated the first network location request.

[0143] Step 202-6: In response to the absence of application identification information in the second target location, it is determined that the application did not simultaneously initiate the first network location request.

[0144] Step 203: In response to the application simultaneously initiating a first network location request, monitor the request result of the first network location request.

[0145] It is understandable that if the application initiates the first network location request at the same time, there is no need to initiate the network location request again. Instead, the application can directly monitor the result of the first network location request to determine the return status of the network location information.

[0146] In some embodiments of this disclosure, the monitoring of the request result of the first network positioning request can be implemented as follows: obtaining the request time of the first network positioning request; obtaining the return time of the latest returned network positioning information at preset time intervals, and comparing the return time with the request time; if the result of each comparison within the preset time period is that the return time is less than or equal to the request time, then the request result of the first network positioning is determined to be a failure; if the result of a comparison within the preset time period is that the return time is greater than the request time, then the request result of the first network positioning is determined to be a success.

[0147] In other embodiments of this disclosure, monitoring the result of the first network location request can also be implemented using a second timer, including the following steps:

[0148] Step 203-1: Determine the request time corresponding to the first network positioning request.

[0149] Step 203-2: Start the second timer, and when the second timer expires, determine the return time of the latest returned network location information.

[0150] In some embodiments of this disclosure, after receiving a first network location request, a second timer is started, and after the delay time set by the second timer is reached, the return time of the latest returned network location information is determined.

[0151] In one implementation, each time the operating system of an electronic device initiates a network location request, the corresponding request time is recorded in the third target location. After obtaining the returned network location information, the corresponding return time is recorded in the fourth target location. Thus, the request time corresponding to the first network location request can be obtained from the third target location, and the return time of the latest returned network location information can be obtained from the fourth target location. That is, the return time recorded in the fourth target location is the closest to the current time.

[0152] Step 203-3: In response to the return time being less than or equal to the request time, determine that the request result of the first network location request is a failure.

[0153] It's understandable that if the return time is greater than the request time, it means the latest returned network location information was received after the request time of the first network location request, indicating that the first network location request was successful. If the return time is less than or equal to the request time, it means the latest returned network location information is not based on the network location information corresponding to the first network location request, meaning the network location information corresponding to the first network location request was not obtained, and therefore the first network location request failed.

[0154] In some embodiments of this disclosure, since it is determined that the request result of the first network request is a failure, it means that the location information cannot be obtained by the current network positioning method. Therefore, there is no need to continue waiting for the return of the network positioning information. Thus, after it is determined that the request result of the first network positioning request is a failure, the first network positioning request can be automatically removed, that is, the second information pair corresponding to the first network positioning request can be deleted from the second target location.

[0155] Step 204: In response to the application not simultaneously initiating the first network location request, a second network location request is initiated to the network location module, and the request result of the second network location request is monitored.

[0156] In other words, if the application does not initiate the first network location request at the same time, in order to return the application's location information in a timely manner, it needs to initiate a second network location request to the network location module, and determine the return status of the network location information based on the result of the second network location request.

[0157] In some embodiments of this disclosure, the implementation of monitoring the request result of the second network location request can be consistent with that of monitoring the request result of the first network location request. For example, the request time corresponding to the second network location request can be determined; a timer can be started, and the delay duration of the timer is consistent with that of the second timer. When the timer expires, the return time of the latest returned network location information can be determined; in response to the return time being greater than the request time corresponding to the second network location request, the request result of the second network location request can be determined to be successful; in response to the return time being less than or equal to the request time corresponding to the second network location request, the request result of the second network location request can be determined to be unsuccessful.

[0158] In some embodiments of this disclosure, since it is determined that the request result of the second network request is failed, it means that the location information cannot be obtained by the current network positioning method. Therefore, there is no need to continue waiting for the return of the network positioning information. Thus, after it is determined that the request result of the second network positioning request is failed, the second network positioning request can be automatically removed, that is, the second information pair corresponding to the second network positioning request can be deleted from the second target location.

[0159] It should be noted that since electronic devices may contain multiple applications with location functions, any application may initiate a network location request. If the network location module returns network location information during the execution of step 203 or step 204, the network location information will be returned to the application that initiated the network location request. After receiving the network location information, the application will initiate a request to remove the network location. In this case, steps 203 and 204 will no longer be executed, and the network location information return status can be determined to be successful.

[0160] In one implementation, the method may further include: in response to the network positioning module returning network positioning information, determining whether the state of the global navigation satellite system receiver is on; in response to the state of the global navigation satellite system receiver being off, acquiring the identification information of all target applications present in the first target location; and according to the identification information of the target applications, returning the network positioning information to each target application respectively, and turning off the running second timer.

[0161] Step 205: Determine the network location information return status based on the request result of the first network location request or the request result of the second network location request.

[0162] In some embodiments of this disclosure, if the application simultaneously initiates a first network location request, and the request fails, the network location information return status is determined to be failed; if the first network location request succeeds, the network location information return status is determined to be successful. If the application does not simultaneously initiate a first network location request, and the second network location request fails, the network location information return status is determined to be failed; if the second network location request succeeds, the network location information return status is determined to be successful.

[0163] Step 206: Based on the status returned by the network positioning information, control the Global Navigation Satellite System receiver.

[0164] In some embodiments of this disclosure, if the network positioning information returns a failure status, the status of the Global Navigation Satellite System receiver is changed from the controlled status to the enabled status, that is, the Global Navigation Satellite System receiver is turned on to obtain satellite positioning information.

[0165] In some embodiments of this disclosure, the method may further include: changing the state of the Global Navigation Satellite System (GNSS) receiver to a closed state if all the first information pairs in the first target location are deleted. That is, changing the state of the GNSS receiver to a closed state after all satellite positioning requests have been removed.

[0166] According to the control method for a Global Navigation Satellite System (GNSS) receiver according to embodiments of this disclosure, the method determines whether an application simultaneously initiates a first network positioning request. If the application simultaneously initiates a first network positioning request, the method monitors the request result of the first network positioning request. If the application does not simultaneously initiate a first network positioning request, the method initiates a second network positioning request to the network positioning module and monitors the request result of the second network positioning request. Based on the request result of either the first or second network positioning request, the method determines the network positioning information return status to control the GNSS receiver. This avoids repeatedly sending network positioning requests, reducing power consumption during network positioning. Furthermore, by only turning on the GNSS receiver when the network positioning information return status is "failed," the method ensures the receiver is only activated when necessary, preventing the abuse of GNSS receiver resources by electronic devices and further reducing energy consumption during satellite positioning.

[0167] Next, this disclosure proposes another control method for a Global Navigation Satellite System receiver, taking into account the positioning requirements of the application.

[0168] Figure 3This is a flowchart illustrating yet another control method for a Global Navigation Satellite System receiver according to an exemplary embodiment. Figure 3 As shown, the method includes the following steps:

[0169] Step 301: In response to receiving a satellite positioning request initiated by an application in an electronic device, change the state of the Global Navigation Satellite System receiver from the off state to the controlled state.

[0170] In some embodiments of this disclosure, after receiving a satellite positioning request initiated by an application in an electronic device, network positioning information can be obtained through network positioning and returned to the application.

[0171] Step 302: Determine the application's location requirements.

[0172] In some embodiments of this disclosure, positioning requirements may include, but are not limited to, single positioning requirements and continuous positioning requirements. A single positioning requirement refers to an application in an electronic device initiating satellite positioning, where the application completes the satellite positioning operation after obtaining the current location information of the electronic device. A continuous positioning requirement refers to an application in an electronic device initiating satellite positioning, where, after obtaining the current location information of the electronic device, the application still needs to obtain the electronic device's location information multiple times until the satellite positioning request is removed.

[0173] As an example, a single-location requirement can be applied to situations such as measuring the distance between an electronic device and a target point, planning the route between an electronic device and a target point, and determining the location of an electronic device at a certain moment. Specifically, if it is necessary to measure the distance between the location of an electronic device and a target point, a satellite positioning request can be initiated through an application in the electronic device, and the positioning requirement of the application is a single-location requirement. After determining the location information of the electronic device, a path between the location of the electronic device and the target point can be generated based on the street map of the environment in which the electronic device is located, and the distance between the electronic device and the target point can be calculated based on the path.

[0174] As an example, continuous positioning requirements can be applied to measuring the movement trajectory of an electronic device over a certain period of time or calculating the movement data of the electronic device over a certain period of time. This movement data may include, but is not limited to, movement speed, movement distance, and movement route. For instance, when measuring the movement trajectory of an electronic device over a certain period of time, a satellite positioning request can be initiated based on an application within the electronic device, and this application's positioning requirement is continuous positioning. After obtaining the location information of the electronic device at multiple time points, the location information from these multiple time points is sequentially connected in chronological order to obtain the movement trajectory of the electronic device over a certain period of time.

[0175] In some embodiments of this disclosure, the method for determining the location request of an application may include: after receiving a satellite positioning request initiated by an application in an electronic device, recording the identification information of the satellite positioning request in a fifth target location; after a preset time period, determining whether the identification information of the satellite positioning request exists in the fifth target location; if the identification information of the satellite positioning request exists in the fifth target location, determining that the location request of the application is a continuous location request; if the identification information of the satellite positioning request does not exist in the fifth target location, determining that the location request of the application is a single location request.

[0176] In some other embodiments of this disclosure, a third timer can also be used to determine the location requirements of the application, which can be achieved by including the following steps:

[0177] Step 302-1: Start the third timer, and when the third timer expires, determine whether the status of the Global Navigation Satellite System receiver is under control.

[0178] It should be noted that the third timer can be a pre-selected third delay task with timing function. The third timer timeout means that the third delay value set by the third delay task has been reached. The third delay value can be changed according to the actual satellite positioning of the application.

[0179] In some embodiments of this disclosure, a third timer can be started after receiving a satellite positioning request from an application in an electronic device, and the state of the Global Navigation Satellite System receiver can be determined to be in a controlled state when the third timer expires. For example, assuming the third delay value of the third delay task is set to 1 second, the state of the Global Navigation Satellite System receiver can be determined to be in a controlled state 1 second after receiving the satellite positioning request initiated by the application.

[0180] Step 302-2: In response to the Global Navigation Satellite System receiver being in a controlled state, the positioning requirement is determined to be a continuous positioning requirement.

[0181] It's understandable that if an application requires location services only once, it will initiate a request to remove satellite location information after receiving the returned network location data, and the electronic device will then remove the satellite location request. If the application requires continuous location services, it will not initiate a request to remove satellite location information after receiving the returned network location data, so the satellite location request will not be removed and will remain persistent.

[0182] In some embodiments of this disclosure, if the Global Navigation Satellite System receiver is in a controlled state, it indicates that a satellite positioning request still exists. In other words, the satellite positioning request has not been removed, so the application has a continuous positioning requirement.

[0183] Step 303: Control the Global Navigation Satellite System receiver according to positioning requirements.

[0184] Because continuous positioning requires high accuracy, if the positioning requirement is continuous, the status of the Global Navigation Satellite System (GNSS) receiver will be changed from controlled to enabled to obtain satellite positioning information and meet the continuous positioning requirement.

[0185] According to the control method for a Global Navigation Satellite System (GNSS) receiver according to embodiments of this disclosure, upon receiving a satellite positioning request initiated by an application in an electronic device, the state of the GNSS receiver is changed from a closed state to a controlled state, and the GNSS receiver is controlled according to the positioning requirements of the application. This allows the GNSS receiver to operate only for continuous needs, avoiding unnecessary operation and thus reducing power consumption during satellite positioning.

[0186] To illustrate a method for controlling a Global Navigation Satellite System receiver, this disclosure provides yet another embodiment.

[0187] Figure 4 This is a flowchart illustrating yet another control method for a Global Navigation Satellite System receiver according to an exemplary embodiment. Figure 4 As shown, the method includes the following steps:

[0188] Step 401: In response to receiving a satellite positioning request initiated by an application in an electronic device, change the state of the Global Navigation Satellite System receiver from the off state to the controlled state.

[0189] Step 402: Determine the status of the network location information return.

[0190] In this embodiment, the implementation process of step 402 is the same as that of determining the return status of network location information in the above embodiments, and will not be repeated here.

[0191] Step 403: In response to the network location information returning a success status, determine the application's location requirements.

[0192] It's understandable that if the network location information returns a failure status, it means that location information cannot be obtained through network location. To ensure the user experience of the application, it's necessary to turn on the Global Navigation Satellite System (GNSS) receiver to obtain satellite location information. If the network location information returns a success status, it means that network location information can currently be returned to the application through network location. In this case, the application's location requirements can be further determined, and the GNSS receiver can be controlled.

[0193] In some embodiments of this disclosure, the method for determining the location requirements of an application can be consistent with the above embodiments, and will not be repeated here.

[0194] It should be noted that if step 402 is implemented through the first timer and the second timer, and the location request of the application is determined through the third timer, then the first timer, the second timer and the third timer can all be started when a satellite location request is received from the application in the electronic device. The third delay value corresponding to the third timer is greater than the sum of the first delay value corresponding to the first timer and the second delay value corresponding to the second timer. That is, determining the return status of the network location information and determining the location request of the application can be performed simultaneously. If the return status of the network location information is failure, the running third timer can be turned off.

[0195] Step 404: Control the Global Navigation Satellite System receiver based on the status returned by the network positioning information or the positioning requirement.

[0196] In some embodiments of this disclosure, if the network positioning information returns a failure status, the status of the Global Navigation Satellite System (GPS) receiver can be changed from a controlled state to an enabled state. If the positioning requirement is a continuous positioning requirement, the status of the GPS receiver can be changed from a controlled state to an enabled state. If the positioning requirement is a one-time positioning requirement, the status of the GPS receiver may not need to be changed.

[0197] A control method for a global navigation satellite system receiver according to an embodiment of the present disclosure.

[0198] To implement the above embodiments, this disclosure provides a control device for a global navigation satellite system receiver.

[0199] Figure 5 This is a structural block diagram illustrating a control device for a Global Navigation Satellite System receiver according to an exemplary embodiment. Figure 5 As shown, the device includes:

[0200] The state change module 501 is used to change the state of the Global Navigation Satellite System receiver from the off state to the controlled state in response to receiving a satellite positioning request initiated by an application in the electronic device;

[0201] The determination module 502 is used to determine the network location information return status and / or the location requirements of the application;

[0202] The control module 503 is used to control the Global Navigation Satellite System receiver based on the status returned by the network positioning information and / or positioning requirements.

[0203] In some embodiments of this disclosure, the determining module 502 is specifically used for:

[0204] Determine whether the application initiated the first network location request at the same time;

[0205] In response to the application simultaneously initiating a first network location request, monitor the request result of the first network location request;

[0206] Alternatively, in response to the application not simultaneously initiating the first network location request, a second network location request is initiated to the network location module, and the result of the second network location request is monitored;

[0207] The network location information return status is determined based on the request result of the first network location request or the request result of the second network location request.

[0208] As one possible implementation, module 502 is specifically used for:

[0209] The identification information of the satellite positioning request and the identification information of the application are combined into a first information pair and recorded at the first target location;

[0210] In response to receiving a first network location request initiated by the application, the identification information of the first network location request and the identification information of the application are combined into a second information pair and recorded at the second target location;

[0211] Start the first timer, and when the first timer expires, determine whether there is a satellite positioning request identifier in the first target location;

[0212] In response to the identification information indicating the presence of a satellite positioning request at the first target location, determine whether the identification information of the application exists at the second target location;

[0213] In response to the presence of the application's identification information at the second target location, it is determined that the application simultaneously initiated the first network location request;

[0214] In response to the absence of application identification information at the second target location, it is determined that the application did not simultaneously initiate the first network location request.

[0215] In some embodiments of this disclosure, the determining module 502 is further configured to:

[0216] In response to receiving a request to remove satellite positioning from an application, the identifier information of the request to be removed is determined based on the request.

[0217] Based on the identifier information of the satellite positioning request to be removed, the first information pair corresponding to the satellite positioning request to be removed is deleted from the first target location;

[0218] In response to receiving a request to remove network location from an application, the identifier information of the network location request to be removed is determined based on the request.

[0219] Based on the identifier information of the network location request to be removed, the second information pair corresponding to the network location request to be removed is deleted from the second target location.

[0220] In some embodiments of this disclosure, the determining module 502 is further configured to:

[0221] Determine the request time corresponding to the first network location request;

[0222] Start a second timer, and when the second timer expires, determine the return time of the latest returned network location information;

[0223] If the return time is less than or equal to the request time, the result of the first network location request is determined to be a failure.

[0224] In some embodiments of this disclosure, the determining module 502 is further configured to:

[0225] If the first network location request fails or the second network location request fails, the network location information return status is determined to be failed.

[0226] In other embodiments of this disclosure, the determining module 502 is further configured to:

[0227] After determining that the first network location request has failed, the second information pair corresponding to the first network location request is deleted from the second target location.

[0228] In some further embodiments of this disclosure, the determining module 502 is also configured to:

[0229] In response to the network positioning information returned by the network positioning module, determine whether the status of the Global Navigation Satellite System receiver is enabled;

[0230] In response to the Global Navigation Satellite System receiver being in an inactive state, the identification information of all target applications present at the first target location is obtained;

[0231] Based on the identification information of the target application, the network location information is returned to each target application respectively, and the running second timer is turned off.

[0232] Specifically, the control module 503 is used for:

[0233] In response to a failure status returned by the network positioning information, the status of the Global Navigation Satellite System receiver is changed from controlled to enabled.

[0234] As one possible implementation, the determining module 502 is also used for:

[0235] Start the third timer, and when the third timer expires, determine whether the status of the Global Navigation Satellite System receiver is under control.

[0236] The status of the Global Navigation Satellite System receiver is in a controlled state, and the positioning requirement is determined as a continuous positioning requirement.

[0237] The control module 503 is also used for:

[0238] In response to the need for continuous positioning, the status of the Global Navigation Satellite System receiver is changed from controlled to active.

[0239] In some embodiments of this disclosure, the apparatus further includes:

[0240] The shutdown module 504 is used to change the state of the Global Navigation Satellite System receiver to the off state in response to the deletion of the first information pairs in the first target location.

[0241] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0242] According to the control device for a Global Navigation Satellite System (GNSS) receiver according to embodiments of this disclosure, upon receiving a satellite positioning request initiated by an application in an electronic device, the device changes the state of the GNSS receiver from a closed state to a controlled state. By determining the network positioning information return status and / or the application's positioning needs, the device controls the GNSS receiver based on the network positioning information return status and / or the positioning needs. In this way, the operation of the GNSS receiver can be controlled during satellite positioning by the electronic device, preventing the electronic device from abusing the GNSS receiver resources and thereby reducing energy consumption during satellite positioning.

[0243] Figure 6 This is a block diagram illustrating an electronic device 600 for implementing a control method for a Global Navigation Satellite System receiver, according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, computer, digital broadcasting terminal, messaging transceiver, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0244] Reference Figure 6 The electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.

[0245] Processing component 602 typically controls the overall operation of electronic device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.

[0246] Memory 604 is configured to store various types of data to support the operation of device 600. Examples of this data include instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, videos, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0247] Power component 606 provides power to various components of electronic device 600. Power component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600.

[0248] Multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0249] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when electronic device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.

[0250] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0251] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of electronic device 600. For example, sensor assembly 614 may detect the on / off state of device 600, the relative positioning of components such as the display and keypad of electronic device 600, changes in position of electronic device 600 or a component of electronic device 600, the presence or absence of user contact with electronic device 600, orientation or acceleration / deceleration of electronic device 600, and temperature changes of electronic device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0252] Communication component 616 is configured to facilitate wired or wireless communication between electronic device 600 and other devices. Electronic device 600 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0253] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0254] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of an electronic device 600 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0255] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.

[0256] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A control method for a global navigation satellite system receiver, characterized in that, include: In response to receiving a satellite positioning request initiated by an application in an electronic device, the state of the Global Navigation Satellite System receiver is changed from the off state to the controlled state, wherein the controlled state refers to the state in which the Global Navigation Satellite System receiver should be turned on but is actually not turned on; Determine the status of the network location information return; Based on the status returned by the network positioning information, control is performed on the Global Navigation Satellite System receiver, including: In response to the network positioning information returning a success status, and after receiving the application's request to remove satellite positioning and determining that all applications' satellite positioning requests have been removed, the status of the Global Navigation Satellite System receiver is changed from the controlled status to the off status; In response to the network positioning information returning a failure status, the status of the Global Navigation Satellite System receiver is changed from the controlled status to the enabled status; The determination of the network location information return status includes: Determine whether the application simultaneously initiated a first network location request; In response to the application simultaneously initiating the first network location request, the request result of the first network location request is monitored; Alternatively, in response to the application not simultaneously initiating the first network location request, a second network location request is initiated to the network location module, and the request result of the second network location request is monitored; The return status of the network location information is determined based on the request result of the first network location request or the request result of the second network location request. Determining whether the application simultaneously initiated a first network location request includes: The identification information of the satellite positioning request and the identification information of the application are combined into a first information pair and recorded at the first target location; In response to receiving a first network location request initiated by the application, the identification information of the first network location request and the identification information of the application are combined into a second information pair and recorded at the second target location; Start a first timer, and when the first timer expires, determine whether the identification information of the satellite positioning request exists in the first target location; In response to the presence of the identification information for the satellite positioning request in the first target location, determine whether the identification information for the application exists in the second target location; In response to the presence of the application's identification information in the second target location, it is determined that the application simultaneously initiated a first network location request; In response to the absence of the application's identification information at the second target location, it is determined that the application did not simultaneously initiate the first network location request.

2. The method according to claim 1, characterized in that, The method further includes: Determine the location requirements of the application; The Global Navigation Satellite System receiver is controlled based on the positioning requirements, or the network positioning information return status and the positioning requirements.

3. The method according to claim 1, characterized in that, Also includes: In response to receiving a request to remove satellite positioning from the application, the identifier information of the request to remove satellite positioning is determined based on the request. Based on the identifier information of the satellite positioning request to be removed, the first information pair corresponding to the satellite positioning request to be removed is deleted from the first target location; In response to receiving a request to remove network location sent by the application, the identifier information of the network location request to be removed is determined according to the request. Based on the identifier information of the network location request to be removed, the second information pair corresponding to the network location request to be removed is deleted from the second target location.

4. The method according to claim 1, characterized in that, The monitoring of the request result of the first network location request includes: Determine the request time corresponding to the first network location request; Start a second timer, and when the second timer expires, determine the return time of the latest returned network location information; If the return time is less than or equal to the request time, the request result of the first network location request is determined to be a failure.

5. The method according to claim 4, characterized in that, Determining the network location information return status based on the request result of the first network location request or the request result of the second network location request includes: In response to the failure of either the first network location request or the second network location request, the network location information is determined to return a failure status.

6. The method according to claim 4, characterized in that, After determining that the first network location request failed, the process further includes: Delete the second information pair corresponding to the first network location request from the second target location.

7. The method according to claim 4, characterized in that, Also includes: In response to the network positioning information returned by the network positioning module, determine whether the status of the global navigation satellite system receiver is enabled; In response to the global navigation satellite system receiver being in an off state, the identification information of all target applications present at the first target location is obtained; Based on the identification information of the target application, the network location information is returned to each target application respectively, and the running second timer is turned off.

8. The method according to claim 2, characterized in that, Determining the location requirements of the application includes: Start a third timer, and when the third timer expires, determine whether the status of the global navigation satellite system receiver is in a controlled state; In response to the global navigation satellite system receiver being in a controlled state, the positioning requirement is determined to be a continuous positioning requirement.

9. The method according to claim 8, characterized in that, The step of controlling the Global Navigation Satellite System receiver based on the positioning requirement, or the network positioning information return status and the positioning requirement, includes: In response to the positioning requirement being a continuous positioning requirement, the status of the Global Navigation Satellite System receiver is changed from controlled status to enabled status.

10. The method according to any one of claims 1 to 7, characterized in that, Also includes: In response to the deletion of the first information pairs in the first target location, the state of the Global Navigation Satellite System receiver is changed to the off state.

11. A control device for a global navigation satellite system receiver, characterized in that, include: The state change module is used to change the state of the global navigation satellite system receiver from the off state to the controlled state in response to receiving a satellite positioning request initiated by an application in the electronic device. The controlled state refers to the state in which the global navigation satellite system receiver should be turned on but is actually not turned on. The determination module is used to determine the return status of network location information; The control module is used to control the Global Navigation Satellite System receiver based on the status returned by the network positioning information; The control module is specifically used for: In response to the network positioning information returning a success status, and after receiving the application's request to remove satellite positioning and determining that all applications' satellite positioning requests have been removed, the status of the Global Navigation Satellite System receiver is changed from the controlled status to the off status; In response to the network positioning information returning a failure status, the status of the Global Navigation Satellite System receiver is changed from the controlled status to the enabled status; The determining module is specifically used for: Determine whether the application simultaneously initiated a first network location request; In response to the application simultaneously initiating the first network location request, the request result of the first network location request is monitored; Alternatively, in response to the application not simultaneously initiating the first network location request, a second network location request is initiated to the network location module, and the request result of the second network location request is monitored; The return status of the network location information is determined based on the request result of the first network location request or the request result of the second network location request. Determining whether the application simultaneously initiated a first network location request includes: The identification information of the satellite positioning request and the identification information of the application are combined into a first information pair and recorded at the first target location; In response to receiving a first network location request initiated by the application, the identification information of the first network location request and the identification information of the application are combined into a second information pair and recorded at the second target location; Start a first timer, and when the first timer expires, determine whether the identification information of the satellite positioning request exists in the first target location; In response to the presence of the identification information for the satellite positioning request in the first target location, determine whether the identification information for the application exists in the second target location; In response to the presence of the application's identification information in the second target location, it is determined that the application simultaneously initiated a first network location request; In response to the absence of the application's identification information at the second target location, it is determined that the application did not simultaneously initiate the first network location request.

12. The apparatus according to claim 11, characterized in that, The determining module is also used to determine the location requirements of the application. The control module is also used to control the Global Navigation Satellite System receiver based on the positioning requirements, or the network positioning information return status and the positioning requirements.

13. The apparatus according to claim 11, characterized in that, The determining module is also used for: Determine the request time corresponding to the first network location request; Start a second timer, and when the second timer expires, determine the return time of the latest returned network location information; If the return time is less than or equal to the request time, the request result of the first network location request is determined to be a failure.

14. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method of any one of claims 1-10.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 10.

16. A computer program product, comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Global navigation satellite system (GNSS) receiver and method for controlling the same

    CN102759740A