Positioning information reporting method, electronic device and computer readable storage medium

By combining a cycle timer and an acceleration sensor in an electronic device, the motion state of the device is judged and positioned, the problem of the state of the device being unable to effectively judge when the device is moving at a constant speed or slow motion in the prior art is solved, and the integrity and timeliness of positioning information reporting are achieved.

CN120075727APending Publication Date: 2025-05-30NANNING FUGUI PRECISION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311581343.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The prior art cannot effectively determine whether the device is in a state of motion when moving at a constant speed or slow movement, resulting in the lack of positioning information reporting and untimely tracking.

Method used

By combining the cycle timer and the acceleration sensor in the electronic device, it is determined whether the acceleration sensor generates an interrupt when the timer expires, and whether the cell identification changes when no interrupt is generated, so as to determine the motion state of the device and position it.

Benefits of technology

It is possible to accurately judge the movement status of the device when it moves at a constant speed or slow movement, ensure the integrity and timeliness of positioning information reporting, and optimize the frequency of positioning information reporting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075727A_ABST
    Figure CN120075727A_ABST
Patent Text Reader

Abstract

A positioning information reporting method is applied to an electronic device, the electronic device comprises a cycle timer and an acceleration sensor, and the method comprises the following steps: judging whether the cycle timer expires; if the cycle timer expires, judging whether the acceleration sensor generates interruption or not; if the acceleration sensor is interrupted, positioning through a positioning technology; if the acceleration sensor is not interrupted, judging whether a cell identifier is changed or not; and when the cell identifier changes, carrying out positioning through a positioning technology. The invention further provides an electronic device and a computer readable storage medium. The method can compensate the defect that whether the equipment is in a static state or a motion state cannot be judged through the acceleration sensor, and optimizes the reporting frequency of the positioning information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a positioning technology, and more particularly to a method for reporting positioning information, an electronic device, and a computer-readable storage medium. Background Art

[0002] When a device is in motion, it is necessary to perform positioning to know the movement trajectory of the device. The device uses an acceleration sensor to determine whether it is in a moving state. However, when the device is moving at a constant speed or the movement is slow, the acceleration sensor does not generate an interruption. Therefore, it is impossible to determine whether the device is in a stationary state or a moving state through the acceleration sensor, and it is impossible to report positioning information based on whether there is an interruption of the acceleration sensor.

[0003] That is to say, if the device is moving at a constant speed and the acceleration sensor cannot detect it, the device does not perform positioning, resulting in partial loss of the device positioning trajectory and untimely tracking problems. Summary of the Invention

[0004] In view of the above, it is necessary to provide a method for reporting positioning information, an electronic device, and a computer-readable storage medium, which can compensate for the deficiency of being unable to determine whether the device is in a stationary state or a moving state through the acceleration sensor.

[0005] An embodiment of the present invention provides a method for reporting positioning information, which is applied to an electronic device. The electronic device includes a cyclic timer and an acceleration sensor. The method includes: determining whether the cyclic timer has expired; if the cyclic timer has expired, determining whether the acceleration sensor generates an interruption; if the acceleration sensor generates an interruption, performing positioning through a positioning technology; if the acceleration sensor does not generate an interruption, determining whether the cell identifier has changed; and when the cell identifier has changed, performing positioning through a positioning technology.

[0006] An embodiment of the present invention also provides an electronic device. The electronic device includes a memory, a processor, and a positioning information reporting program stored in the memory and executable on the processor. The electronic device further includes a cyclic timer and an acceleration sensor. When the positioning information reporting program is executed by the processor, the following steps are implemented: determining whether the cyclic timer has expired; if the cyclic timer has expired, determining whether the acceleration sensor generates an interruption; if the acceleration sensor generates an interruption, performing positioning through a positioning technology; if the acceleration sensor does not generate an interruption, determining whether the cell identifier has changed; and when the cell identifier has changed, performing positioning through a positioning technology.

[0007] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the positioning information reporting method described above are implemented.

