Startup mode determination method, device, electronic device and storage medium
By determining the power consumption of the positioning module in different startup modes and calculating the positioning cycle threshold, the problem of limited applicable scenarios for reducing the power consumption of the positioning module in the prior art is solved, and low-power positioning suitable for different positioning systems is achieved.
Patent Information
- Application Number
- CN202110646738.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-10
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2041-06-10
AI Technical Summary
In the prior art, the method of reducing positioning power consumption of positioning modules has limited applicable scenarios and is not universal.
By determining the power consumption of the positioning module in different startup modes, a positioning cycle threshold is calculated, and the corresponding relationship between the start mode and the positioning cycle is determined based on the threshold, and a suitable start mode is selected for positioning.
It realizes low-power positioning with a wide range of applicable scenarios in positioning modules of different positioning systems, reducing the power consumption of the positioning module.
Smart Images

Figure CN115469342B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of positioning technology, and in particular to a startup mode determination method, device, electronic device, and computer-readable storage medium. Background Art
[0002] For positioning technology, in addition to meeting basic positioning requirements, another very critical technical indicator needs to be considered, namely the power consumption of the positioning module during positioning.
[0003] Currently, the Assisted Global Positioning System (AGNSS) can be used to shorten the satellite search time and speed up the positioning process, thereby reducing the positioning power consumption of the positioning module. Hot start or warm start can also be performed at specific time intervals to reduce the positioning power consumption of the positioning module in an intermittent working mode.
[0004] However, the above-mentioned method of reducing positioning power consumption is applicable to limited scenarios and is not universal. Summary of the Invention
[0005] Embodiments of the present invention provide a startup mode determination method, device, electronic device, and computer-readable storage medium to address the problem that existing methods for reducing positioning power consumption of a positioning module have limited applicable scenarios and are not universal.
[0006] In a first aspect, an embodiment of the present invention provides a method for determining a startup mode, the method comprising:
[0007] determining a first power consumption of the positioning module in a first startup mode and a second power consumption in a second startup mode;
[0008] determining, based on the first power consumption and the second power consumption, a positioning cycle threshold of the positioning module in the second startup mode;
[0009] Determining a correspondence between a startup mode of the positioning module and a positioning period based on the positioning period threshold;
[0010] A target startup mode for positioning by the positioning module is selected based on the corresponding relationship.
[0011] In the above solution, before the step of selecting the target startup mode for the positioning module to perform positioning based on the corresponding relationship, the method further includes:
[0012] Obtaining a target positioning period for positioning by the positioning module;
[0013] The step of selecting the target startup mode for positioning by the positioning module based on the corresponding relationship includes:
[0014] The startup mode corresponding to the target positioning period is queried based on the corresponding relationship to obtain the target startup mode for positioning by the positioning module.
[0015] In the above solution, the step of determining the correspondence between the startup mode of the positioning module and the positioning period based on the positioning period threshold includes:
[0016] When the positioning period is 0, determining that the second startup mode corresponds to the positioning period;
[0017] When the positioning period is greater than 0 and less than the positioning period threshold, determining that the first startup mode corresponds to the positioning period;
[0018] When the positioning period is greater than or equal to the positioning period threshold, it is determined that the second startup mode corresponds to the positioning period.
[0019] In the above solution, the first startup mode includes a hot startup mode and a warm startup mode, the first power consumption is the power consumption of the positioning module in the warm startup mode, and when the positioning period is greater than 0 and less than the positioning period threshold, the step of determining that the first startup mode corresponds to the positioning period includes:
[0020] In a case where the positioning period is between 0 and a target time, determining that the hot start mode corresponds to the positioning period, and the target time is a valid time of the ephemeris data of the positioning module in the hot start mode;
[0021] When the positioning period is greater than or equal to the target time and less than the positioning period threshold, it is determined that the warm start mode corresponds to the positioning period.
[0022] In the above solution, the step of determining the positioning cycle threshold of the positioning module in the second startup mode based on the first power consumption and the second power consumption includes:
[0023] rounding up the quotient of the second power consumption and the first power consumption to an integer, and determining the value as the number of target positioning times corresponding to the positioning module in the first startup mode;
[0024] The target positioning times and the valid time of data of the positioning module in the first startup mode are multiplied to obtain the positioning cycle threshold.
[0025] In a second aspect, an embodiment of the present invention provides a startup mode determination device, which is applied to an electronic device, wherein the electronic device includes a positioning module, and the device includes:
[0026] a first determining module, configured to determine a first power consumption of the positioning module in a first startup mode and a second power consumption in a second startup mode;
[0027] a second determining module, configured to determine a positioning cycle threshold of the positioning module in the second startup mode based on the first power consumption and the second power consumption;
[0028] A third determining module is configured to determine a correspondence between a startup mode of the positioning module and a positioning period based on the positioning period threshold;
[0029] A selection module is used to select a target startup mode for positioning by the positioning module based on the corresponding relationship.
[0030] In the above solution, the device further comprises:
[0031] An acquisition module, configured to acquire a target positioning period for positioning by the positioning module;
[0032] The selection module is specifically configured to query the startup mode corresponding to the target positioning period based on the corresponding relationship, and obtain the target startup mode for positioning by the positioning module.
[0033] In the above solution, the third determining module includes:
[0034] a first determining unit, configured to determine, when the positioning period is 0, that the second startup mode corresponds to the positioning period;
[0035] a second determining unit, configured to determine, when the positioning period is greater than 0 and less than the positioning period threshold, that the first startup mode corresponds to the positioning period;
[0036] A third determining unit is configured to determine, when the positioning period is greater than or equal to the positioning period threshold, whether the second startup mode corresponds to the positioning period.
[0037] In the above solution, the first startup mode includes a hot startup mode and a warm startup mode, the first power consumption is the power consumption of the positioning module in the warm startup mode, and the second determining unit is specifically configured to:
[0038] In a case where the positioning period is between 0 and a target time, determining that the hot start mode corresponds to the positioning period, and the target time is a valid time of the ephemeris data of the positioning module in the hot start mode;
[0039] When the positioning period is greater than or equal to the target time and less than the positioning period threshold, it is determined that the warm start mode corresponds to the positioning period.
[0040] In the above solution, the second determining module is specifically configured to:
[0041] rounding up the quotient of the second power consumption and the first power consumption to an integer, and determining the value as the number of target positioning times corresponding to the positioning module in the first startup mode;
[0042] The target positioning times and the valid time of data of the positioning module in the first startup mode are multiplied to obtain the positioning cycle threshold.
[0043] In a third aspect, an embodiment of the present invention provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the above-mentioned startup mode determination method when executed by the processor.
[0044] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned startup mode determination method are implemented.
[0045] In an embodiment of the present invention, the first power consumption of a positioning module in a first startup mode and the second power consumption in a second startup mode are determined; based on the first power consumption and the second power consumption, a positioning period threshold of the positioning module in the second startup mode is determined; based on the positioning period threshold, a correspondence between the positioning module's startup mode and the positioning period is determined; and based on the correspondence, a target startup mode for positioning by the positioning module is selected. In this way, by selecting an appropriate startup mode for positioning based on the correspondence between the positioning module's startup mode and the positioning period, lower power consumption can be achieved. This method is applicable to positioning modules of different positioning systems and has a wide range of applicable scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in describing the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0047] Figure 1 1 is a flow chart of a method for determining a startup mode provided by an embodiment of the present invention;
[0048] Figure 2 is a structural diagram of a startup mode determination device provided by an embodiment of the present invention;
[0049] Figure 3 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments derived by ordinary technicians in this field based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.
[0051] The following first describes the startup mode determination method provided by an embodiment of the present invention.
[0052] It should be noted that the startup mode determination method provided in the embodiments of the present invention relates to the field of positioning technology and can be widely applied to positioning systems. The method can be performed by the startup mode determination device in the embodiments of the present invention. The startup mode determination device can be configured in any electronic device to perform the startup mode determination method. The electronic device can be a server or a terminal, and the specific limitations are not set forth herein.
[0053] The method is applied to an electronic device, which may include a positioning module, and the electronic device may use the positioning module to locate the position. Figure 1 , the figure shows a flow chart of the method for determining the startup mode provided by an embodiment of the present invention. Figure 1 As shown, the method may include the following steps:
[0054] Step 101: Determine a first power consumption of the positioning module in a first startup mode and a second power consumption of the positioning module in a second startup mode.
[0055] In this embodiment, in some positioning scenarios, electronic devices may not require real-time positioning, and positioning at regular intervals may be sufficient to meet the positioning needs of the electronic device. Therefore, the positioning frequency can be set to reduce the power consumption of the positioning module. By setting the positioning frequency, the positioning module can be started and stopped to reduce power consumption in scenarios where continuous positioning is not required. The positioning frequency can refer to the positioning period, that is, the interval at which the positioning module is started for positioning.
[0056] In this step, the startup mode of the positioning module may include a first startup mode and a second startup mode, the first startup mode may include a hot startup mode and a warm startup mode, and the second startup mode may be a cold startup mode. The startup mode of the positioning module refers to the positioning method used by the positioning module from startup to positioning, and the startup mode of the positioning module can be described by the following Table 1.
[0057] Table 1 Description of the startup mode of the positioning module
[0058]
[0059]
[0060] In addition, the positioning module can use AGNSS for assisted rapid positioning in cold start mode to shorten the satellite search time and speed up the positioning process. In hot start mode, the positioning module can use ephemeris data for rapid positioning, and in warm start mode, the positioning module can use almanac data for rapid positioning.
[0061] The first power consumption of the positioning module in the first startup mode may refer to the power consumed by the positioning module from startup to positioning in the hot startup mode or the warm startup mode, and the second power consumption of the positioning module in the second startup mode may refer to the power consumed by the positioning module from startup to positioning in the cold startup mode.
[0062] The first power consumption may be an average power consumption of the positioning module performing multiple positioning operations in the first startup mode, or may be a power consumption of the positioning module performing one positioning operation in the first startup mode. The second power consumption may be an average power consumption of the positioning module performing multiple positioning operations in the second startup mode, or may be a power consumption of the positioning module performing one positioning operation in the second startup mode.
[0063] Taking the first power consumption and the second power consumption as the average power consumption of multiple positioning operations, and the first power consumption as the power consumption of the positioning module in the hot start mode as an example, the process of determining the first power consumption and the second power consumption is described in detail.
[0064] The average power consumption of multiple acquisitions can be used as the effective power consumption, and the power consumption in multiple hot start modes and cold start modes can be calculated using integration. Specifically, in hot start mode, the current and voltage from the start-up to positioning process can be measured, and the power consumption of the positioning module from the start-up to positioning process for the nth time can be calculated using the following formula (1).
[0065]
[0066] In the above formula (1), In 、V n They are the average values of current and voltage measured multiple times from startup to positioning in the nth hot start mode, δt n W is the time from start to positioning in the nth hot start mode, n The power consumption from startup to positioning in the nth hot start mode.
[0067] The effective power consumption in the hot start mode, ie, the first power consumption, can be calculated using the following formula (2).
[0068]
[0069] Among them, in the above formula (2), W s It is the effective power consumption in the hot start mode, that is, the first power consumption of the positioning module in the hot start mode.
[0070] Similarly, the following formula (3) can be used to calculate the effective power consumption in the cold start mode, that is, the second power consumption of the positioning module in the cold start mode.
[0071]
[0072] Among them, in the above formula (3), I n 、V n They are the average values of current and voltage measured multiple times from startup to positioning in the nth cold start mode, δt n W is the time from start to positioning in the nth cold start mode, c It is the effective power consumption in the cold start mode, that is, the second power consumption of the positioning module in the cold start mode.
[0073] Step 102: Determine a positioning cycle threshold of the positioning module in the second startup mode based on the first power consumption and the second power consumption.
[0074] In this step, the positioning cycle threshold may represent the positioning interval when the positioning module uses the cold start mode and has a relatively low power consumption.
[0075] The step 102 may specifically include:
[0076] rounding up the quotient of the second power consumption and the first power consumption to an integer, and determining the value as the number of target positioning times corresponding to the positioning module in the first startup mode;
[0077] The target positioning times and the valid time of data of the positioning module in the first startup mode are multiplied to obtain the positioning cycle threshold.
[0078] When the first power consumption is the power consumption of the positioning module in the warm start mode, the target positioning times are multiplied by the valid time of the almanac data of the positioning module in the hot start mode. The resulting positioning cycle threshold is the positioning cycle threshold of the positioning module in the hot start mode, denoted by T'1. When the first power consumption is the power consumption of the positioning module in the warm start mode, the target positioning times are multiplied by the valid time of the almanac data of the positioning module in the warm start mode. The resulting positioning cycle threshold is the positioning cycle threshold of the positioning module in the warm start mode, denoted by T'2.
[0079] Since the time from startup to positioning of the positioning module in hot start mode is shorter than that in warm start mode, the positioning cycle threshold of the positioning module in hot start mode is usually smaller than that of the positioning module in warm start mode, that is, T'1<T'2.
[0080] That is, the positioning cycle threshold can be calculated using the following equations (4) and (5).
[0081]
[0082] T'=N'*Δt (5)
[0083] Among them, in the above formula (4), N' is the number of target positioning times. In the above formula (5), if it is the hot start mode, Δt is the valid time of the ephemeris data, and t is used ephe Indicates that, accordingly, the result obtained by the above formula (5) is T'1. If it is a warm start mode, Δt is the valid time of the almanac data, and t alma Indicates that, accordingly, the result obtained by the above formula (5) is T'2.
[0084] In this way, the value obtained by rounding up the quotient of the second power consumption and the first power consumption is determined as the number of target positioning times corresponding to the positioning module in the first startup mode; the target positioning times is multiplied by the valid time of the data of the positioning module in the first startup mode to obtain the positioning cycle threshold, thereby improving the accuracy of the positioning cycle threshold.
[0085] Alternatively, the quotient of the second power consumption and the first power consumption may be rounded down to obtain a value to be determined as the number of target positioning times corresponding to the positioning module in the first startup mode; and the positioning cycle threshold may be obtained by multiplying the target positioning times by the valid time of data of the positioning module in the first startup mode. This is not specifically limited here.
[0086] Step 103: Determine the correspondence between the startup mode of the positioning module and the positioning period based on the positioning period threshold.
[0087] In this step, the corresponding relationship between the activation mode of the positioning module and the positioning period may be determined based on the positioning period threshold, and different positioning periods may correspond to different activation modes of the positioning module.
[0088] For example, if the positioning period is less than the positioning period threshold, since the power consumption of the positioning module in the first startup mode is less than the power consumption in the second startup mode, it can be determined that the first startup mode corresponds to the positioning period. In this way, the first startup mode can be selected for positioning to reduce the power consumption of the positioning module.
[0089] For another example, if the positioning period is greater than or equal to the positioning period threshold, since the valid time of the positioning data is exceeded, and if the first startup mode is used for positioning multiple times, the power consumption of using the first startup mode for positioning multiple times is greater than the power consumption of using the second startup mode for positioning once. Therefore, it can be determined that the second startup mode corresponds to the positioning period, so that the second startup mode can be selected for positioning to reduce the power consumption of the positioning module.
[0090] In addition, if the positioning period is 0, that is, continuous positioning, it can be determined that the second start mode corresponds to the positioning period, so that the second start mode can be selected to accelerate the first start positioning process.
[0091] Step 104: Select a target startup mode for the positioning module to perform positioning based on the corresponding relationship.
[0092] In this step, the appropriate start-up mode and positioning period can be selected for positioning according to the corresponding relationship, so as to achieve the effect of lower power consumption. In an optional embodiment, the target start-up mode corresponding to the positioning period in the corresponding relationship can be selected for positioning according to the positioning period of the actual use scenario.
[0093] In this embodiment, by comparing the energy consumption of positioning using different startup modes at different time intervals, the startup mode and positioning period corresponding to the relatively optimal energy consumption are calculated. This approach allows for selecting the appropriate startup mode for positioning based on the correspondence between the startup mode and positioning period, thereby achieving lower power consumption. This approach is applicable to positioning modules in different positioning systems and is applicable to a wide range of scenarios.
[0094] Optionally, before step 104, the method further includes:
[0095] Obtaining a target positioning period for positioning by the positioning module;
[0096] The step 104 specifically includes:
[0097] The startup mode corresponding to the target positioning period is queried based on the corresponding relationship to obtain the target startup mode for positioning by the positioning module.
[0098] In this embodiment, the target positioning period may be a time period for the positioning module to start and position, such as 5 hours.
[0099] There are many ways to obtain the target positioning period. For example, a time period input by a user or sent by other electronic devices can be received, and the time period can be determined as the target positioning period of the positioning module. The target positioning period of the positioning module can also be determined according to the actual usage scenario. The target positioning period of the positioning module can also be determined according to the hardware characteristics of the positioning module used.
[0100] When obtaining the target positioning period for positioning by the positioning module, the startup mode corresponding to the target positioning period in the corresponding relationship can be queried based on the corresponding relationship. The queried startup mode can be determined as the target startup mode for positioning by the positioning module, that is, the positioning module can subsequently perform positioning according to the target startup mode.
[0101] In this embodiment, the target positioning period for the positioning module is obtained, and based on the corresponding relationship, the startup mode corresponding to the target positioning period is queried to obtain the target startup mode for the positioning module. In this way, based on the corresponding relationship, the startup mode corresponding to the target positioning period with relatively optimal energy consumption can be determined, thereby reducing the power consumption of the positioning module. This is applicable to positioning modules of different positioning systems and has a wide range of application scenarios.
[0102] Optionally, step 103 specifically includes:
[0103] When the positioning period is 0, determining that the second startup mode corresponds to the positioning period;
[0104] When the positioning period is greater than 0 and less than the positioning period threshold, determining that the first startup mode corresponds to the positioning period;
[0105] When the positioning period is greater than or equal to the positioning period threshold, it is determined that the second startup mode corresponds to the positioning period.
[0106] In this embodiment, if the positioning period is less than the positioning period threshold, since the power consumption of the positioning module in the first startup mode is less than the power consumption in the second startup mode, it can be determined that the first startup mode corresponds to the positioning period. In this way, the first startup mode can be selected for positioning, thereby reducing the power consumption of the positioning module.
[0107] If the positioning period is greater than or equal to the positioning period threshold, since the valid time of the positioning data is exceeded, and if the first startup mode is used for positioning multiple times, the power consumption of multiple positioning using the first startup mode is greater than the power consumption of positioning using the second startup mode once. Therefore, it can be determined that the second startup mode corresponds to the positioning period. In this way, the second startup mode can be selected for positioning to reduce the power consumption of the positioning module.
[0108] If the positioning cycle is 0, that is, continuous positioning, it can be determined that the second start mode corresponds to the positioning cycle, so the second start mode can be selected to accelerate the first start positioning process.
[0109] In this embodiment, by taking the positioning cycle threshold as the critical point between the first startup mode and the second startup mode, based on the relationship between the positioning cycle and the critical point, the positioning cycle and the startup mode of the positioning module at a better power consumption can be determined. In this way, the correspondence between the startup mode of the positioning module and the positioning cycle can be determined. In this way, positioning can be performed based on the target startup mode selected based on the correspondence, which can achieve the effect of reducing the power consumption of the positioning module.
[0110] Optionally, the first startup mode includes a hot startup mode and a warm startup mode, the first power consumption is the power consumption of the positioning module in the warm startup mode, and when the positioning period is greater than 0 and less than the positioning period threshold, the step of determining that the first startup mode corresponds to the positioning period includes:
[0111] In a case where the positioning period is between 0 and a target time, determining that the hot start mode corresponds to the positioning period, and the target time is a valid time of the ephemeris data of the positioning module in the hot start mode;
[0112] When the positioning period is greater than or equal to the target time and less than the positioning period threshold, it is determined that the warm start mode corresponds to the positioning period.
[0113] In this embodiment, the correspondence between the determined startup mode of the positioning module and the positioning period can be expressed by the following formula (6).
[0114]
[0115] In the above formula (6), T is the positioning period, T' is the positioning period threshold of the positioning module in the warm start mode, Indicates the correspondence between positioning cycle and startup mode.
[0116] In this embodiment, by using the positioning cycle threshold as the critical point between the first startup mode and the second startup mode, and by using the valid time of the ephemeris data as the critical point between the hot startup mode and the warm startup mode, based on the relationship between the positioning cycle and these critical points, the positioning cycle and the startup mode of the positioning module at optimal power consumption can be determined. In this way, the correspondence between the startup mode of the positioning module and the positioning cycle can be determined. In this way, positioning can be performed based on the target startup mode selected based on the correspondence, which can achieve the effect of reducing the power consumption of the positioning module.
[0117] The following describes the startup mode determination device provided by an embodiment of the present invention.
[0118] See also Figure 2 , the figure shows a schematic diagram of the structure of the startup mode determination device provided by an embodiment of the present invention. The device is applied to an electronic device, the electronic device includes a positioning module, such as Figure 2 As shown, the startup mode determination device 200 includes:
[0119] A first determining module 201 is configured to determine a first power consumption of the positioning module in a first startup mode and a second power consumption in a second startup mode;
[0120] A second determining module 202 is configured to determine a positioning cycle threshold of the positioning module in the second startup mode based on the first power consumption and the second power consumption;
[0121] A third determining module 203 is configured to determine a correspondence between a startup mode of the positioning module and a positioning period based on the positioning period threshold;
[0122] The selection module 204 is configured to select a target startup mode for positioning by the positioning module based on the corresponding relationship.
[0123] Optionally, the device further includes:
[0124] An acquisition module, configured to acquire a target positioning period for positioning by the positioning module;
[0125] The selection module 204 is specifically configured to query the start-up mode corresponding to the target positioning period based on the corresponding relationship, and obtain the target start-up mode for positioning by the positioning module.
[0126] Optionally, the third determining module 203 includes:
[0127] a first determining unit, configured to determine, when the positioning period is 0, that the second startup mode corresponds to the positioning period;
[0128] a second determining unit, configured to determine, when the positioning period is greater than 0 and less than the positioning period threshold, that the first startup mode corresponds to the positioning period;
[0129] A third determining unit is configured to determine, when the positioning period is greater than or equal to the positioning period threshold, whether the second startup mode corresponds to the positioning period.
[0130] Optionally, the first startup mode includes a hot startup mode and a warm startup mode, the first power consumption is the power consumption of the positioning module in the warm startup mode, and the second determining unit is specifically configured to:
[0131] In a case where the positioning period is between 0 and a target time, determining that the hot start mode corresponds to the positioning period, and the target time is a valid time of the ephemeris data of the positioning module in the hot start mode;
[0132] When the positioning period is greater than or equal to the target time and less than the positioning period threshold, it is determined that the warm start mode corresponds to the positioning period.
[0133] Optionally, the second determining module 202 is specifically configured to:
[0134] rounding up the quotient of the second power consumption and the first power consumption to an integer, and determining the value as the number of target positioning times corresponding to the positioning module in the first startup mode;
[0135] The target positioning times and the valid time of data of the positioning module in the first startup mode are multiplied to obtain the positioning cycle threshold.
[0136] The startup mode determination device 200 can implement each process implemented in the above method embodiment, and to avoid repetition, it will not be described here.
[0137] In an embodiment of the present invention, a first determination module 201 determines the first power consumption of a positioning module in a first startup mode and the second power consumption in a second startup mode; a second determination module 202 determines a positioning period threshold for the positioning module in the second startup mode based on the first power consumption and the second power consumption; a third determination module 203 determines a correspondence between the positioning module's startup mode and the positioning period based on the positioning period threshold; and a selection module 204 selects a target startup mode for positioning by the positioning module based on the correspondence. In this way, by selecting an appropriate startup mode for positioning based on the correspondence between the positioning module's startup mode and the positioning period, lower power consumption can be achieved. This method is applicable to positioning modules of different positioning systems and has a wide range of applicable scenarios.
[0138] The electronic device provided by the embodiment of the present invention is described below.
[0139] See also Figure 3 , the figure shows a schematic diagram of the structure of the electronic device provided by the embodiment of the present invention. Figure 3 As shown, the electronic device 300 includes: a processor 301, a memory 302, a user interface 303 and a bus interface 304, and the electronic device also includes a positioning module.
[0140] The processor 301 is configured to read the program in the memory 302 and execute the following process:
[0141] determining a first power consumption of the positioning module in a first startup mode and a second power consumption in a second startup mode;
[0142] determining, based on the first power consumption and the second power consumption, a positioning cycle threshold of the positioning module in the second startup mode;
[0143] Determining a correspondence between a startup mode of the positioning module and a positioning period based on the positioning period threshold;
[0144] A target startup mode for positioning by the positioning module is selected based on the corresponding relationship.
[0145] exist Figure 3 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 301 and memory represented by memory 302. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are all well known in the art and therefore will not be further described herein. The bus interface 304 provides an interface. For different user devices, the user interface 303 may also be an interface capable of connecting external or internal devices as required, including but not limited to a keypad, display, speaker, microphone, joystick, etc.
[0146] The processor 301 is responsible for managing the bus architecture and general processing, and the memory 302 can store data used by the processor 301 when performing operations.
[0147] Optionally, the processor 301 is further configured to:
[0148] Obtaining a target positioning period for positioning by the positioning module;
[0149] The startup mode corresponding to the target positioning period is queried based on the corresponding relationship to obtain the target startup mode for positioning by the positioning module.
[0150] Optionally, the processor 301 is further configured to:
[0151] When the positioning period is 0, determining that the second startup mode corresponds to the positioning period;
[0152] When the positioning period is greater than 0 and less than the positioning period threshold, determining that the first startup mode corresponds to the positioning period;
[0153] When the positioning period is greater than or equal to the positioning period threshold, it is determined that the second startup mode corresponds to the positioning period.
[0154] Optionally, the first startup mode includes a hot startup mode and a warm startup mode, and the first power consumption is the power consumption of the positioning module in the warm startup mode. The processor 301 is further configured to:
[0155] In a case where the positioning period is between 0 and a target time, determining that the hot start mode corresponds to the positioning period, and the target time is a valid time of the ephemeris data of the positioning module in the hot start mode;
[0156] When the positioning period is greater than or equal to the target time and less than the positioning period threshold, it is determined that the warm start mode corresponds to the positioning period.
[0157] Optionally, the processor 301 is further configured to:
[0158] rounding up the quotient of the second power consumption and the first power consumption to an integer, and determining the value as the number of target positioning times corresponding to the positioning module in the first startup mode;
[0159] The target positioning times and the valid time of data of the positioning module in the first startup mode are multiplied to obtain the positioning cycle threshold.
[0160] Preferably, an embodiment of the present invention also provides an electronic device, including a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. When the computer program is executed by the processor 301, the various processes of the above-mentioned startup mode determination method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0161] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the various processes of the above-described embodiment of the method for determining a startup mode and achieves the same technical effect. To avoid repetition, the details are not described here. The computer-readable storage medium may be, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0162] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0163] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0164] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0165] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
[0166] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0167] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, ROM, RAM, a magnetic disk, or an optical disk.
[0168] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for determining a startup mode, characterized in that: Applied to an electronic device, the electronic device includes a positioning module, and the method includes: Determine a first power consumption of the positioning module in a first startup mode and a second power consumption in a second startup mode; Based on the first power consumption and the second power consumption, determining a positioning cycle threshold of the positioning module in the second startup mode; Based on the positioning cycle threshold, determining the corresponding relationship between the startup mode of the positioning module and the positioning cycle; Selecting a target start mode for positioning by the positioning module based on the corresponding relationship; The step of determining the correspondence between the startup mode of the positioning module and the positioning period based on the positioning period threshold comprises: When the positioning period is 0, determining that the second startup mode corresponds to the positioning period; When the positioning period is greater than 0 and less than the positioning period threshold, determining that the first startup mode corresponds to the positioning period; When the positioning period is greater than or equal to the positioning period threshold, it is determined that the second startup mode corresponds to the positioning period.
2. The method according to claim 1, characterized in that Before the step of selecting the target startup mode for positioning by the positioning module based on the corresponding relationship, the method further includes: Obtaining a target positioning period for positioning by the positioning module; The step of selecting the target startup mode for positioning by the positioning module based on the corresponding relationship includes: Based on the corresponding relationship, the startup mode corresponding to the target positioning period is queried to obtain the target startup mode for positioning by the positioning module.
3. The method according to claim 1, characterized in that The first startup mode includes a hot startup mode and a warm startup mode, the first power consumption is the power consumption of the positioning module in the warm startup mode, and when the positioning period is greater than 0 and less than the positioning period threshold, the step of determining that the first startup mode corresponds to the positioning period includes: In the case where the positioning period is between 0 and a target time, determining that the hot start mode corresponds to the positioning period, the target time being the valid time of the ephemeris data of the positioning module in the hot start mode; When the positioning period is greater than or equal to the target time and less than the positioning period threshold, it is determined that the warm start mode corresponds to the positioning period.
4. The method according to claim 1, characterized in that: The step of determining a positioning cycle threshold of the positioning module in the second startup mode based on the first power consumption and the second power consumption comprises: A value obtained by rounding up the quotient of the second power consumption and the first power consumption is determined as the number of target positioning times corresponding to the positioning module in the first startup mode; The target positioning times and the valid time of data of the positioning module in the first startup mode are multiplied to obtain the positioning cycle threshold.
5. A startup mode determination device, characterized in that: Applied to electronic equipment, the electronic equipment includes a positioning module, and the device includes: A first determining module, configured to determine a first power consumption of the positioning module in a first startup mode and a second power consumption in a second startup mode; A second determining module, configured to determine a positioning cycle threshold of the positioning module in the second startup mode based on the first power consumption and the second power consumption; A third determining module, configured to determine a correspondence between a startup mode of the positioning module and a positioning period based on the positioning period threshold; A selection module, used for selecting a target start mode for positioning by the positioning module based on the corresponding relationship; The third determination module comprises: A first determining unit, configured to determine, when the positioning period is 0, that the second startup mode corresponds to the positioning period; A second determining unit, configured to determine that the first startup mode corresponds to the positioning period when the positioning period is greater than 0 and less than the positioning period threshold; A third determining unit is configured to determine, when the positioning period is greater than or equal to the positioning period threshold, whether the second startup mode corresponds to the positioning period.
6. The device according to claim 5, characterized in that The device also includes: An acquisition module, used for acquiring a target positioning period for positioning by the positioning module; The selection module is specifically used to query the startup mode corresponding to the target positioning period based on the corresponding relationship to obtain the target startup mode for positioning by the positioning module.
7. The device according to claim 5, characterized in that The first startup mode includes a hot startup mode and a warm startup mode, the first power consumption is the power consumption of the positioning module in the warm startup mode, and the second determining unit is specifically configured to: In the case where the positioning period is between 0 and a target time, determining that the hot start mode corresponds to the positioning period, the target time being the valid time of the ephemeris data of the positioning module in the hot start mode; When the positioning period is greater than or equal to the target time and less than the positioning period threshold, it is determined that the warm start mode corresponds to the positioning period.
8. The device according to claim 5, characterized in that The second determining module is specifically used to: A value obtained by rounding up the quotient of the second power consumption and the first power consumption is determined as the number of target positioning times corresponding to the positioning module in the first startup mode; The target positioning times and the valid time of data of the positioning module in the first startup mode are multiplied to obtain the positioning cycle threshold.
9. An electronic device, characterized in that: The electronic device comprises: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the startup mode determination method according to any one of claims 1 to 4 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the startup mode determination method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method and system for oil dilution control
CN103628996A
Positioning method, security area determining method and related device
CN106341786A