WO2018072260A1 - Gps模块的控制方法、控制装置和终端 - Google Patents

Gps模块的控制方法、控制装置和终端 Download PDF

Info

Publication number
WO2018072260A1
WO2018072260A1 PCT/CN2016/107805 CN2016107805W WO2018072260A1 WO 2018072260 A1 WO2018072260 A1 WO 2018072260A1 CN 2016107805 W CN2016107805 W CN 2016107805W WO 2018072260 A1 WO2018072260 A1 WO 2018072260A1
Authority
WO
WIPO (PCT)
Prior art keywords
gps module
time
terminal
current
positioning
Prior art date
Application number
PCT/CN2016/107805
Other languages
English (en)
French (fr)
Inventor
周敏
Original Assignee
宇龙计算机通信科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宇龙计算机通信科技(深圳)有限公司 filed Critical 宇龙计算机通信科技(深圳)有限公司
Publication of WO2018072260A1 publication Critical patent/WO2018072260A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/01Satellite radio beacon positioning systems transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/13Receivers
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/01Satellite radio beacon positioning systems transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/13Receivers
    • G01S19/34Power consumption

Definitions

  • the present invention relates to the field of terminal technologies, and in particular, to a GPS module control method, a GPS module control device, and a terminal.
  • GPS Global Positioning System
  • the invention is based on the above problems, and proposes a new technical solution, which can reasonably control the GPS module to improve the endurance of the terminal and avoid excessive temperature of the terminal.
  • the first aspect of the present invention provides a method for controlling a GPS module, including: determining whether the positioning information reported by the GPS module meets a first preset condition when using a GPS module of the terminal for positioning; Obtaining the current working scenario of the terminal that the positioning information reported by the GPS module for the Nth consecutive time meets the first preset condition, where N is a positive integer; according to the current working scenario, the GPS module is The working state is controlled.
  • the terminal if the positioning information reported by the GPS module for N consecutive times satisfies the first preset condition, the terminal is currently in the area where the signal is relatively poor, and the working state of the GPS module is controlled according to the current working scene of the terminal, thereby avoiding When the GPS module performs positioning, it consumes a large amount of power of the terminal, thereby improving the endurance of the terminal. At the same time, the GPS module is kept in a working state, and the terminal cannot stand by, thereby avoiding the temperature of the terminal being too high.
  • the positioning information reported by the GPS module includes but is not limited to: a carrier-to-noise ratio and/or a signal-to-noise ratio.
  • the first preset condition includes: a carrier-to-noise ratio of all satellites is less than a set value N0, and/or a letter of all satellites. The noise ratio is less than the set value N1. When the first preset condition is met, it indicates that the terminal is currently in a position where the signal is relatively poor.
  • the step of acquiring the current working scenario of the terminal specifically includes: determining whether the GPS module is present in the most recent positioning record of the application currently requested to be located.
  • the application locates a successful record; if the record does not exist, determining that the current work scene is the first work scene; if the record exists, determining that the current speed of the terminal is less than the preset speed
  • the current working scenario is a second working scenario. When the current speed of the terminal is greater than or equal to the preset speed, the current working scenario is determined to be a third working scenario.
  • the working state of the GPS module is optimized to avoid the GPS module being in a real-time state and causing the terminal's endurance capability. Relatively low. Or the speed of the terminal is relatively slow, indicating that the terminal still needs a long time to get rid of the poor signal area, and then optimize the working state of the GPS module to avoid the real-time positioning of the GPS module and the endurance of the terminal. low.
  • the step of controlling the working state of the GPS module according to the current working scenario includes: if the current working scenario is a first working scenario or a second The work scenario is to increase the interval between the positioning of the positioning information by the GPS module from the first time to the second time, and/or control the GPS module to be in a stopped state; if the current working scenario is the third work The scene keeps the working state of the GPS module unchanged.
  • the technical solution by increasing the interval time for the GPS module to report the positioning information, the number of times the GPS module is positioned in a poor signal area is reduced, or the GPS module is controlled to be in a stopped state, thereby preventing the GPS module from being in a working state. Excessive power consumption.
  • the interval time for reporting the positioning information by the GPS module is increased from the first time to the second time, the interval between the positioning information is reported by the GPS module.
  • the GPS module is controlled to be in a stopped state.
  • the signal of the area where the terminal is located is still weak, and the GPS module is controlled to stop working, thereby avoiding The GPS module is in operation and consumes too much power.
  • the method further includes: when the current ambient brightness and/or the current speed of the terminal meets the second preset condition, the interval time for reporting the positioning information by the GPS module is The second time is reduced to the first time.
  • the current ambient brightness and/or the current speed of the terminal meets the second preset condition, for example, the current ambient brightness is greater than the preset brightness, indicating that the terminal has been from a darker environment (eg, a tunnel)
  • the terminal can normally perform positioning, and then the interval time for reporting the positioning information by the GPS module is restored to the first time, so that the GPS module can work normally.
  • the current speed of the terminal is greater than the preset speed, indicating that the terminal is separated from the current signal by a relatively fast speed, which means that the terminal is likely to reach a relatively good signal area soon, then the GPS will be The interval at which the module reports the positioning information is restored to the first time, so that the GPS module can perform the positioning work normally.
  • the method further includes: counting down a preset time; after counting the preset time, the The interval at which the GPS module reports the positioning information increases from the first time to the second time.
  • the interval time for reporting the positioning information by the GPS module is adjusted after the preset time is counted down, thereby avoiding the terminal after the interval is adjusted immediately. In the case where the signal is in a good area, the terminal cannot perform normal positioning.
  • a second aspect of the present invention provides a control device for a GPS module, including: a determining unit, configured to determine whether the positioning information reported by the GPS module satisfies a first preset condition when the GPS module of the terminal is used for positioning; An acquiring unit, configured to: if the determining unit determines that the positioning information reported by the GPS module for the N times consecutively meets the first preset condition, acquire a current working scenario of the terminal, where N is a positive integer; And a unit configured to control an operating state of the GPS module according to the current working scenario.
  • the terminal if the positioning information reported by the GPS module for N consecutive times satisfies the first preset condition, the terminal is currently in the area where the signal is relatively poor, and the working state of the GPS module is controlled according to the current working scene of the terminal, thereby avoiding When the GPS module performs positioning, it consumes a large amount of power of the terminal, thereby improving the endurance of the terminal. At the same time, the GPS module is kept in a working state, and the terminal cannot stand by, thereby avoiding the temperature of the terminal being too high.
  • the obtaining unit includes: a determining subunit, configured to determine whether the GPS module successfully locates the application in the most recent positioning record of the application currently requested to be located. a determining a subunit, configured to determine that the current working scene is a first working scenario if the determining subunit determines that the record does not exist; and the determining unit is further configured to determine if the determining subunit If the current speed of the terminal is less than the preset speed, the current working scene is determined to be the second working scene, and when the current speed of the terminal is greater than or equal to the preset speed, the current current is determined.
  • the work scene is the third work scene.
  • the working state of the GPS module is optimized to avoid the GPS module being in a real-time state and causing the terminal's endurance capability. Relatively low. Or the speed of the terminal is relatively slow, indicating that the terminal still needs a long time to get rid of the poor signal area, and then optimize the working state of the GPS module to avoid the real-time positioning of the GPS module and the endurance of the terminal. low.
  • control unit is configured to: if the current working scenario is the first working scenario or the second working scenario, the interval time for reporting the positioning information by the GPS module is The time is increased to the second time, and/or the GPS module is controlled to be in a stopped state. If the current working scenario is the third working scenario, the working state of the GPS module is kept unchanged.
  • the technical solution by increasing the interval time for the GPS module to report the positioning information, the number of times the GPS module is positioned in a poor signal area is reduced, or the GPS module is controlled to be in a stopped state, thereby preventing the GPS module from being in a working state. Excessive power consumption.
  • control unit is configured to: if the interval time for reporting the positioning information by the GPS module is increased from the first time to the second time, The interval at which the GPS module reports the positioning information is kept in a state in which the GPS module is in a stopped state when the duration of the second time reaches a duration threshold.
  • the signal of the area where the terminal is located is still weak, and the GPS module is controlled to stop working, thereby avoiding The GPS module is in operation and consumes too much power.
  • control unit is further configured to report the positioning information to the GPS module when the current ambient brightness and/or the current speed of the terminal meets the second preset condition.
  • the interval is reduced from the second time to the first time.
  • the current ambient brightness and/or the current speed of the terminal meets the second preset condition, for example, the current ambient brightness is greater than the preset brightness, indicating that the terminal has been from a darker environment (eg, a tunnel)
  • the terminal can normally perform positioning, and then the interval time for reporting the positioning information by the GPS module is restored to the first time, so that the GPS module can work normally.
  • the current speed of the terminal is greater than the preset speed, indicating that the terminal is separated from the current signal by a relatively fast speed, which means that the terminal is likely to reach a relatively good signal area soon, then the GPS will be The interval at which the module reports the positioning information is restored to the first time, so that the GPS module can perform the positioning work normally.
  • the method further includes: a counting unit configured to count down the preset time; and counting down in the counting unit After the preset time, the control unit is specifically configured to increase the interval time for reporting the positioning information by the GPS module from the first time to the second time.
  • the interval time for reporting the positioning information by the GPS module is adjusted after the preset time is counted down, thereby avoiding the terminal after the interval is adjusted immediately. In the case where the signal is in a good area, the terminal cannot perform normal positioning.
  • a third aspect of the present invention provides a terminal, comprising the control device of the GPS module according to any one of the above aspects, wherein the terminal has the control device of the GPS module according to any one of the above aspects.
  • the GPS module can be reasonably controlled to improve the endurance of the terminal and avoid excessive temperature of the terminal.
  • FIG. 1 is a flow chart showing a control method of a GPS module according to an embodiment of the present invention
  • FIG. 2 is a flow chart showing a control method of a GPS module according to another embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of a method for acquiring a current working scenario of a terminal according to an embodiment of the present invention
  • FIG. 4 is a flow chart showing a method of setting operating parameters of a GPS module according to an embodiment of the present invention
  • FIG. 5 is a flow chart showing a control method of an operating state of a GPS module according to an embodiment of the present invention
  • FIG. 6 is a block diagram showing the structure of a control device of a GPS module according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • FIG. 8 is a block diagram showing the structure of a terminal according to another embodiment of the present invention.
  • FIG. 1 is a flow chart showing a control method of a GPS module according to an embodiment of the present invention.
  • a method for controlling a GPS module includes:
  • Step 102 Determine whether the positioning information reported by the GPS module meets the first preset condition when the positioning is performed by using the GPS module of the terminal.
  • Step 104 If the positioning information reported by the GPS module for the N times is satisfied, the current working scenario of the terminal is obtained, where N is a positive integer.
  • Step 106 Control an working state of the GPS module according to the current working scenario.
  • the terminal if the positioning information reported by the GPS module for N consecutive times satisfies the first preset condition, the terminal is currently in the area where the signal is relatively poor, and the working state of the GPS module is controlled according to the current working scene of the terminal, thereby avoiding When the GPS module performs positioning, it consumes a large amount of power of the terminal, thereby improving the endurance of the terminal. At the same time, the GPS module is kept in a working state, and the terminal cannot stand by, thereby avoiding the temperature of the terminal being too high.
  • the positioning information reported by the GPS module includes but is not limited to: a carrier to noise ratio (CNR) and/or a signal to noise ratio (SNR).
  • the first preset condition includes: loading of all satellites. The noise ratio is less than the set value N0, and/or the signal to noise ratio of all satellites is less than the set value N1. When the first preset condition is met, it indicates that the terminal is currently in a position where the signal is relatively poor.
  • the step of acquiring the current working scenario of the terminal specifically includes: determining whether the GPS module is present in the most recent positioning record of the application currently requested to be located.
  • the application locates a successful record; if the record does not exist, determining that the current work scene is the first work scene; if the record exists, determining that the current speed of the terminal is less than the preset speed
  • the current working scenario is a second working scenario. When the current speed of the terminal is greater than or equal to the preset speed, the current working scenario is determined to be a third working scenario.
  • the working state of the GPS module is optimized to avoid the GPS module being in a real-time state and causing the terminal's endurance capability. Relatively low. Or the speed of the terminal is relatively slow, indicating that the terminal still needs a long time to get rid of the poor signal area, and then optimize the working state of the GPS module to avoid the real-time positioning of the GPS module and the endurance of the terminal. low.
  • the step 106 includes: if the current working scenario is the first working scenario or the second working scenario, the interval time for reporting the positioning information by the GPS module is increased from the first time. Up to the second time, and/or controlling the GPS module to be in a stopped state; if the current working scenario is a third working scenario, maintaining the working state of the GPS module unchanged.
  • the technical solution by increasing the interval time for the GPS module to report the positioning information, the number of times the GPS module is positioned in a poor signal area is reduced, or the GPS module is controlled to be in a stopped state, thereby preventing the GPS module from being in a working state. Excessive power consumption.
  • the interval time for reporting the positioning information by the GPS module is increased from the first time to the second time, the interval between the positioning information is reported by the GPS module.
  • the GPS module is controlled to be in a stopped state.
  • the signal of the area where the terminal is located is still weak, and the GPS module is controlled to stop working, thereby avoiding The GPS module is in operation and consumes too much power.
  • the method further includes: reporting the GPS module when the current ambient brightness and/or the current speed of the terminal (which may also be the acceleration of the terminal) meets the second preset condition The interval of positioning information is reduced from the second time to the first time.
  • the current ambient brightness and/or the current speed of the terminal meets the second preset condition, for example, the current ambient brightness is greater than the preset brightness, indicating that the terminal has been from a darker environment (eg, a tunnel)
  • the terminal can normally perform positioning, and then the interval time for reporting the positioning information by the GPS module is restored to the first time, so that the GPS module can work normally.
  • the current speed of the terminal is greater than the preset speed, indicating that the terminal is separated from the current signal by a relatively fast speed, which means that the terminal is likely to reach a relatively good signal area soon, then the GPS will be The interval at which the module reports the positioning information is restored to the first time, so that the GPS module can perform the positioning work normally.
  • the method further includes: counting down a preset time; after counting the preset time, the The interval at which the GPS module reports the positioning information increases from the first time to the second time.
  • the interval time for reporting the positioning information by the GPS module is adjusted after the preset time is counted down, thereby avoiding the terminal after the interval is adjusted immediately. In the case where the signal is in a good area, the terminal cannot perform normal positioning.
  • Scenario The terminal is currently indoors, and the application in the terminal requests the GPS module to perform positioning.
  • the positioning information includes a satellite signal quality SNR value, whether the positioning is successful, and the current speed of the terminal.
  • the GPS module If the value detected by the light sensor and the acceleration sensor has not reached the above threshold value, and the GPS module reports the time duration of 25s for more than 1 minute, the GPS module is turned off; if the light sensor detects this time If the ambient brightness is greater than 200 lux or the acceleration detected by the acceleration sensor is greater than 10 m/s 2 , the working mode of the GPS module is immediately switched to the normal working mode, that is, the GPS reporting time is restored to the initial value before the adjustment.
  • FIG. 2 is a flow chart showing a control method of a GPS module according to another embodiment of the present invention. As shown in FIG. 2, a method for controlling a GPS module according to another embodiment of the present invention includes:
  • Step 202 Acquire positioning information reported by the GPS module.
  • Step 204 According to the positioning information reported by the GPS module, it is determined whether optimization is needed. When it is determined that optimization is needed, the process proceeds to step 206. When it is determined that optimization is not required, the process proceeds to step 208.
  • Step 206 adjusting the working mode of the GPS module in combination with the sensor data.
  • Step 208 normal processing, that is, keeping the working state of the GPS module unchanged.
  • FIG. 3 is a schematic flowchart diagram of a method for acquiring a current working scenario of a terminal according to an embodiment of the present invention. As shown in FIG. 3, a method for obtaining a current working scenario of a terminal according to an embodiment of the present invention includes:
  • Step 302 Obtain positioning information reported by the GPS module.
  • Step 304 Record related information, including the SNR value of the satellite, the success or failure of the positioning, and the terminal speed.
  • step 306 it is determined whether the positioning is successful. When it is determined that the positioning is successful, the normal processing flow is executed. When it is determined that the positioning is not successful, the process proceeds to step 308.
  • Step 308 determining whether the SNR values of all the satellites are less than the set value N1.
  • the process proceeds to step 310, where it is determined that the SNR values of all the satellites are not less than the set value. , the process of performing normal processing. Wherein, if the SNR values of all the satellites that are located this time are less than the set value, it is determined that the data currently located is valid.
  • step 310 it is determined whether the number of times the data is valid has reached the set value (ie, N in the above). If the number of times the data is valid has reached the set value, step 312 is performed, and if the number of times the data is valid does not reach the set value, then End this process.
  • Step 312 Determine the current working scenario of the terminal according to the recorded positioning success information and the speed information.
  • the terminal if there is no record of successful positioning, it indicates that the terminal is always in a place where the satellite signal is weak, and the terminal is determined to be in scene 1; if the positioning is successful, the current speed of the terminal is less than the preset speed, and the terminal is determined.
  • the session is in progress, the terminal enters the area where the satellite signal is weak at a lower speed; there is a record of successful positioning, and the current speed of the terminal is greater than or equal to the preset speed, indicating the session process, the terminal Enter the area where the satellite signal is weak at a faster speed and determine that the terminal is in scene 3.
  • Step 314 Adjust the working state of the GPS module according to the working scenario of the terminal.
  • a method for setting an operating parameter of a GPS module according to an embodiment of the present invention includes:
  • Step 402 Acquire information about the success of the recorded positioning, and the terminal speed.
  • step 404 it is the scenario 3 (ie, the third work scenario).
  • the process ends. If the determination result is no, the process proceeds to step 406.
  • step 406 it is the scene 2 (ie, the second work scene). If the determination result is yes, the process proceeds to step 408. If the determination result is no, the process proceeds to step 410.
  • step 408 the buffer time T2 (ie, the preset time) is set.
  • step 410 it is determined whether it is scene 1 (ie, the first work scene). If the determination result is yes, the process proceeds to step 412. When the determination result is no, the process ends.
  • Step 412 Adjusting the reporting time of the GPS module to a set value, that is, increasing the interval time for the GPS module to report the positioning information from the first time to the second time.
  • step 414 the light sensor and the speed sensor are turned on. Specifically, the current ambient brightness is detected by the light sensor, and the current speed of the terminal is detected by the speed sensor.
  • FIG. 5 is a flow chart showing a control method of an operating state of a GPS module according to an embodiment of the present invention. As shown in FIG. 5, a method for controlling an operating state of a GPS module according to an embodiment of the present invention includes:
  • step 502 the GPS module reports data or reports data to the sensor.
  • step 504 it is determined whether the data is reported by the sensor. When it is determined that the sensor reports the data, the process proceeds to step 510. If it is determined that the sensor is not reporting the data, and it is determined that the sensor reports the data, the process proceeds to step 506.
  • Step 506 determining whether the duration (that is, increasing the interval time of the GPS module's reported positioning information from the first time to the duration of the second time) reaches a set value (instant long threshold), and reaches a set value in the determination duration.
  • the process proceeds to step 508, when it is determined that the duration has not reached the set value, the process proceeds to step 506 to determine.
  • step 508 the GPS module is turned off.
  • Step 510 Determine whether the ambient brightness or the terminal speed reaches the set value. When the ambient brightness or the terminal speed reaches the set value, the process proceeds to step 512. Otherwise, the process ends.
  • step 512 the GPS module switches to the normal mode, that is, the interval time for reporting the positioning information of the GPS module is reduced from the second time to the first time.
  • FIG. 6 is a block diagram showing the structure of a control device of a GPS module according to an embodiment of the present invention.
  • a control device 600 of a GPS module according to an embodiment of the present invention includes a determining unit 602, an obtaining unit 604, and a control unit 606.
  • the determining unit 602 is configured to determine whether the positioning information reported by the GPS module satisfies a first preset condition when the GPS module of the terminal is used for positioning, and the obtaining unit 604 is configured to: if the determining unit 602 determines the GPS module And obtaining the current working scenario of the terminal, where N is a positive integer; the control unit 606 is configured to: according to the current working scenario, the positioning information that is reported in the N times The working state of the GPS module is controlled.
  • the terminal if the positioning information reported by the GPS module for N consecutive times satisfies the first preset condition, the terminal is currently in the area where the signal is relatively poor, and the working state of the GPS module is controlled according to the current working scene of the terminal, thereby avoiding When the GPS module performs positioning, it consumes a large amount of power of the terminal, thereby improving the endurance of the terminal. At the same time, the GPS module is kept in a working state, and the terminal cannot stand by, thereby avoiding the temperature of the terminal being too high.
  • the obtaining unit 604 includes: a determining subunit 6042, configured to determine whether the GPS module is the application in the most recent positioning record of the application currently requested to be located.
  • the determining unit 604 is configured to determine that the current working scene is the first working scene if the determining sub-unit 6042 determines that the record does not exist; the determining unit 602 is further configured to The determining sub-unit 6042 determines that the record exists, and when the current speed of the terminal is less than the preset speed, determining that the current working scene is the second working scene, and the current speed of the terminal is greater than or equal to the preset speed.
  • determining that the current working scenario is a third working scenario.
  • the working state of the GPS module is optimized to avoid the GPS module being in a real-time state and causing the terminal's endurance capability. Relatively low. Or the speed of the terminal is relatively slow, indicating that the terminal still needs a long time to get rid of the poor signal area, and then optimize the working state of the GPS module to avoid the real-time positioning of the GPS module and the endurance of the terminal. low.
  • control unit 606 is configured to: if the current working scenario is the first working scenario or the second working scenario, the interval time for reporting the positioning information by the GPS module is The first time is increased to the second time, and/or the GPS module is controlled to be in a stopped state. If the current working scenario is the third working scenario, the working state of the GPS module is kept unchanged.
  • the technical solution by increasing the interval time for the GPS module to report the positioning information, the number of times the GPS module is positioned in a poor signal area is reduced, or the GPS module is controlled to be in a stopped state, thereby preventing the GPS module from being in a working state. Excessive power consumption.
  • control unit 606 is specifically configured to: if the interval time for reporting the positioning information by the GPS module is increased from the first time to the second time, When the interval time for reporting the positioning information by the GPS module is maintained, when the duration of the second time reaches the duration threshold, the GPS module is controlled to be in a stopped state.
  • the signal of the area where the terminal is located is still weak, and the GPS module is controlled to stop working, thereby avoiding The GPS module is in operation and consumes too much power.
  • control unit 606 is further configured to report the positioning information to the GPS module when the current ambient brightness and/or the current speed of the terminal meets the second preset condition. The interval is reduced from the second time to the first time.
  • the current ambient brightness and/or the current speed of the terminal meets the second preset condition, for example, the current ambient brightness is greater than the preset brightness, indicating that the terminal has been from a darker environment (eg, a tunnel)
  • the terminal can normally perform positioning, and then the interval time for reporting the positioning information by the GPS module is restored to the first time, so that the GPS module can work normally.
  • the current speed of the terminal is greater than the preset speed, indicating that the terminal is separated from the current signal by a relatively fast speed, which means that the terminal is likely to reach a relatively good signal area soon, then the GPS will be The interval at which the module reports the positioning information is restored to the first time, so that the GPS module can perform the positioning work normally.
  • the method further includes: a counting unit 608, configured to count down the preset time; and in the counting unit 608 After the preset time is counted down, the control unit 606 is specifically configured to increase the interval time for reporting the positioning information by the GPS module from the first time to the second time.
  • the interval time for reporting the positioning information by the GPS module is adjusted after the preset time is counted down, thereby avoiding the terminal after the interval is adjusted immediately. In the case where the signal is in a good area, the terminal cannot perform normal positioning.
  • FIG. 7 shows a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • a terminal 700 according to an embodiment of the present invention includes the control device 600 of the GPS module according to any one of the above aspects. Therefore, the terminal 700 has any one of the above technical solutions. The same technical effects of the control device 600 of the GPS module will not be described herein.
  • FIG. 8 is a block diagram showing the structure of a terminal according to another embodiment of the present invention.
  • a terminal 800 in accordance with another embodiment of the present invention includes a memory 802, a processor 804, and a communication bus 806.
  • Communication bus 806 is used to implement connection communication between processor 804 and memory 802.
  • the memory 802 may be a high speed RAM (Random Access Memory) or a non-volatile memory such as at least one disk memory.
  • the processor 804 includes a CPU (Central Processing Unit).
  • the processor 804 performs the following steps: when the positioning is performed by using the GPS module of the terminal 800, determining whether the positioning information reported by the GPS module meets the first preset condition; The current working scenario of the terminal 800 is obtained by the GPS module, and the current working scenario of the terminal 800 is obtained, where N is a positive integer; according to the current working scenario, the GPS module is The working state is controlled.
  • the processor 804 is specifically configured to: determine, in the most recent positioning records of the application currently requesting positioning, whether there is a record that the GPS module locates successfully for the application; if the record does not exist, Determining that the current working scenario is the first working scenario; if the recording is present, determining that the current working scenario is the second working scenario when the current speed of the terminal 800 is less than the preset speed, where the terminal 800 is When the current speed is greater than or equal to the preset speed, the current working scene is determined to be the third working scene.
  • the processor 804 is configured to: if the current working scenario is the first working scenario or the second working scenario, increase the interval for reporting the positioning information by the GPS module from the first time to the second time, And/or controlling the GPS module to be in a stopped state; if the current working scenario is a third working scenario, maintaining the working state of the GPS module unchanged.
  • the processor 804 is specifically configured to: when the interval time for reporting the positioning information by the GPS module is increased from the first time to the second time, maintaining an interval interval between the positioning information of the GPS module When the duration of the second time reaches the duration threshold, the GPS module is controlled to be in a stopped state.
  • the processor 804 is further configured to: when the current ambient brightness and/or the current speed of the terminal 800 meets the second preset condition, the interval time for reporting the positioning information by the GPS module from the second time Reduce to the first time.
  • the processor 804 is further configured to count down the preset time; after counting the preset time, report the positioning of the GPS module.
  • the interval of information is increased from the first time to the second time.
  • the technical solution of the present invention is described in detail above with reference to the accompanying drawings.
  • the technical solution of the present invention can reasonably control the GPS module to improve the endurance of the terminal and avoid excessive temperature of the terminal.

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)
  • Navigation (AREA)

