A mobile device positioning method, apparatus, device and storage medium
By setting vibration and positioning time intervals in mobile devices, positioning is only performed when conditions are met, thus solving the problem of power consumption and reduced battery life caused by frequent positioning of mobile devices and improving the device's battery life.
Patent Information
- Application Number
- CN202310008377.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-04
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-01-04
AI Technical Summary
Existing mobile devices frequently use location services, leading to abnormal power consumption and reduced battery life.
By detecting the vibration of the mobile device, vibration interval and positioning interval can be set, and positioning will only be performed when the vibration interval and positioning interval meet the conditions, thus avoiding frequent positioning.
It effectively reduces the power consumption of mobile devices and extends battery life, especially in usage scenarios such as children's smartwatches.
Smart Images

Figure CN116033358B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mobile device positioning, and in particular to a mobile device positioning method, device, equipment and storage medium. BACKGROUND
[0002] Child problems are a very hot topic all over the world. Every year, countries make some corresponding measures for child safety problems, but still cannot avoid the problem of children getting lost. With the rise of wearable devices, child smart watches, smart electronic student cards and other terminal devices are gradually rising in the market tide. The batteries of such electronic devices basically use lithium battery technology. At present, there is no great technical breakthrough in the field of lithium batteries. The extension of battery life means the increase of volume. As a child smart watch and smart electronic student card, the volume is already very limited, so the battery life has become a bottleneck.
[0003] The existing such electronic devices generally adopt a method of positioning at a fixed time or detecting positioning by vibration. When the positioning at a fixed time method is adopted, the problem of positioning at a fixed time even in a stationary state exists. The device basically does not send a position movement in a stationary state. The positioning in this case is meaningless and will cause abnormal power consumption of the device and reduce the battery life. When the vibration detection positioning method is adopted, the device does not position in a stationary state, but a short-time vibration occasionally occurs, which will cause the device to start positioning.
[0004] In the prior art, there is a problem of frequent positioning of a mobile electronic device causing abnormal power consumption of the device and reducing the battery life. SUMMARY
[0005] Therefore, the purpose of the present application is to provide a mobile device positioning method, device, equipment and storage medium to overcome the problem of frequent positioning of the current mobile device causing abnormal power consumption of the device and reducing the battery life.
[0006] To achieve the above purpose, the present application adopts the following technical solutions:
[0007] In a first aspect, the present application provides a mobile device positioning method, characterized in that it comprises:
[0008] detecting whether the mobile device has vibration;
[0009] if the mobile device has vibration, acquiring and storing the current vibration time of the mobile device;
[0010] judging whether the time difference between the current vibration time and the last vibration time stored by the mobile device is greater than a preset vibration time interval;
[0011] If the time difference is greater than the vibration time interval, it is determined whether the positioning time difference between the current vibration time and the last positioning time stored by the mobile device is greater than a preset positioning time interval.
[0012] If the positioning time difference is greater than the positioning time interval, the mobile device starts positioning and stores the current positioning time.
[0013] Further, the method described above, characterized in that if the time difference is greater than the vibration time interval, it is determined whether the positioning time difference between the current vibration time and the last positioning time stored by the mobile device is greater than a preset positioning time interval, comprising:
[0014] If the time difference is greater than the vibration time interval, it is determined that the vibration is a valid vibration, and the mobile device determines whether the number of valid vibrations within a preset time period is greater than a preset vibration number.
[0015] If the number of valid vibrations is greater than the preset vibration number, it is determined whether the positioning time difference between the current vibration time and the last positioning time stored by the mobile device is greater than a preset positioning time interval.
[0016] Further, the method described above, characterized in that if the positioning time difference is greater than the positioning time interval, the mobile device starts positioning and stores the current positioning time, comprising:
[0017] If the positioning time difference is greater than the positioning time interval, the mobile device starts WIFI positioning and stores the current positioning time.
[0018] Further, the method described above, characterized in that it further comprises:
[0019] Obtaining the WIFI positioning duration of the mobile device;
[0020] If the WIFI positioning duration exceeds a preset positioning duration, the mobile device starts GPS positioning and stores the current positioning time.
[0021] Further, the method described above, characterized in that it further comprises:
[0022] Obtaining the GPS positioning duration of the mobile device;
[0023] If the GPS positioning duration exceeds a preset GPS positioning duration, the mobile device starts base station positioning and stores the current positioning time.
[0024] Further, the method described above, characterized in that if the positioning time difference is greater than the positioning time interval, the mobile device starts WIFI positioning and stores the current positioning time, comprising:
[0025] If the positioning time difference is greater than the positioning time interval, the mobile device starts scanning WIFI hotspots;
[0026] determining whether the number of scanned WIFI hotspots is greater than a preset positioning number;
[0027] If the number of WIFI hotspots is less than the positioning number, the mobile device continues to scan WIFI hotspots;
[0028] If the number of WIFI hotspots is greater than the positioning number, it is determined whether the WIFI hotspots can obtain location information;
[0029] If yes, the mobile device starts positioning and stores the current positioning time.
[0030] Further, the method described above, characterized in that detecting whether the mobile device vibrates, comprising:
[0031] detecting whether the mobile device vibrates through at least one of the acceleration sensor, gyroscope and magnetometer of the mobile device.
[0032] In a second aspect, the application provides a mobile device positioning device, characterized by comprising:
[0033] a vibration detection module for detecting whether the mobile device vibrates;
[0034] a time acquisition module for acquiring and storing the current vibration time of the mobile device when the mobile device vibrates;
[0035] a vibration interval detection module for determining whether the time difference between the current vibration time and the last vibration time stored by the mobile device is greater than a preset vibration time interval;
[0036] a positioning interval detection module for determining whether the positioning time difference between the current vibration time and the last positioning time stored by the mobile device is greater than a preset positioning time interval when the time difference is greater than the vibration time interval;
[0037] a positioning module for starting positioning and storing the current positioning time when the positioning time difference is greater than the positioning time interval.
[0038] In a third aspect, the application provides a mobile device positioning device, characterized by comprising a processor and a memory, wherein the processor is connected with the memory.
[0039] The processor is configured to invoke and execute the program stored in the memory.
[0040] The memory is configured to store the program, and the program is configured to execute the positioning method of the mobile device.
[0041] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is configured to implement the positioning method of the mobile device when executed by a processor.
[0042] The present application has the following advantages:
[0043] The present application first detects whether the mobile device is shaken, and if the mobile device is shaken, the current shaking time of the mobile device is acquired and stored, and whether the time difference between the current shaking time and the last shaking time stored in the mobile device is greater than a preset shaking time interval is determined, and if the time difference is greater than the shaking time interval, whether the positioning time difference between the current shaking time and the last positioning time stored in the mobile device is greater than a preset positioning time interval is determined, and if the positioning time difference is greater than the positioning time interval, the mobile device starts positioning, and the current positioning time is stored, and in the present application, the minimum time interval of continuous positioning of the mobile device is set by setting the shaking time interval and the positioning time interval, thereby solving the problem of frequent positioning of the mobile device leading to abnormal power consumption of the device and reduction of the endurance time. BRIEF DESCRIPTION OF DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0045] Figure 1 is a flow chart provided by one embodiment of the positioning method of the mobile device of the present application;
[0046] Figure 2 is a structural schematic diagram provided by one embodiment of the positioning device of the mobile device of the present application;
[0047] Figure 3 is a structural schematic diagram provided by one embodiment of the positioning device of the mobile device of the present application. DETAILED DESCRIPTION
[0048] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described in detail below. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0049] Figure 1 is a flowchart provided by one embodiment of a mobile device positioning method of the present application. Please refer to Figure 1 , the embodiment can include the following steps:
[0050] S1, detecting whether the mobile device is shaken.
[0051] S2, if the mobile device is shaken, acquiring and storing the current shaking time of the mobile device.
[0052] S3, judging whether the time difference between the current shaking time and the last shaking time stored by the mobile device is greater than a preset shaking time interval.
[0053] S4, if the time difference is greater than the shaking time interval, judging whether the positioning time difference between the current shaking time and the last positioning time stored by the mobile device is greater than a preset positioning time interval.
[0054] S5, if the positioning time difference is greater than the positioning time interval, the mobile device starts positioning and stores the current positioning time.
[0055] It can be understood that the embodiment first detects whether the mobile device is shaken, if the mobile device is shaken, acquires and stores the current shaking time of the mobile device, judges whether the time difference between the current shaking time and the last shaking time stored by the mobile device is greater than a preset shaking time interval, if the time difference is greater than the shaking time interval, judges whether the positioning time difference between the current shaking time and the last positioning time stored by the mobile device is greater than a preset positioning time interval, if the positioning time difference is greater than the positioning time interval, the mobile device starts positioning and stores the current positioning time, in the present application, by setting the shaking time interval and the positioning time interval, the minimum time interval of continuous positioning of the mobile device is set, thereby solving the problem of abnormal power consumption and reduced endurance time of the device caused by frequent positioning of the mobile device.
[0056] In the specific practice, when the child wears the smart watch and runs outdoors, the smart watch frequently detects the vibration of the device, the vibration time of the smart watch is acquired in real time in the embodiment, then whether the vibration time interval exceeds the preset time interval is detected, when the preset time interval is exceeded, whether the current time and the last positioning time exceed the preset positioning time interval is detected, only when the preset positioning time interval is exceeded, positioning is performed, thereby avoiding that the smart watch frequently performs positioning when the child runs, and the device is abnormally powered and the endurance time is reduced.
[0057] It should be noted that in the embodiment, the vibration time interval and the positioning time interval can be set by the user according to the user's own needs.
[0058] Preferably, step S4 comprises:
[0059] If the time difference is greater than the vibration time interval, the vibration is judged as effective vibration, and the mobile device judges whether the number of effective vibrations in the preset time period is greater than the preset vibration number;
[0060] If the number of effective vibrations is greater than the preset vibration number, whether the positioning time difference between the current vibration time and the last positioning time stored by the mobile device is greater than the preset positioning time interval is judged.
[0061] It can be understood that, in order to prevent the mobile device from generating a vibration in the stationary state, the mobile device is positioned. In the embodiment, the number of vibrations of the device in the preset time period is also detected, and whether the device is in the motion state is judged by detecting the number of vibrations of the device in the preset time period. For example, when the child carries the smart watch and runs, the smart watch will frequently vibrate, and the smart watch judges that the user is in the motion state by detecting the number of vibrations in 1 minute; when the smart watch is placed on the desktop, the user accidentally pushes the table, thereby causing the smart watch to vibrate, the smart watch detects that the smart watch only vibrates once in 1 minute, which is less than the preset vibration number, and judges that the smart watch is in the stationary state and does not perform positioning.
[0062] Preferably, step S5 comprises:
[0063] If the positioning time difference is greater than the positioning time interval, the mobile device starts WIFI positioning, and stores the current positioning time.
[0064] Preferably, it further comprises:
[0065] The WIFI positioning time length of the mobile device is acquired;
[0066] If the WIFI positioning time length exceeds the preset positioning time length, the mobile device starts GPS positioning, and stores the current positioning time.
[0067] Preferably, the method further comprises:
[0068] acquiring a GPS positioning duration of the mobile device;
[0069] if the GPS positioning duration exceeds a preset GPS positioning duration, the mobile device starts base station positioning and stores a current positioning time.
[0070] It can be understood that in the embodiment, when the device needs to be positioned, WIFI positioning is first performed, and when the WIFI positioning time exceeds the preset time, it is determined that the WIFI positioning fails, and then GPS positioning is started. When the GPS positioning time exceeds the preset time, it is determined that the GPS positioning fails, and then base station positioning is started. In this way, the device is prevented from being in the WIFI positioning or GPS positioning for a long time, which causes abnormal power consumption of the device. In addition, the device is prevented from being in positioning for a long time without success.
[0071] Preferably, if the positioning time difference is greater than the positioning time interval, the mobile device starts WIFI positioning and stores a current positioning time, and the method comprises:
[0072] if the positioning time difference is greater than the positioning time interval, the mobile device starts scanning WIFI hotspots;
[0073] determining whether the number of scanned WIFI hotspots is greater than a preset positioning number;
[0074] if the number of WIFI hotspots is less than the positioning number, the mobile device continues to scan WIFI hotspots;
[0075] if the number of WIFI hotspots is greater than the positioning number, it is determined whether the WIFI hotspots can acquire location information;
[0076] if yes, the mobile device starts positioning and stores a current positioning time.
[0077] It can be understood that when WIFI positioning is performed, the device continuously scans WIFI hotspots within a preset positioning duration, and it is determined in real time whether the number of scanned WIFI hotspots is greater than a preset positioning number. Only when the number of WIFI hotspots is greater than the preset positioning number, it is determined whether the WIFI hotspots can acquire location information. When the WIFI hotspots can acquire location information, positioning is started. When the WIFI hotspots cannot acquire location information, the device continues to scan WIFI hotspots within the preset positioning duration, and the WIFI hotspots are re-determined according to the newly scanned WIFI hotspots until positioning is successful or the preset positioning duration is exceeded.
[0078] Preferably, step S1 comprises:
[0079] Detecting whether the vibration occurs through at least one of an acceleration sensor, a gyroscope and a magnetometer of the mobile device.
[0080] It can be understood that the detection through the multiple sensors can improve the sensitivity of the device.
[0081] The application further provides a mobile device positioning apparatus for implementing the method embodiments. Figure 2 is a structural schematic diagram provided by one embodiment of a mobile device positioning apparatus of the application. Figure 2 As shown in the figure, it comprises:
[0082] a vibration detection module 1 for detecting whether the vibration of the mobile device occurs;
[0083] a time acquisition module 2 for acquiring and storing the current vibration time of the mobile device when the vibration of the mobile device occurs;
[0084] a vibration interval detection module 3 for judging whether the time difference between the current vibration time and the last vibration time stored by the mobile device is greater than a preset vibration time interval;
[0085] a positioning interval detection module 4 for judging whether the positioning time difference between the current vibration time and the last positioning time stored by the mobile device is greater than a preset positioning time interval when the time difference is greater than the vibration time interval;
[0086] a positioning module 5 for starting positioning and storing the current positioning time when the positioning time difference is greater than the positioning time interval.
[0087] As to the apparatus in the above embodiments, the specific manner in which each module performs the operation has been described in detail in the embodiments of the method, and will not be described in detail here.
[0088] The application further provides a mobile device positioning apparatus for implementing the method embodiments. Figure 3 is a structural schematic diagram provided by one embodiment of a mobile device positioning apparatus of the application. Figure 3 As shown in the figure, the mobile device positioning apparatus of the embodiment comprises a processor 21 and a memory 22, and the processor 21 is connected with the memory 22. The processor 21 is used for calling and executing the program stored in the memory 22; the memory 22 is used for storing the program, and the program is used for at least executing the mobile device positioning method in the above embodiments.
[0089] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the mobile device positioning method in the above embodiments.
[0090] The specific implementation solutions provided by the embodiments of the present application can refer to the implementation manners of the mobile device positioning method of any of the above embodiments, which will not be described herein again.
[0091] It can be understood that the same or similar parts in the above embodiments can be mutually referred to, and the content not described in detail in some embodiments can be referred to the same or similar content in other embodiments.
[0092] It should be noted that, in the description of the present application, the terms "first", "second", etc. are only for the purpose of description, and cannot be understood as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise specified, the meaning of "a plurality of" is at least two.
[0093] Any process or method descriptions in flow charts or described herein otherwise can be understood as representing code modules, segments, or portions of code which include one or more executable instructions for performing specific logic functions (or steps) in the process, and that the various systems described herein can include memory that stores instructions (thus implementing, as examples, methods, components such as software modules, segments, etc.).
[0094] It should be understood that parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the above implementation, a plurality of steps or methods can be realized by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if realized by hardware, and as in another implementation, it can be realized by any one or a combination of the following technologies known in the art: discrete logic circuit with logic gate circuit for implementing logic function on data signal, application specific integrated circuit with suitable combination logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) and the like.
[0095] Those skilled in the art of the present technology can understand that all or part of the steps carried out by the above-mentioned embodiment method can be completed by a program instructing the relevant hardware, and the program can be stored in a computer readable storage medium, and when executed, includes one or a combination of the steps of the method embodiment.
[0096] In addition, each functional unit in each embodiment of the present application can be integrated in one processing module, or each unit can exist physically independently, or two or more units can be integrated in one module. The above integrated module can be realized in the form of hardware or in the form of a software function module. When the integrated module is realized in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
[0097] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0098] In the description of the present specification, the description referring to the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Also, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in an appropriate manner.
[0099] Although the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are exemplary, and are not to be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above-described embodiments within the scope of the present application.
Claims
1. A mobile device positioning method, characterized by, The method comprises the following steps: detecting whether the mobile device is shaken; if the mobile device is shaken, acquiring and storing the current shaking time of the mobile device; judging whether the time difference between the current shaking time and the last shaking time stored by the mobile device is greater than a preset shaking time interval; if the time difference is greater than the shaking time interval, judging that the shaking is valid shaking, and judging whether the number of valid shakings in a preset time period is greater than a preset shaking number by the mobile device; if the number of valid shakings is greater than the preset shaking number, judging whether the positioning time difference between the current shaking time and the last positioning time stored by the mobile device is greater than a preset positioning time interval; if the positioning time difference is greater than the positioning time interval, the mobile device starts positioning and stores the current positioning time.
2. The method of claim 1, wherein, The step of "if the positioning time difference is greater than the positioning time interval, the mobile device starts positioning and stores the current positioning time" comprises the following steps: if the positioning time difference is greater than the positioning time interval, the mobile device starts WIFI positioning and stores the current positioning time.
3. The method of claim 2, wherein, The method further comprises the following steps: acquiring the WIFI positioning duration of the mobile device; if the WIFI positioning duration exceeds a preset positioning duration, the mobile device starts GPS positioning and stores the current positioning time.
4. The method of claim 3, wherein, The method further comprises the following steps: acquiring the GPS positioning duration of the mobile device; if the GPS positioning duration exceeds a preset GPS positioning duration, the mobile device starts base station positioning and stores the current positioning time.
5. The method of claim 2, wherein, The step of "if the positioning time difference is greater than the positioning time interval, the mobile device starts WIFI positioning and stores the current positioning time" comprises the following steps: if the positioning time difference is greater than the positioning time interval, the mobile device starts scanning WIFI hotspots; judging whether the number of scanned WIFI hotspots is greater than a preset positioning number; if the number of WIFI hotspots is less than the positioning number, the mobile device continues to scan WIFI hotspots; if the number of WIFI hotspots is greater than the positioning number, judging whether the WIFI hotspots can acquire location information; if yes, the mobile device starts positioning and stores the current positioning time.
6. The method of claim 1, wherein, The step of "detecting whether the mobile device is shaken" comprises the following steps: detecting whether the mobile device is shaken by at least one of the acceleration sensor, the gyroscope and the magnetometer of the mobile device.
7. A mobile device positioning apparatus, characterized by The method comprises the following steps: a shaking detection module is configured to detect whether the mobile device is shaken; a time acquisition module is configured to acquire and store the current shaking time of the mobile device when the mobile device is shaken; a shaking interval detection module is configured to judge whether the time difference between the current shaking time and the last shaking time stored by the mobile device is greater than a preset shaking time interval; a positioning interval detection module is configured to judge that the shaking is valid shaking if the time difference is greater than the shaking time interval, and judge whether the number of valid shakings in a preset time period is greater than a preset shaking number by the mobile device. If the effective vibration number is greater than the preset vibration number, it is determined whether a positioning time difference between the current vibration time and a last positioning time stored by the mobile device is greater than a preset positioning time interval; The positioning module is configured to start positioning and store a current positioning time when the positioning time difference is greater than the positioning time interval.
8. A mobile device positioning system, characterized by The mobile device comprises a processor and a memory, and the processor is connected to the memory: The processor is configured to call and execute a program stored in the memory. The memory is configured to store the program, and the program is used at least for executing the positioning method of the mobile device according to any one of claims 1-6.
9. A computer readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to implement the method according to any one of claims 1-6.
Citation Information
Patent Citations
Positioning acquisition method, storage medium and intelligent equipment
CN108012239A
Method for updating positioning data, and mobile terminal
CN108337368A
Positioning module and method for electric power tool
CN111896979A