[0008] Compared with the prior art, for the positioning information reporting method, the electronic device and the computer-readable storage medium, it is determined whether the cyclic timer expires; if the cyclic timer expires, it is determined whether the acceleration sensor generates an interruption; if the acceleration sensor generates an interruption, positioning is performed by a positioning technology; if the acceleration sensor does not generate an interruption, it is determined whether the cell identifier changes; and when the cell identifier changes, positioning is performed by a positioning technology. In this way, it is possible to distinguish whether the device is in a moving state or a stationary state by detecting the change of the cell identifier of the base station obtained by the device, which can compensate for the deficiency that the acceleration sensor cannot determine whether the device is in a stationary state or a moving state, and optimize the reporting frequency of the positioning information. Description of the Drawings

[0009] Figure 1 It is a program module diagram of a preferred embodiment of the electronic device of the present invention.

[0010] Figure 2 It is a flowchart of the positioning information reporting method according to a preferred embodiment of the present invention.

[0011] Main Element Symbol Description

[0012] Electronic device 10

[0013] Memory 20

[0014] Processor 30

[0015] Judgment module 101

[0016] Positioning module 102

[0017] Steps S20 to S28

[0018] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. Specific Embodiments

[0019] Refer to Figure 1As shown, it is a program module diagram of a preferred embodiment of the electronic device 10 of the present invention. The electronic device 10 includes a judgment module 101 and a positioning module 102. The electronic device 10 further includes a memory 20 and a processor 30. The judgment module 101 and the positioning module 102 of the present invention are computer program segments for completing a specific instruction. The memory 20 is used to store data such as program codes of the electronic device 10. The processor 30 is used to execute the program codes stored in the memory 20. The electronic device 10 further includes a cyclic timer and an acceleration sensor (not shown in the figure).

[0020] Among them, the memory 20 includes at least one type of storage medium, and the storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disc, etc. The processor 30 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips, etc.

[0021] The judgment module 101 is used to judge whether the cyclic timer expires.

[0022] When the electronic device 10 is powered on, the cyclic timer is started. For power saving, the cyclic timer is set with a preset timing period. For example, the preset timing period can be set to 3 minutes, 5 minutes or 10 minutes. Of course, developers can also set it to other time periods according to actual needs.

[0023] The judgment module 101 is further used to judge whether the acceleration sensor generates an interruption when the cyclic timer expires.

[0024] For example, when the timing period is set to 3 minutes, the cyclic timer expires every 3 minutes, and the judgment module 101 judges whether the acceleration sensor generates an interruption.

[0025] When the electronic device 10 moves, acceleration will be generated, and the acceleration sensor will generate an interruption. Therefore, once it is detected that the acceleration sensor generates an interruption, the judgment module 101 can judge that the electronic device 10 is moving.

[0026] The positioning module 102 is used to perform positioning through positioning technology after the judgment module 101 judges that the acceleration sensor generates an interruption.

[0027] In this embodiment, the positioning technology includes GPS positioning and WiFi positioning. Generally, GPS positioning is used outdoors, and when indoors, GPS positioning and WiFi are required for assisted positioning.

[0028] The determination module 101 is further configured to determine whether the cell identifier (cell id) changes when the acceleration sensor does not generate an interruption.

[0029] When the electronic device 10 moves, an acceleration is generated and the acceleration sensor generates an interruption. However, when the electronic device moves at a constant speed or moves slightly, the acceleration does not change. Therefore, the acceleration sensor does not generate an interruption. Thus, relying solely on the interruption of the acceleration sensor cannot sense the movement of the electronic device 10, that is, no positioning information report will be generated.

[0030] In this embodiment, the positioning module 102 is further configured to perform positioning through the positioning technology when the cell identifier changes.

[0031] The electronic device 10 further includes a database, which is used to store the cell identifier of the electronic device.