Abstract

一种GPS模块的控制方法、控制装置和终端,其中,所述GPS模块的控制方法包括:在使用终端的GPS模块进行定位时,确定所述GPS模块上报的定位信息是否满足第一预设条件(102);若所述GPS模块连续N次上报的定位信息均满足所述第一预设条件,则获取所述终端的当前工作场景,其中,N为正整数(104);根据所述当前工作场景,对所述GPS模块的工作状态进行控制(106)。通过所述GPS模块的控制方法,可以合理地对GPS模块进行控制,以提升终端的续航能力和避免终端温度过高。

Description

GPS模块的控制方法、控制装置和终端
本申请要求于2016年10月20日提交中国专利局,申请号为201610921108.3、发明名称为“GPS模块的控制方法、控制装置和终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及终端技术领域,具体而言,涉及一种GPS模块的控制方法、一种GPS模块的控制装置和一种终端。
背景技术
目前大部分终端都配备了GPS模块,GPS(Global Positioning System,全球定位系统)模块的定位功能在日常生活中给人们带来了极大的方便。但繁多的、杂乱的应用程序使用GPS模块来获取用户的位置信息,将大幅度的降低终端的电池续航。尤其在室内等GPS信号很弱的场景,这时候使用GPS模块,不仅会消耗大量的电量,降低终端的续航能力,还导致终端无法正常待机,造成终端的温度过高的情况。
因此,如何合理地对GPS模块进行控制,以提升终端的续航能力和避免终端温度过高成为亟待解决的技术问题。
发明内容
本发明正是基于上述问题,提出了一种新的技术方案,可以合理地对GPS模块进行控制,以提升终端的续航能力和避免终端温度过高。
有鉴于此,本发明的第一方面提出了一种GPS模块的控制方法,包括:在使用终端的GPS模块进行定位时,确定所述GPS模块上报的定位信息是否满足第一预设条件;若所述GPS模块连续N次上报的定位信息均满足所述第一预设条件,则获取所述终端的当前工作场景,其中,N为正整数;根据所述当前工作场景,对所述GPS模块的工作状态进行控制。
在该技术方案中,若GPS模块连续N次上报的定位信息均满足第一预设条件,说明终端当前在信号比较差的区域内,则根据终端的当前工作场景控制GPS模块的工作状态,避免GPS模块进行定位时消耗终端大量的电量,从而提升终端的续航能力。同时避免GPS模块一直处于工作状态而导致终端无法待机,从而避免终端的温度过高。
其中,GPS模块上报的定位信息包括但不限于:载噪比和/或信噪比,第一预设条件包括:所有卫星的载噪比均小于设定值N0、和/或所有卫星的信噪比均小于设定值N1。在满足第一预设条件时,说明终端当前处于信号比较差的位置。
在上述任一技术方案中,优选地,所述获取所述终端的当前工作场景的步骤,具体包括:判断当前请求定位的应用程序的最近多次的定位记录中,是否存在所述GPS模块为所述应用程序定位成功的记录;若不存在所述记录,则确定所述当前工作场景为第一工作场景;若存在所述记录,则在所述终端的当前速度小于预设速度时,确定所述当前工作场景为第二工作场景,在所述终端的当前速度大于或等于预设速度时,确定所述当前工作场景为第三工作场景。
在该技术方案中,当终端在信号比较差的区域内时,若GPS模块未定位成功,则对GPS模块的工作状态进行优化处理,以避免GPS模块实时处于定位的状态而导致终端的续航能力比较低。或者终端的速度比较慢,说明终端还需要很长的时间才能脱离信号比较差的区域,则对GPS模块的工作状态进行优化处理,以避免GPS模块实时处于定位的状态而导致终端的续航能力比较低。
在上述任一技术方案中,优选地,所述根据所述当前工作场景,对所述GPS模块的工作状态进行控制的步骤,具体包括:若所述当前工作场景为第一工作场景或者第二工作场景,则将所述GPS模块上报定位信息的间隔时间从第一时间增大到第二时间,和/或控制所述GPS模块处于停止工作的状态;若所述当前工作场景为第三工作场景,则保持所述GPS模块的工作状态不变。
在该技术方案中,通过增大GPS模块上报定位信息的间隔时间,以减少GPS模块在信号较差的区域定位的次数,或者控制GPS模块处于停止工作的状态,从而避免GPS模块处于工作状态而消耗过多的电量。
在上述任一技术方案中,优选地,若将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间,则在所述GPS模块上报定位信息的间隔时间保持在所述第二时间的持续时长达到时长阈值时,控制所述GPS模块处于停止工作的状态。
在该技术方案中,在GPS模块上报定位信息的间隔时间保持在第二时间的持续时长达到时长阈值时,说明终端所在区域的信号依然很弱,则控制GPS模块处于停止工作的状态,从而避免GPS模块处于工作状态而消耗过多的电量。
在上述任一技术方案中,优选地,还包括:在当前的环境亮度和/或所述终端的当前速度满足第二预设条件时,将所述GPS模块上报定位信息的间隔时间从所述第二时间降低到所述第一时间。
在该技术方案中,在当前的环境亮度和/或终端的当前速度满足第二预设条件时,例如,当前的环境亮度大于预设的亮度,说明终端已经从较暗的环境(例如隧道)重新回到正常的亮度,也就说明终端可以正常进行定位,则将GPS模块上报定位信息的间隔时间恢复到第一时间,以使GPS模块能够正常工作。再例如,终端的当前速度大于预设的速度,说明终端以较快的速度脱离当前信号比较差的区域,也就说明终端很有可能会很快就能达到信号比较好的区域,则将GPS模块上报定位信息的间隔时间恢复到第一时间,以使GPS模块能够正常进行定位工作。
在上述任一技术方案中,优选地,在获取到所述当前工作场景为所述第二工作场景的情况下,还包括:倒计时预设时间;在倒计时所述预设时间之后,将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间。
在该技术方案中,若存在定位成功的记录,但是终端的当前速度比较慢,则在倒计时预设时间之后才调节GPS模块上报定位信息的间隔时间,从而避免了在立即调节间隔时间之后终端就进入信号比较好的区域的情况下,终端无法进行正常定位。
本发明的第二方面提出了一种GPS模块的控制装置,包括:确定单元,设置为在使用终端的GPS模块进行定位时,确定所述GPS模块上报的定位信息是否满足第一预设条件;获取单元,设置为若所述确定单元确定所述GPS模块连续N次上报的定位信息均满足所述第一预设条件,则获取所述终端的当前工作场景,其中,N为正整数;控制单元,设置为根据所述当前工作场景,对所述GPS模块的工作状态进行控制。
在该技术方案中,若GPS模块连续N次上报的定位信息均满足第一预设条件,说明终端当前在信号比较差的区域内,则根据终端的当前工作场景控制GPS模块的工作状态,避免GPS模块进行定位时消耗终端大量的电量,从而提升终端的续航能力。同时避免GPS模块一直处于工作状态而导致终端无法待机,从而避免终端的温度过高。
在上述技术方案中,优选地,所述获取单元包括:判断子单元,设置为判断当前请求定位的应用程序的最近多次的定位记录中,是否存在所述GPS模块为所述应用程序定位成功的记录;确定子单元,设置为若所述判断子单元判定不存在所述记录,则确定所述当前工作场景为第一工作场景;所述确定单元,还设置为若所述判断子单元判定存在所述记录,则在所述终端的当前速度小于预设速度时,确定所述当前工作场景为第二工作场景,在所述终端的当前速度大于或等于预设速度时,确定所述当前工作场景为第三工作场景。
在该技术方案中,当终端在信号比较差的区域内时,若GPS模块未定位成功,则对GPS模块的工作状态进行优化处理,以避免GPS模块实时处于定位的状态而导致终端的续航能力比较低。或者终端的速度比较慢,说明终端还需要很长的时间才能脱离信号比较差的区域,则对GPS模块的工作状态进行优化处理,以避免GPS模块实时处于定位的状态而导致终端的续航能力比较低。
在上述任一技术方案中,优选地,所述控制单元具体设置为,若所述当前工作场景为第一工作场景或者第二工作场景,则将所述GPS模块上报定位信息的间隔时间从第一时间增大到第二时间,和/或控制所述GPS模块处于停止工作的状态,若所述当前工作场景为第三工作场景,则保持所述GPS模块的工作状态不变。
在该技术方案中,通过增大GPS模块上报定位信息的间隔时间,以减少GPS模块在信号较差的区域定位的次数,或者控制GPS模块处于停止工作的状态,从而避免GPS模块处于工作状态而消耗过多的电量。
在上述任一技术方案中,优选地,所述控制单元具体设置为,若将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间,则在所述GPS模块上报定位信息的间隔时间保持在所述第二时间的持续时长达到时长阈值时,控制所述GPS模块处于停止工作的状态。
在该技术方案中,在GPS模块上报定位信息的间隔时间保持在第二时间的持续时长达到时长阈值时,说明终端所在区域的信号依然很弱,则控制GPS模块处于停止工作的状态,从而避免GPS模块处于工作状态而消耗过多的电量。
在上述任一技术方案中,优选地,所述控制单元还设置为,在当前的环境亮度和/或所述终端的当前速度满足第二预设条件时,将所述GPS模块上报定位信息的间隔时间从所述第二时间降低到所述第一时间。
在该技术方案中,在当前的环境亮度和/或终端的当前速度满足第二预设条件时,例如,当前的环境亮度大于预设的亮度,说明终端已经从较暗的环境(例如隧道)重新回到正常的亮度,也就说明终端可以正常进行定位,则将GPS模块上报定位信息的间隔时间恢复到第一时间,以使GPS模块能够正常工作。再例如,终端的当前速度大于预设的速度,说明终端以较快的速度脱离当前信号比较差的区域,也就说明终端很有可能会很快就能达到信号比较好的区域,则将GPS模块上报定位信息的间隔时间恢复到第一时间,以使GPS模块能够正常进行定位工作。
在上述任一技术方案中,优选地,在获取到所述当前工作场景为所述第二工作场景的情况下,还包括:倒计时单元,设置为倒计时预设时间;在所述倒计时单元倒计时所述预设时间之后,所述控制单元具体设置为,将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间。
在该技术方案中,若存在定位成功的记录,但是终端的当前速度比较慢,则在倒计时预设时间之后才调节GPS模块上报定位信息的间隔时间,从而避免了在立即调节间隔时间之后终端就进入信号比较好的区域的情况下,终端无法进行正常定位。
本发明的第三方面提出了一种终端,包括上述技术方案中任一项所述的GPS模块的控制装置,因此,该终端具有和上述技术方案中任一项所述的GPS模块的控制装置相同的技术效果,在此不再赘述。
通过本发明的技术方案,可以合理地对GPS模块进行控制,以提升终端的续航能力和避免终端温度过高。
附图说明
图1示出了根据本发明的一个实施例的GPS模块的控制方法的流程示意图;
图2示出了根据本发明的另一个实施例的GPS模块的控制方法的流程示意图;
图3示出了根据本发明的实施例的终端的当前工作场景的获取方法的流程示意图;
图4示出了根据本发明的实施例的GPS模块的工作参数的设置方法的流程示意图;
图5示出了根据本发明的实施例的GPS模块的工作状态的控制方法的流程示意图;
图6示出了根据本发明的一个实施例的GPS模块的控制装置的结构示意图;
图7示出了根据本发明的一个实施例的终端的结构示意图;
图8示出了根据本发明的另一个实施例的终端的结构示意图。
具体实施方式
为了可以更清楚地理解本发明的上述目的、特征和优点,下面结合附图和具体实施方式对本发明进行进一步的详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是,本发明还可以采用其他不同于在此描述的其他方式来实施,因此,本发明的保护范围并不受下面公开的具体实施例的限制。
图1示出了根据本发明的一个实施例的GPS模块的控制方法的流程示意图。
如图1所示,根据本发明的一个实施例的GPS模块的控制方法,包括:
步骤102,在使用终端的GPS模块进行定位时,确定所述GPS模块上报的定位信息是否满足第一预设条件。
步骤104,若所述GPS模块连续N次上报的定位信息均满足所述第一预设条件,则获取所述终端的当前工作场景,其中,N为正整数。
步骤106,根据所述当前工作场景,对所述GPS模块的工作状态进行控制。
在该技术方案中,若GPS模块连续N次上报的定位信息均满足第一预设条件,说明终端当前在信号比较差的区域内,则根据终端的当前工作场景控制GPS模块的工作状态,避免GPS模块进行定位时消耗终端大量的电量,从而提升终端的续航能力。同时避免GPS模块一直处于工作状态而导致终端无法待机,从而避免终端的温度过高。
其中,GPS模块上报的定位信息包括但不限于:载噪比(CNR,Carrier to Noise Ratio)和/或信噪比(SNR,Signal to Noise Ratio),第一预设条件包括:所有卫星的载噪比均小于设定值N0、和/或所有卫星的信噪比均小于设定值N1。在满足第一预设条件时,说明终端当前处于信号比较差的位置。
在上述任一技术方案中,优选地,所述获取所述终端的当前工作场景的步骤,具体包括:判断当前请求定位的应用程序的最近多次的定位记录中,是否存在所述GPS模块为所述应用程序定位成功的记录;若不存在所述记录,则确定所述当前工作场景为第一工作场景;若存在所述记录,则在所述终端的当前速度小于预设速度时,确定所述当前工作场景为第二工作场景,在所述终端的当前速度大于或等于预设速度时,确定所述当前工作场景为第三工作场景。
在该技术方案中,当终端在信号比较差的区域内时,若GPS模块未定位成功,则对GPS模块的工作状态进行优化处理,以避免GPS模块实时处于定位的状态而导致终端的续航能力比较低。或者终端的速度比较慢,说明终端还需要很长的时间才能脱离信号比较差的区域,则对GPS模块的工作状态进行优化处理,以避免GPS模块实时处于定位的状态而导致终端的续航能力比较低。
在上述任一技术方案中,优选地,步骤106具体包括:若所述当前工作场景为第一工作场景或者第二工作场景,则将所述GPS模块上报定位信息的间隔时间从第一时间增大到第二时间,和/或控制所述GPS模块处于停止工作的状态;若所述当前工作场景为第三工作场景,则保持所述GPS模块的工作状态不变。
在该技术方案中,通过增大GPS模块上报定位信息的间隔时间,以减少GPS模块在信号较差的区域定位的次数,或者控制GPS模块处于停止工作的状态,从而避免GPS模块处于工作状态而消耗过多的电量。
在上述任一技术方案中,优选地,若将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间,则在所述GPS模块上报定位信息的间隔时间保持在所述第二时间的持续时长达到时长阈值时,控制所述GPS模块处于停止工作的状态。
在该技术方案中,在GPS模块上报定位信息的间隔时间保持在第二时间的持续时长达到时长阈值时,说明终端所在区域的信号依然很弱,则控制GPS模块处于停止工作的状态,从而避免GPS模块处于工作状态而消耗过多的电量。
在上述任一技术方案中,优选地,还包括:在当前的环境亮度和/或所述终端的当前速度(也可以是终端的加速度)满足第二预设条件时,将所述GPS模块上报定位信息的间隔时间从所述第二时间降低到所述第一时间。
在该技术方案中,在当前的环境亮度和/或终端的当前速度满足第二预设条件时,例如,当前的环境亮度大于预设的亮度,说明终端已经从较暗的环境(例如隧道)重新回到正常的亮度,也就说明终端可以正常进行定位,则将GPS模块上报定位信息的间隔时间恢复到第一时间,以使GPS模块能够正常工作。再例如,终端的当前速度大于预设的速度,说明终端以较快的速度脱离当前信号比较差的区域,也就说明终端很有可能会很快就能达到信号比较好的区域,则将GPS模块上报定位信息的间隔时间恢复到第一时间,以使GPS模块能够正常进行定位工作。
在上述任一技术方案中,优选地,在获取到所述当前工作场景为所述第二工作场景的情况下,还包括:倒计时预设时间;在倒计时所述预设时间之后,将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间。
在该技术方案中,若存在定位成功的记录,但是终端的当前速度比较慢,则在倒计时预设时间之后才调节GPS模块上报定位信息的间隔时间,从而避免了在立即调节间隔时间之后终端就进入信号比较好的区域的情况下,终端无法进行正常定位。
下面通过一个实施例来进一步说明上述技术方案。
场景:终端当前在室内,且终端中的应用程序请求GPS模块进行定位。
优化步骤包括:
(1)获取GPS模块上报的定位信息,该定位信息包括卫星信号质量SNR值、是否定位成功和终端的当前速度。
(2)检测所有卫星信号SNR值是否为0。
(3)若连续检测到60次所有卫星信号SNR值都为0,判断本次会话过程有没有定位成功,若本次会话过程没有定位成功,则判定终端处于室内,并且是第一工作场景,需要立即优化GPS模块的工作状态。
(4)调整GPS模块上报时间为25s,设定维持时间为1分钟。
(5)开启光线传感器和速度传感器检测,并设定光线传感器的数据变化阀值为200lux,加速度传感器数据变化为10m/s2
(6)若此时光线传感器与加速度传感器检测到的数值一直未达到以上的阀值,并且GPS模块上报时间为25s的持续时长超过1分钟,则关闭GPS模块;若此时光线传感器检测到的环境亮度大于200lux或者加速度传感器检测到的加速度大于10m/s2,则将GPS模块的工作方式立即切换至正常工作方式,即将GPS上报时间恢复到调整前的初始值。
图2示出了根据本发明的另一个实施例的GPS模块的控制方法的流程示意图。如图2所示,根据本发明的另一个实施例的GPS模块的控制方法,包括:
步骤202,获取GPS模块上报的定位信息。
步骤204,根据GPS模块上报的定位信息,判断是否需要优化,在判定需要优化时,进入步骤206,在判定不需要优化时,进入步骤208。
步骤206,结合传感器数据调整GPS模块工作模式。
步骤208,正常处理,即保持GPS模块的工作状态不变。
图3示出了根据本发明的实施例的终端的当前工作场景的获取方法的流程示意图。如图3所示,根据本发明的实施例的终端的当前工作场景的获取方法,包括:
步骤302,获取GPS模块上报的定位信息。
步骤304,记录相关信息,包括卫星的SNR值、定位成功与否、终端速度。
步骤306,判断是否定位成功,在判定定位成功时,执行正常处理的流程,在判定未定位成功时,进入步骤308。
步骤308,判断所有卫星的SNR值是否小于设定值N1,在判定所有卫星的SNR值均小于设定值N1时,进入步骤310,在判定所有卫星的SNR值并不是均小于设定值时,执行正常处理的流程。其中,若本次定位到的所有卫星的SNR值均小于设定值,则确定本次定位到的数据有效。
步骤310,判断数据有效的次数是否已达到设定值(即上述中的N),若数据有效的次数已达到设定值,则执行步骤312,若数据有效的次数未达到设定值,则结束本次流程。
步骤312,根据记录的定位成功信息,速度信息确定终端的当前工作场景。
具体地,若没有定位成功的记录,说明本次会话过程,终端一直处于卫星信号很弱的地方,则确定终端处于场景1;有定位成功的记录,终端的当前速度小于预设速度,确定终端处于场景2,说明本次会话过程,终端以较低的速度进入到卫星信号很弱的区域;有定位成功的记录,并且终端的当前速度大于或等于预设速度,说明本次会话过程,终端以较快的速度进入卫星信号很弱的区域,确定终端处于场景3。
步骤314,根据终端的工作场景,调整GPS模块的工作状态。
图4示出了根据本发明的实施例的GPS模块的工作参数的设置方法的流程示意图。如图4所示,根据本发明的实施例的GPS模块的工作参数的设置方法,包括:
步骤402,获取记录的定位成功与否的信息、终端速度。
步骤404,是否为场景3(即第三工作场景),在判断结果为是时,结束本次流程,在判断结果为否时,进入步骤406。
步骤406,是否为场景2(即第二工作场景),在判断结果为是时,进入步骤408,在判断结果为否时,进入步骤410。
步骤408,设置缓冲时间T2(即预设时间)。
步骤410,判断是否为场景1(即第一工作场景),在判断结果为是时,进入步骤412,在判断结果为否时,结束本次流程。
步骤412,调整GPS模块上报时间为设定值,即将GPS模块上报定位信息的间隔时间从第一时间增大到第二时间。
步骤414,开启光线传感器和速度传感器检测,具体地,通过光线传感器检测当前的环境亮度,通过速度传感器检测终端的当前速度。
图5示出了根据本发明的实施例的GPS模块的工作状态的控制方法的流程示意图。如图5所示,根据本发明的实施例的GPS模块的工作状态的控制方法,包括:
步骤502,GPS模块上报数据或传感器上报数据。
步骤504,判断是否为传感器上报数据,在判定为传感器上报数据时,进入步骤510,在判定不是传感器上报数据,在判定为传感器上报数据时,进入步骤506。
步骤506,判断持续时间(即将GPS模块的上报定位信息的间隔时间从第一时间增大到第二时间的持续时间)是否达到设定值(即时长阈值),在判定持续时间达到设定值时,进入步骤508,在判定持续时间未达到设定值时,重新进入步骤506进行判断。
步骤508,关闭GPS模块。
步骤510,判断环境亮度或终端速度是否达到设定值,在环境亮度或终端速度达到设定值时,进入步骤512,否则,结束本次流程。
步骤512,GPS模块切换至正常模式,即将GPS模块的上报定位信息的间隔时间从第二时间降低到第一时间。
图6示出了根据本发明的一个实施例的GPS模块的控制装置的结构示意图。如图6所示,根据本发明的一个实施例的GPS模块的控制装置600,包括:确定单元602、获取单元604和控制单元606。
确定单元602,设置为在使用终端的GPS模块进行定位时,确定所述GPS模块上报的定位信息是否满足第一预设条件;获取单元604,设置为若所述确定单元602确定所述GPS模块连续N次上报的定位信息均满足所述第一预设条件,则获取所述终端的当前工作场景,其中,N为正整数;控制单元606,设置为根据所述当前工作场景,对所述GPS模块的工作状态进行控制。
在该技术方案中,若GPS模块连续N次上报的定位信息均满足第一预设条件,说明终端当前在信号比较差的区域内,则根据终端的当前工作场景控制GPS模块的工作状态,避免GPS模块进行定位时消耗终端大量的电量,从而提升终端的续航能力。同时避免GPS模块一直处于工作状态而导致终端无法待机,从而避免终端的温度过高。
在上述技术方案中,优选地,所述获取单元604包括:判断子单元6042,设置为判断当前请求定位的应用程序的最近多次的定位记录中,是否存在所述GPS模块为所述应用程序定位成功的记录;确定子单元6044,设置为若所述判断子单元6042判定不存在所述记录,则确定所述当前工作场景为第一工作场景;所述确定单元602还设置为,若所述判断子单元6042判定存在所述记录,则在所述终端的当前速度小于预设速度时,确定所述当前工作场景为第二工作场景,在所述终端的当前速度大于或等于预设速度时,确定所述当前工作场景为第三工作场景。
在该技术方案中,当终端在信号比较差的区域内时,若GPS模块未定位成功,则对GPS模块的工作状态进行优化处理,以避免GPS模块实时处于定位的状态而导致终端的续航能力比较低。或者终端的速度比较慢,说明终端还需要很长的时间才能脱离信号比较差的区域,则对GPS模块的工作状态进行优化处理,以避免GPS模块实时处于定位的状态而导致终端的续航能力比较低。
在上述任一技术方案中,优选地,所述控制单元606具体设置为,若所述当前工作场景为第一工作场景或者第二工作场景,则将所述GPS模块上报定位信息的间隔时间从第一时间增大到第二时间,和/或控制所述GPS模块处于停止工作的状态,若所述当前工作场景为第三工作场景,则保持所述GPS模块的工作状态不变。
在该技术方案中,通过增大GPS模块上报定位信息的间隔时间,以减少GPS模块在信号较差的区域定位的次数,或者控制GPS模块处于停止工作的状态,从而避免GPS模块处于工作状态而消耗过多的电量。
在上述任一技术方案中,优选地,所述控制单元606具体设置为,若将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间,则在所述GPS模块上报定位信息的间隔时间保持在所述第二时间的持续时长达到时长阈值时,控制所述GPS模块处于停止工作的状态。
在该技术方案中,在GPS模块上报定位信息的间隔时间保持在第二时间的持续时长达到时长阈值时,说明终端所在区域的信号依然很弱,则控制GPS模块处于停止工作的状态,从而避免GPS模块处于工作状态而消耗过多的电量。
在上述任一技术方案中,优选地,所述控制单元606还设置为,在当前的环境亮度和/或所述终端的当前速度满足第二预设条件时,将所述GPS模块上报定位信息的间隔时间从所述第二时间降低到所述第一时间。
在该技术方案中,在当前的环境亮度和/或终端的当前速度满足第二预设条件时,例如,当前的环境亮度大于预设的亮度,说明终端已经从较暗的环境(例如隧道)重新回到正常的亮度,也就说明终端可以正常进行定位,则将GPS模块上报定位信息的间隔时间恢复到第一时间,以使GPS模块能够正常工作。再例如,终端的当前速度大于预设的速度,说明终端以较快的速度脱离当前信号比较差的区域,也就说明终端很有可能会很快就能达到信号比较好的区域,则将GPS模块上报定位信息的间隔时间恢复到第一时间,以使GPS模块能够正常进行定位工作。
在上述任一技术方案中,优选地,在获取到所述当前工作场景为所述第二工作场景的情况下,还包括:倒计时单元608,设置为倒计时预设时间;在所述倒计时单元608倒计时所述预设时间之后,所述控制单元606具体设置为,将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间。
在该技术方案中,若存在定位成功的记录,但是终端的当前速度比较慢,则在倒计时预设时间之后才调节GPS模块上报定位信息的间隔时间,从而避免了在立即调节间隔时间之后终端就进入信号比较好的区域的情况下,终端无法进行正常定位。
图7示出了根据本发明的一个实施例的终端的结构示意图。如图7所示,根据本发明的一个实施例的终端700,包括上述技术方案中任一项所述的GPS模块的控制装置600,因此,该终端700具有和上述技术方案中任一项所述的GPS模块的控制装置600相同的技术效果,在此不再赘述。
图8示出了根据本发明的另一个实施例的终端的结构示意图。如图8所示,根据本发明的另一个实施例的终端800,包括存储器802、处理器804和通信总线806。通信总线806用于实现处理器804和存储器802之间的连接通信。存储器802可以是高速RAM(Random Access Memory,随机存储器),也可以是非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。处理器804包括CPU(Central Processing Unit,中央处理器)。其中,通过调用存储器802中存储的指令,来使处理器804执行如下步骤:在使用终端800的GPS模块进行定位时,确定所述GPS模块上报的定位信息是否满足第一预设条件;若所述GPS模块连续N次上报的定位信息均满足所述第一预设条件,则获取所述终端800的当前工作场景,其中,N为正整数;根据所述当前工作场景,对所述GPS模块的工作状态进行控制。
优选地,处理器804具体用于,判断当前请求定位的应用程序的最近多次的定位记录中,是否存在所述GPS模块为所述应用程序定位成功的记录;若不存在所述记录,则确定所述当前工作场景为第一工作场景;若存在所述记录,则在所述终端800的当前速度小于预设速度时,确定所述当前工作场景为第二工作场景,在所述终端800的当前速度大于或等于预设速度时,确定所述当前工作场景为第三工作场景。
优选地,处理器804具体用于,若所述当前工作场景为第一工作场景或者第二工作场景,则将所述GPS模块上报定位信息的间隔时间从第一时间增大到第二时间,和/或控制所述GPS模块处于停止工作的状态;若所述当前工作场景为第三工作场景,则保持所述GPS模块的工作状态不变。
优选地,处理器804具体用于,若将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间,则在所述GPS模块上报定位信息的间隔时间保持在所述第二时间的持续时长达到时长阈值时,控制所述GPS模块处于停止工作的状态。
优选地,处理器804还用于,在当前的环境亮度和/或所述终端800的当前速度满足第二预设条件时,将所述GPS模块上报定位信息的间隔时间从所述第二时间降低到所述第一时间。
优选地,在获取到所述当前工作场景为所述第二工作场景的情况下,处理器804还用于,倒计时预设时间;在倒计时所述预设时间之后,将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间。
以上结合附图详细说明了本发明的技术方案,通过本发明的技术方案,可以合理地对GPS模块进行控制,以提升终端的续航能力和避免终端温度过高。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (13)

  1. 一种GPS模块的控制方法,其特征在于,包括:
    在使用终端的GPS模块进行定位时,确定所述GPS模块上报的定位信息是否满足第一预设条件;
    若所述GPS模块连续N次上报的定位信息均满足所述第一预设条件,则获取所述终端的当前工作场景,其中,N为正整数;
    根据所述当前工作场景,对所述GPS模块的工作状态进行控制。
  2. 根据权利要求1所述的GPS模块的控制方法,其特征在于,所述获取所述终端的当前工作场景的步骤,具体包括:
    判断当前请求定位的应用程序的最近多次的定位记录中,是否存在所述GPS模块为所述应用程序定位成功的记录;
    若不存在所述记录,则确定所述当前工作场景为第一工作场景;
    若存在所述记录,则在所述终端的当前速度小于预设速度时,确定所述当前工作场景为第二工作场景,在所述终端的当前速度大于或等于预设速度时,确定所述当前工作场景为第三工作场景。
  3. 根据权利要求2所述的GPS模块的控制方法,其特征在于,所述根据所述当前工作场景,对所述GPS模块的工作状态进行控制的步骤,具体包括:
    若所述当前工作场景为第一工作场景或者第二工作场景,则将所述GPS模块上报定位信息的间隔时间从第一时间增大到第二时间,和/或控制所述GPS模块处于停止工作的状态;
    若所述当前工作场景为第三工作场景,则保持所述GPS模块的工作状态不变。
  4. 根据权利要求3所述的GPS模块的控制方法,其特征在于,
    若将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间,则在所述GPS模块上报定位信息的间隔时间保持在所述第二时间的持续时长达到时长阈值时,控制所述GPS模块处于停止工作的状态。
  5. 根据权利要求3所述的GPS模块的控制方法,其特征在于,还包括:
    在当前的环境亮度和/或所述终端的当前速度满足第二预设条件时,将所述GPS模块上报定位信息的间隔时间从所述第二时间降低到所述第一时间。
  6. 根据权利要求3至5中任一项所述的GPS模块的控制方法,其特征在于,在获取到所述当前工作场景为所述第二工作场景的情况下,还包括:
    倒计时预设时间;
    在倒计时所述预设时间之后,将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间。
  7. 一种GPS模块的控制装置,其特征在于,包括:
    确定单元,设置为在使用终端的GPS模块进行定位时,确定所述GPS模块上报的定位信息是否满足第一预设条件;
    获取单元,设置为若所述确定单元确定所述GPS模块连续N次上报的定位信息均满足所述第一预设条件,则获取所述终端的当前工作场景,其中,N为正整数;
    控制单元,设置为根据所述当前工作场景,对所述GPS模块的工作状态进行控制。
  8. 根据权利要求7所述的GPS模块的控制装置,其特征在于,所述获取单元包括:
    判断子单元,设置为判断当前请求定位的应用程序的最近多次的定位记录中,是否存在所述GPS模块为所述应用程序定位成功的记录;
    确定子单元,设置为若所述判断子单元判定不存在所述记录,则确定所述当前工作场景为第一工作场景;
    所述确定单元,还设置为若所述判断子单元判定存在所述记录,则在所述终端的当前速度小于预设速度时,确定所述当前工作场景为第二工作场景,在所述终端的当前速度大于或等于预设速度时,确定所述当前工作场景为第三工作场景。
  9. 根据权利要求8所述的GPS模块的控制装置,其特征在于,所述控制单元具体设置为,若所述当前工作场景为第一工作场景或者第二工作场景,则将所述GPS模块上报定位信息的间隔时间从第一时间增大到第二时间,和/或控制所述GPS模块处于停止工作的状态,
    若所述当前工作场景为第三工作场景,则保持所述GPS模块的工作状态不变。
  10. 根据权利要求9所述的GPS模块的控制装置,其特征在于,所述控制单元具体设置为,若将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间,则在所述GPS模块上报定位信息的间隔时间保持在所述第二时间的持续时长达到时长阈值时,控制所述GPS模块处于停止工作的状态。
  11. 根据权利要求9所述的GPS模块的控制装置,其特征在于,所述控制单元还设置为,在当前的环境亮度和/或所述终端的当前速度满足第二预设条件时,将所述GPS模块上报定位信息的间隔时间从所述第二时间降低到所述第一时间。
  12. 根据权利要求9至11中任一项所述的GPS模块的控制装置,其特征在于,在获取到所述当前工作场景为所述第二工作场景的情况下,还包括:
    倒计时单元,设置为倒计时预设时间;
    在所述倒计时单元倒计时所述预设时间之后,所述控制单元具体设置为,将所述GPS模块上报定位信息的间隔时间从所述第一时间增大到所述第二时间。
  13. 一种终端,其特征在于,包括:如权利要求7至11中任一项所述的GPS模块的控制装置。