[0032] The determination module 101 is further configured to: obtain the cell identifier (cell id) of the electronic device, compare the obtained cell identifier with a preset number of cell identifiers stored in the database. When the obtained cell identifier is different from all of the preset number of cell identifiers, it is determined that the cell identifier of the electronic device has changed, thereby determining that the position of the electronic device has changed, and notifying the positioning module 102 to start the positioning technology for positioning. The determination module 101 is further configured to: when at least one of the obtained cell identifier and the preset number of cell identifiers is the same, it is determined that the cell identifier of the electronic device has not changed, thereby determining that the position of the electronic device has not changed, and not notifying the positioning module 102 to start positioning.

[0033] The determination module 101 is further configured to obtain the cell identifier of the electronic device 10 and store the obtained cell identifier in the database. The database is further used to store the acquisition time corresponding to the cell identifier of the electronic device.

[0034] Specifically, the determination module 101 obtains the cell identifier of the electronic device 10 by obtaining the network configuration parameters of the electronic device 10, and can obtain the cell identifier of the electronic device 10 according to the base station information in the network configuration parameters.

[0035] The determination module 101 is further configured to determine whether there is a record in the database that is the same as the obtained cell identifier; if so, it is not necessary to update the obtained cell identifier to the database. If not, it is determined whether there are a preset number (for example, 3) of cell identifiers in the database; if there are fewer than the preset number (for example, 3) of cell identifiers, the obtained cell identifier and the corresponding acquisition time are stored in the database.

[0036] Further, the determination module 101 is further configured to, if there are a preset number (for example, 3) of cell identifiers, replace the cell identifier with the earliest acquisition time among the preset number of cell identifiers with the obtained cell identifier, and store the obtained cell identifier and the corresponding acquisition time in the database.

[0037] For example, when the preset number is set to 3, the determination module 101 obtains the cell identifier and compares the obtained cell identifier with the cell identifiers stored in the database. When there is a cell identifier in the database that is the same as the obtained cell identifier, this cell identifier does not need to be stored, nor does it need to notify the positioning module 102 to perform positioning. When there is no cell identifier in the database that is the same as the obtained cell identifier, it is determined the number of cell identifiers existing in the database. When the number of cell identifiers existing in the database is less than 3, the obtained cell identifier is stored in the database. When the number of cell identifiers existing in the database is equal to 3, the obtained cell identifier is used to replace the cell identifier with the earliest acquisition time among the 3 cell identifiers in the database, and the positioning module 102 is notified to perform positioning.

[0038] In this embodiment, it is determined whether the cyclic timer expires; if the cyclic timer expires, it is determined whether the acceleration sensor is interrupted; if the acceleration sensor generates an interruption, positioning is performed through positioning technology; if the acceleration sensor does not generate an interruption, it is determined whether the cell identifier has changed; and when the cell identifier has changed, positioning is performed through positioning technology. In this way, it is possible to distinguish whether the device is in a moving state or a stationary state by the change of the obtained base station cell id, which can compensate for the deficiency that the acceleration sensor cannot determine whether the device is in a stationary state or a moving state, and optimize the reporting frequency of positioning information.

[0039] Refer to Figure 2 shown, which is a flowchart of a positioning information reporting method according to a preferred embodiment of the present invention. The positioning information reporting method is applied to the electronic device 10 and can be implemented by executing the Figure 1 modules 101 to 102 shown. The electronic device 10 includes a cyclic timer, an acceleration sensor, and a database.

[0040] Step S20: Determine whether the loop timer has expired. When the loop timer expires, execute Step S22.

[0041] When the electronic device 10 is powered on, the loop timer is started. To save power, the loop timer is set with a preset timing period. For example, the preset timing period can be set to 3 minutes, 5 minutes, or 10 minutes. Of course, developers can also set it to other time periods according to actual needs.

[0042] Step S22: Determine whether the acceleration sensor generates an interruption. After the acceleration sensor generates an interruption, execute Step S24. When the acceleration sensor does not generate an interruption, execute Step S26.

[0043] For example, when the timing period is set to 3 minutes, the loop timer expires every 3 minutes, and the electronic device 10 determines whether the acceleration sensor is interrupted.