PCT/CN2016/107805 2016-10-20 2016-11-30 Gps模块的控制方法、控制装置和终端 WO2018072260A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610921108.3A CN106546999A (zh) 2016-10-20 2016-10-20 Gps模块的控制方法、控制装置和终端
CN201610921108.3 2016-10-20

Publications (1)

Publication Number Publication Date
WO2018072260A1 true WO2018072260A1 (zh) 2018-04-26

Family

ID=58392436

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/107805 WO2018072260A1 (zh) 2016-10-20 2016-11-30 Gps模块的控制方法、控制装置和终端

Country Status (2)

Country Link
CN (1) CN106546999A (zh)
WO (1) WO2018072260A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109239749A (zh) * 2018-08-22 2019-01-18 深圳普创天信科技发展有限公司 定位方法、终端及计算机可读存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360550B (zh) 2017-08-22 2020-07-03 京东方科技集团股份有限公司 共享车辆的功耗控制方法及装置、共享车辆

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104066163A (zh) * 2014-04-24 2014-09-24 深圳市研强通信技术有限公司 功耗节省装置、移动终端和功耗节省方法
CN104822133A (zh) * 2015-04-22 2015-08-05 广东欧珀移动通信有限公司 一种智能终端的定位模式的控制方法及装置
CN105682198A (zh) * 2016-01-13 2016-06-15 广东欧珀移动通信有限公司 一种移动终端的定位控制方法、装置及移动终端
CN105866806A (zh) * 2016-03-25 2016-08-17 广东欧珀移动通信有限公司 一种gps模块控制的方法、装置及移动终端
CN106019330A (zh) * 2016-05-18 2016-10-12 Tcl移动通信科技(宁波)有限公司 一种基于移动终端的gps节能控制方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8908570B2 (en) * 2008-02-01 2014-12-09 BlackBerrry Limited Control signal management system and method
JP2010281734A (ja) * 2009-06-05 2010-12-16 Sony Corp 測位装置、測位方法、プログラム
CN103365399B (zh) * 2013-06-26 2017-02-08 贝壳网际(北京)安全技术有限公司 移动终端应用对象的控制方法及装置
CN104837117A (zh) * 2015-05-18 2015-08-12 严文发 一种定位终端定位方法和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104066163A (zh) * 2014-04-24 2014-09-24 深圳市研强通信技术有限公司 功耗节省装置、移动终端和功耗节省方法
CN104822133A (zh) * 2015-04-22 2015-08-05 广东欧珀移动通信有限公司 一种智能终端的定位模式的控制方法及装置
CN105682198A (zh) * 2016-01-13 2016-06-15 广东欧珀移动通信有限公司 一种移动终端的定位控制方法、装置及移动终端
CN105866806A (zh) * 2016-03-25 2016-08-17 广东欧珀移动通信有限公司 一种gps模块控制的方法、装置及移动终端
CN106019330A (zh) * 2016-05-18 2016-10-12 Tcl移动通信科技(宁波)有限公司 一种基于移动终端的gps节能控制方法及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109239749A (zh) * 2018-08-22 2019-01-18 深圳普创天信科技发展有限公司 定位方法、终端及计算机可读存储介质