[0044] When the electronic device 10 moves, it will generate acceleration, and the acceleration sensor will generate an interruption. Therefore, once it is detected that the acceleration sensor generates an interruption, it can be determined that the electronic device 10 is moving.

[0045] Step S24: Perform positioning through positioning technology.

[0046] If the acceleration sensor is interrupted, the electronic device 10 performs positioning through positioning technology. In this embodiment, the positioning technology includes GPS positioning and WiFi positioning. Generally, GPS is used for positioning outdoors, and indoors, GPS positioning and WiFi are required for assisted positioning.

[0047] Step S26: Determine whether the cell identifier (cell id) has changed. When the cell identifier has changed, execute Step S28.

[0048] When the electronic device 10 moves, it will generate acceleration, and the acceleration sensor will generate an interruption. However, when the electronic device moves at a constant speed or moves slightly, the acceleration does not change. Therefore, the acceleration sensor does not generate an interruption, and thus the movement of the electronic device 10 cannot be sensed solely by the interruption of the acceleration sensor, that is, no positioning information will be reported.

[0049] Step S28: Perform positioning through positioning technology.

[0050] In this embodiment, the database is used to store the cell identifier of the electronic device. Specifically, Step S26 includes:

[0051] Obtain the cell identifier of the electronic device, and compare the obtained cell identifier with the preset number of cell identifiers stored in the database. When the obtained cell identifier is not the same as any of the preset number of cell identifiers, it is determined that the cell identifier of the electronic device has changed, and thus it is determined that the location of the electronic device has changed, and the positioning technology is started for positioning. When at least one of the obtained cell identifier is the same as the preset number of cell identifiers, it is determined that the cell identifier of the electronic device has not changed, and thus it is determined that the location of the electronic device has not changed, and the positioning technology is not started for positioning.

[0052] Before step S26, the method further includes: obtaining the cell identifier of the electronic device 10, and storing the obtained cell identifier in the database. The database is also used to store the acquisition time corresponding to the cell identifier of the electronic device 10.

[0053] Specifically, when the electronic device 10 is connected to the network, it obtains its own network configuration parameters, and the cell identifier of the electronic device 10 can be obtained according to the base station information in the network configuration parameters.

[0054] Specifically, the obtained cell identifier is stored in the database in the following manner:

[0055] Judge whether there is a record in the database that is the same as the obtained cell identifier; if so, it is not necessary to update the obtained cell identifier to the database. If not, judge whether there are a preset number (for example, 3) of cell identifiers in the database; if there are less than the preset number (for example, 3) of cell identifiers, store the obtained cell identifier and the corresponding acquisition time in the database. If there are a preset number (for example, 3) of cell identifiers, replace the cell identifier with the earliest acquisition time among the preset number of cell identifiers with the obtained cell identifier, and store the obtained cell identifier and the corresponding acquisition time in the database.

[0056] For example, when the preset number is set to 3, the electronic device 10 obtains the cell identifier and compares the obtained cell identifier with the cell identifiers stored in the database. When there is a cell identifier in the database that is the same as the obtained cell identifier, this cell identifier does not need to be stored, nor does it need to be positioned by the positioning technology. When there is no cell identifier in the database that is the same as the obtained cell identifier, judge the number of cell identifiers existing in the database. When the number of cell identifiers existing in the database is less than 3, store the obtained cell identifier in the database. When the number of cell identifiers existing in the database is equal to 3, replace the cell identifier with the earliest acquisition time among the 3 cell identifiers in the database with the obtained cell identifier, and perform positioning through the positioning technology.

[0057] In this embodiment, it is determined whether the cyclic timer expires; if the cyclic timer expires, it is determined whether the acceleration sensor generates an interruption; if the acceleration sensor generates an interruption, positioning is performed by means of a positioning technique; if the acceleration sensor does not generate an interruption, it is determined whether the cell identifier of the electronic device changes; and when the cell identifier of the electronic device changes, positioning is performed by means of a positioning technique. In this way, it is possible to distinguish whether the device is in a moving state or a stationary state by obtaining the change of the cell id of the base station, which can compensate for the deficiency that it is impossible to determine whether the device is in a stationary state or a moving state through the acceleration sensor, and optimize the reporting frequency of the positioning information.