Also Published As

Publication number Publication date
CN106546999A (zh) 2017-03-29

Similar Documents

Publication Publication Date Title
WO2017215262A1 (zh) 一种基于屏幕补光的拍照方法及系统
WO2017034275A1 (ko) 이차 전지의 충전 조건 조정 장치 및 방법
WO2014005266A1 (zh) 一种终端设备的定位方法及装置
WO2018072260A1 (zh) Gps模块的控制方法、控制装置和终端
WO2020218826A1 (ko) 배터리의 미분 전압 커브를 결정하기 위한 장치 및 방법과, 상기 장치를 포함하는 배터리 팩
WO2018090431A1 (zh) 画面亮度调整方法及画面亮度调整装置
WO2015062220A1 (zh) 一种多类型无线链路并行传输的方法和系统
WO2015169119A1 (zh) 电子设备的通知消息的同步方法及服务器、电子设备
WO2014065602A1 (en) Apparatus and method for controlling operation mode in a wireless terminal
WO2017088549A1 (zh) 一种预留智能终端电池电量的实现方法及系统
WO2014126365A1 (en) Terminal apparatus and method for time synchronization
WO2018076434A1 (zh) 声音信号的输出方法及装置、耳机状态的检测方法及装置
WO2018058835A1 (zh) 一种通话模式监控方法、系统及通信终端
WO2017152641A1 (zh) 增强网络信号的系统及其增强网络信号的方法
WO2017133264A1 (zh) 一种调度指令的检测方法和终端
WO2016123898A1 (zh) 一种短信管理方法及其移动终端
WO2017181686A1 (zh) 一种移动终端视频通讯中画面角度自动修正方法及系统
EP2751666A1 (en) Terminal and application management method thereof
WO2015169123A1 (zh) 电子设备的通知消息的同步方法及电子设备
WO2015041464A1 (ko) 무선 단말의 전력 소모를 제어하는 방법 및 장치
WO2018018819A1 (zh) 应用程序的管理方法、管理装置及终端
WO2011144077A2 (zh) 点对点文件传输的方法及装置
WO2017143795A1 (zh) 一种根据闹钟时间优化推送信息时间的方法及系统
WO2016119106A1 (zh) 一种耳机降噪方法及装置
WO2012070900A2 (ko) 개인 장치간 이벤트 및 데이터 공유 시스템

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16919105

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16919105

Country of ref document: EP

Kind code of ref document: A1