[0058] This embodiment also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the positioning information reporting method described above are implemented.

[0059] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for reporting positioning information, which is applied to an electronic device, characterized in that, the electronic device includes a cyclic timer and an acceleration sensor, and the method includes: judging whether the cyclic timer expires; if the cyclic timer expires, judging whether the acceleration sensor generates an interruption; if the acceleration sensor generates an interruption, performing positioning by means of a positioning technique; if the acceleration sensor does not generate an interruption, judging whether the cell identifier of the electronic device changes; and when the cell identifier changes, performing positioning by means of a positioning technique.

2. The method for reporting positioning information according to claim 1, characterized in that, the electronic device further includes a database, and judging whether the cell identifier of the electronic device changes includes: acquiring the cell identifier of the electronic device; comparing the acquired cell identifier with a preset number of cell identifiers stored in the database; when the acquired cell identifier is different from all of the preset number of cell identifiers, judging that the cell identifier of the electronic device changes; and when the acquired cell identifier is the same as at least one of the preset number of cell identifiers, judging that the cell identifier of the electronic device does not change.

3. The method for reporting positioning information according to claim 2, characterized in that, before judging whether the cell identifier of the electronic device changes, the method further includes: acquiring the cell identifier of the electronic device; storing the acquired cell identifier into the database.

4. The method for reporting positioning information according to claim 3, characterized in that, storing the acquired cell identifier into the database includes: judging whether there is a record in the database that is the same as the acquired cell identifier; if so, there is no need to update the database; if not, judging whether there are a preset number of cell identifiers in the database; if there are fewer than the preset number of cell identifiers, storing the acquired cell identifier and the corresponding acquisition time into the database; if there are a preset number of cell identifiers, replacing the cell identifier with the earliest acquisition time among the preset number of cell identifiers with the acquired cell identifier, and storing the acquired cell identifier and the corresponding acquisition time into the database.

5. An electronic device, characterized in that, the electronic device includes a memory, a processor, and a positioning information reporting program stored on the memory and executable on the processor. The electronic device further includes a cyclic timer and an acceleration sensor. When the positioning information reporting program is executed by the processor, the following steps are implemented: judging whether the cyclic timer expires; if the cyclic timer expires, judging whether the acceleration sensor generates an interruption; if the acceleration sensor generates an interruption, performing positioning by means of a positioning technique; if the acceleration sensor does not generate an interruption, judging whether the cell identifier of the electronic device changes; and when the cell identifier changes, performing positioning by means of a positioning technique.

6. The electronic device according to claim 5, characterized in that, The electronic device further includes a database, and the judging whether the cell identifier of the electronic device has changed includes: Obtaining the cell identifier of the electronic device; Comparing the obtained cell identifier with a preset number of cell identifiers stored in the database; When the obtained cell identifier is different from all of the preset number of cell identifiers, it is judged that the cell identifier of the electronic device has changed; and When the obtained cell identifier is the same as at least one of the preset number of cell identifiers, it is judged that the cell identifier of the electronic device has not changed.

7. The electronic device according to claim 5, wherein before judging whether the cell identifier of the electronic device has changed, when the positioning information reporting program is executed by the processor, the following steps are implemented: Obtaining the cell identifier of the electronic device; Storing the obtained cell identifier into the database.

8. The electronic device according to claim 7, wherein the storing the obtained cell identifier into the database includes: Judging whether there is a record in the database that is the same as the obtained cell identifier; If so, there is no need to update the database; If not, judging whether there are a preset number of cell identifiers in the database; If there are fewer than the preset number of cell identifiers, storing the obtained cell identifier and the corresponding acquisition time into the database; If there are a preset number of cell identifiers, replacing the cell identifier with the earliest acquisition time among the preset number of cell identifiers with the obtained cell identifier, and storing the obtained cell identifier and the corresponding acquisition time into the database.

9. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the positioning information reporting method according to any one of claims 1 to 4 are implemented.