High-precision satellite navigation positioning method based on Android
By building an abstract intermediate communication interface and multi-source data fusion model, the problem of deep dependence of the Android kernel layer is solved, and the system compatibility and energy consumption management of high-precision satellite navigation positioning is realized, and the equipment's battery life and positioning stability are improved.
Patent Information
- Application Number
- CN202510698982.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-02
AI Technical Summary
The deep dependence of the prior art on the Android kernel layer leads to poor system adaptability, hardware differences increase the complexity of deployment and maintenance, and high-frequency data acquisition and real-time processing lead to serious competition for CPU resources, affecting device battery life and positioning stability.
Build an abstract intermediate communication interface between the application layer and the Android kernel layer, obtain multi-field navigation data through standardized satellite navigation driver module, perform batch buffer acquisition and timing processing, build a multi-source data fusion model, monitor CPU occupancy and energy consumption in real time, and dynamically adjust the sampling frequency and scheduling mechanism.
It improves system compatibility and adaptability, reduces maintenance costs, optimizes resource utilization efficiency, improves positioning accuracy and system operation reliability, and realizes intelligent management of energy consumption.
Smart Images

Figure CN120577840A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of positioning navigation and dead reckoning, and in particular to an Android-based high-precision satellite navigation positioning method. Background Art
[0002] Satellite navigation and positioning technology originated with the US Transit System in the 1960s. The Global Positioning System (GPS) was initially established in 1978, providing meter-level positioning services. The advent of carrier phase differential technology in the 1990s boosted accuracy to the centimeter level. In the early 21st century, multi-system compatibility and precise point positioning technologies further promoted the development of high-precision dynamic and static applications. Today, multi-source collaborative positioning technology, integrating satellite-based augmentation, inertial navigation, and AI algorithms, is driving satellite navigation towards millimeter-level accuracy and high reliability.
[0003] In the prior art, the announcement number is CN104236579B, and its name is a method for implementing high-precision satellite navigation positioning based on the Android kernel layer. The specific method of this invention includes: 1. Starting from the HAL layer of the standard Android operating system, the abstraction and encapsulation of the original positioning observation data of the lower-layer chip (or module) are added, and high-precision positioning extension interfaces and related callback function interfaces are added layer by layer upward, and a new batch of high-precision positioning application programming interfaces are set up in the application framework layer; 2. Precision single-point positioning, differential positioning, and real-time dynamic differential positioning are added to the HAL layer. This method allows Android third-party application developers to call the original standard satellite navigation general positioning API to obtain high-precision positioning results; call the API newly added in the Java framework layer of this method to obtain the original observation data output by the positioning hardware in the Java application layer, realizing customized high-precision positioning.
[0004] However, the above technical solutions have the following two technical shortcomings when applied to the logistics industry, especially in smart logistics and fleet management systems:
[0005] 1. Existing technologies rely heavily on the Android kernel layer, resulting in poor system adaptability. Hardware differences and kernel customization across devices increase the complexity of deployment and maintenance. Enterprises facing multiple devices and multiple scenarios need to expend significant resources on adaptation, and system upgrades also lack flexibility.
[0006] 2. High-frequency data collection and real-time processing lead to severe competition for CPU resources in terminal devices, significantly increasing power consumption, affecting device battery life and system efficiency in multi-tasking scenarios, and thus reducing positioning stability.
[0007] In summary, poor system compatibility limits the ability to optimize hardware performance, further amplifies resource contention and energy consumption issues, and makes it difficult to balance positioning accuracy and device load. This chain reaction leads to a decrease in system efficiency during use and seriously affects operational reliability.
[0008] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art. Summary of the Invention
[0009] The purpose of the present invention is to provide a high-precision satellite navigation and positioning method based on Android to solve the problems raised in the above background technology.
[0010] To achieve the above object, the present invention provides the following technical solutions:
[0011] A high-precision satellite navigation positioning method based on Android is applied to a terminal device with a vehicle-mounted navigation and positioning system. The specific steps include:
[0012] S1. Build an abstract intermediate communication interface between the application layer and the Android kernel layer in the vehicle navigation and positioning system to receive satellite navigation data;
[0013] S2. Calling a standardized satellite navigation driver module through the intermediate communication interface, wherein the driver module supports calling NMEA protocol data, RTCM differential correction data, and raw observation data;
[0014] S3. Batch buffering and timing processing of the received satellite navigation data, setting a dynamic sampling frequency and using a scheduling mechanism to control the data processing frequency;
[0015] S4. Build a multi-source data fusion model to fuse the buffered satellite navigation data with NMEA protocol data, RTCM differential correction data, and original observation data to generate high-precision position information;
[0016] At the same time, the CPU usage and energy consumption per unit positioning accuracy during the data fusion process are monitored in real time;
[0017] S5. Transmit the high-precision location information to the terminal device in real time, monitor the change in CPU occupancy and the energy consumption required for positioning accuracy during the data fusion process, and obtain the CPU active power consumption change ΔE cpu and the energy consumption change ΔE required for positioning accuracy p ;
[0018] Then according to the CPU active power consumption change ΔE cpuand the energy consumption change ΔE required for positioning accuracy p , and adjust the sampling frequency and scheduling mechanism based on the feedback information sent back by the terminal device.
[0019] Furthermore, the construction of an abstract intermediate communication interface between the application layer and the Android kernel layer includes:
[0020] Obtain multi-field satellite navigation data through the satellite navigation raw measurement interface provided by the Android system and convert it into a structured data format;
[0021] Establish a data callback mechanism, including synchronously delivering data change events to the application layer by registering a listening callback. The application layer receives and processes the updated data in real time in an asynchronous manner by binding the corresponding callback interface.
[0022] Furthermore, the calling of the standardized satellite navigation driver module includes:
[0023] Access the satellite navigation chipset through the hardware abstraction layer interface to obtain multi-band satellite observation data; standardize the format of NMEA protocol data, RTCM differential correction data and raw observation data.
[0024] Furthermore, the batch buffering and collecting of the received satellite navigation data includes:
[0025] Continuously receive the satellite navigation raw data output by the satellite navigation module by building a circular data buffer;
[0026] A batch threshold is preset. When the buffered data reaches the batch threshold, the fusion processing task is triggered to uniformly parse and filter the batch data that currently reaches the batch threshold.
[0027] Furthermore, the timing processing of the received satellite navigation data further includes:
[0028] Based on the terminal device's motion status, sampling frequency, and resource usage dynamics, a method combining experimental measurement, application demand analysis, and system resource optimization evaluation is used;
[0029] Calculate the trajectory change rate Gb of the terminal device in the current timing processing cycle, and compare and analyze the trajectory change rate Gb with the preset threshold R to determine the motion state of the vehicle corresponding to the terminal device;
[0030] The time intervals in the static state and the high-speed motion state are set respectively, including setting the time intervals in the static state and the high-speed motion state respectively; within this time interval, the system performs processing once in the static state and once in the high-speed motion state respectively.
[0031] Furthermore, the setting of the dynamic sampling frequency and the use of a scheduling mechanism to control the data processing frequency include:
[0032] Storing real-time satellite navigation data in a circular data buffer; adjusting the frequency of satellite navigation data acquisition in real time according to the motion state of the terminal device;
[0033] When the device is stationary or in a low-speed state, the sampling frequency is reduced to save energy. When a sudden speed change or increased trajectory deviation is detected, the sampling frequency is automatically increased.
[0034] Furthermore, the construction of the multi-source data fusion model includes:
[0035] A unified data fusion framework is established based on the extended Kalman filter algorithm. Based on the timestamp, the buffered satellite navigation data, the standard positioning data output by the NMEA protocol, the RTCM differential correction data and the original observation data are synchronously aligned and weightedly fused.
[0036] The input of the multi-source data fusion model includes the above-mentioned multi-source heterogeneous data, and the output is high-precision position information after error correction, state estimation and data filtering.
[0037] Furthermore, the CPU occupancy rate and energy consumption per unit positioning accuracy during the real-time monitoring data fusion process include:
[0038] After completing the generation of high-precision location information, the system further constructs a resource monitoring submodule to perform real-time resource occupancy monitoring of the multi-source data fusion process;
[0039] The resource monitoring submodule is used for CPU occupancy collection and positioning energy efficiency evaluation;
[0040] The CPU usage is collected based on the performance interface provided by the operating system layer. The CPU usage time of the data processing thread in each data fusion cycle is obtained, and the CPU usage is calculated based on the total duration of the evaluation cycle.
[0041] The positioning energy efficiency evaluation unit estimates the CPU power consumption during the evaluation period, including multiplying the processing time by the unit power consumption constant and combining it with the positioning accuracy index in the high-precision location information to calculate the energy consumption required for unit positioning accuracy.
[0042] Furthermore, the CPU occupancy rate and the energy consumption change of the unit positioning accuracy during the monitoring data fusion process are compared to obtain the CPU active power consumption change ΔE cpu and the energy consumption change ΔE required for positioning accuracy p ;include:
[0043] Extract the CPU energy consumption of the current timed processing cycle and the CPU energy consumption of the previous timed processing cycle, and perform correlation calculations to obtain the CPU active power consumption change ΔE cpu The specific calculation formula is as follows:
[0044]
[0045] in, Indicates the CPU energy consumption of the current timing processing cycle, Indicates the CPU energy consumption during the previous processing cycle. The CPU energy consumption is obtained by converting the thread running time and the power consumption factor per unit frequency.
[0046] At the same time, the calculation formula for the change in energy consumption required for unit positioning accuracy is:
[0047]
[0048] Among them, Pt and Pt-1 represent the positioning accuracy indicators output by the current timing processing cycle and the previous timing processing cycle respectively;
[0049] The two changes are CPU active power consumption change ΔE cpu and the energy consumption change ΔE required for positioning accuracy p It is used to determine the system energy consumption change trend and energy efficiency fluctuation characteristics, and then provide real-time feedback basis for sampling frequency adjustment and fusion model selection.
[0050] Furthermore, the dynamic sampling frequency and scheduling mechanism are adjusted according to the change in CPU active power consumption and the change in energy consumption required for positioning accuracy, combined with the feedback information sent back by the terminal device, including:
[0051] Get the vehicle running status information sent back by the terminal device; preset the first threshold CPU E Change in CPU active power consumption ΔE cpu Perform comparative evaluation and preset the second threshold value P E , and the change in energy consumption required for positioning accuracy ΔE p Conduct comparative assessments;
[0052] If the CPU active power consumption changes by ΔE during the timing processing period cpu Exceeds the first threshold, or the energy consumption change required for positioning accuracy ΔE p If the second threshold is exceeded, the sampling frequency and scheduling mechanism are adjusted according to the vehicle's driving status, including:
[0053] When the vehicle is stationary or running at low speed, the data sampling frequency is lowered, and the time interval of scheduled processing in the scheduling mechanism is increased to control the data processing frequency;
[0054] When the vehicle is in a high-speed driving state, the task scheduling priority and target positioning accuracy requirements are increased at this time, the data sampling frequency is increased, and the time interval of scheduled processing scheduling is shortened;
[0055] At the same time, a joint assessment mechanism will be established, specifically including:
[0056] If the CPU active power consumption changes by ΔE cpu ≥First threshold CPU E , and the energy consumption change required for positioning accuracy ΔE p ≥ the second threshold P E , which is considered as a high-load scenario, and the sampling frequency is reduced and the timing processing cycle is extended;
[0057] If the CPU active power consumption changes by ΔE cpu <First threshold CPU E , and the energy consumption change required for positioning accuracy ΔE p <Second threshold P E , maintain the current parameters;
[0058] If the two indicators have inconsistent directions, including the CPU active power consumption change ΔE cpu The change in energy consumption required for positioning accuracy is ΔE p If it decreases, the decision weight will be further weighted based on the platform feedback information;
[0059] The weighting of the decision weight includes adjusting the sampling frequency range and adjusting the scheduling interval range.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] The present invention addresses the problem of existing technologies' deep reliance on the Android kernel layer. By constructing an abstract intermediate communication interface between the application layer and the Android kernel layer, this technical solution effectively decouples the system from the underlying hardware. It obtains multi-field navigation data through the original satellite navigation measurement interface provided by the Android system and uniformly converts it into a structured data format, shielding the differences between different hardware platforms. It synchronously transmits data change events through a monitoring callback mechanism and processes updated data asynchronously, improving compatibility and adaptability, reducing maintenance costs and the difficulty of system updates, and is suitable for multiple device platforms and complex application scenarios.
[0062] The present invention addresses the system resource contention and energy consumption issues caused by high-frequency data acquisition and real-time processing. This technical solution constructs a circular data buffer and supports a batch buffer acquisition mechanism to reduce the CPU resource occupation of high-frequency data processing. It also sets a dynamic sampling frequency and adjusts the sampling interval in real time according to the device's motion state. The sampling frequency is lowered when the device is stationary or at low speed, and increased when a sudden speed change or increased trajectory deviation is detected. The scheduling mechanism dynamically controls the priority and execution rhythm of data processing, adopts a timed processing method to adjust the processing time interval under different motion states, and combines the sampling buffer with preset thresholds to batch trigger computing tasks, significantly reducing system energy consumption while improving resource utilization efficiency.
[0063] Secondly, in response to the chain reaction of poor system compatibility and resource contention, this technical solution solves the interrelated impacts by building a multi-source data fusion model and feedback adjustment mechanism; based on the extended Kalman filter algorithm, a unified data fusion framework is established to fuse the buffered satellite navigation data, the standard positioning data output by the NMEA protocol, the RTCM differential correction data and the original observation data, and synchronize and align and weightedly fuse them based on the timestamp; in real time, the CPU occupancy rate and positioning accuracy during the data fusion process are monitored to obtain the change in CPU active power consumption ΔE cpu The change in energy consumption required for positioning accuracy ΔE p , dynamically adjust the first threshold CPU active power consumption based on feedback information E and the second threshold value P of positioning energy consumption E , optimize the sampling frequency and scheduling mechanism, when ΔE cpu ≥CPU E or ΔE p ≥P E Prioritize reducing the sampling frequency and extending the timing processing interval, thereby improving system operation reliability and positioning accuracy while achieving intelligent management of system energy consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 Schematic diagram of the overall method of the present invention. DETAILED DESCRIPTION
[0065] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to specific embodiments.
[0066] It should be noted that, unless otherwise defined, the technical or scientific terms used in the present invention should have the usual meanings understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly.
[0067] Example 1:
[0068] See also Figure 1 The present invention provides a technical solution: a high-precision satellite navigation positioning method based on Android, which specifically includes the following steps:
[0069] S1. Build an abstract intermediate communication interface between the application layer and the Android kernel layer in the vehicle navigation and positioning system to receive satellite navigation data;
[0070] S2. Calling a standardized satellite navigation driver module through the intermediate communication interface, wherein the driver module supports calling NMEA protocol data, RTCM differential correction data, and raw observation data;
[0071] S3. Batch buffering and timing processing of the received satellite navigation data, setting a dynamic sampling frequency and using a scheduling mechanism to control the data processing frequency;
[0072] S4. Build a multi-source data fusion model to fuse the buffered satellite navigation data with NMEA protocol data, RTCM differential correction data, and original observation data to generate high-precision position information;
[0073] At the same time, the CPU usage and energy consumption per unit positioning accuracy during the data fusion process are monitored in real time;
[0074] S5. Transmit the high-precision location information to the terminal device in real time, monitor the change in CPU occupancy and the energy consumption required for positioning accuracy during the data fusion process, and obtain the CPU active power consumption change ΔE cpu and the energy consumption change ΔE required for positioning accuracy p ;
[0075] Then according to the CPU active power consumption change ΔEcpu and the energy consumption change ΔE required for positioning accuracy p , and adjust the sampling frequency and scheduling mechanism based on the feedback information sent back by the terminal device.
[0076] In this embodiment, S1 is used to avoid directly modifying the Android kernel code, so as to adapt the positioning system to different Android versions and enhance the system compatibility and maintainability;
[0077] S1 effectively solves system compatibility issues by building an abstract intermediate communication interface between the application layer and the Android kernel layer, thereby improving the kernel adaptation coverage (KAC).
[0078] On this basis, S2 calls the standardized satellite navigation driver module to achieve unified access of multi-source data, providing a complete data foundation for subsequent processing;
[0079] S3 collects raw data in batches and performs dynamic sampling frequency adjustment. It automatically reduces the frequency to 1Hz when the trajectory change rate R is less than 0.2m / s, and increases the frequency to 10Hz when R is greater than or equal to 1.5m / s, significantly reducing resource usage.
[0080] S4 then builds a multi-source data fusion model to control the positioning error to the centimeter level, while monitoring the CPU usage and the energy consumption change per unit positioning accuracy ΔE in real time. p , when ΔE p Exceeding the threshold P E When the optimization is triggered;
[0081] Finally, the platform feedback linkage adjusts S5 to make the CPU active power consumption change ΔE cpu Stable at threshold CPU E Within this, a closed-loop control chain from data collection, processing to optimization is formed, achieving a triple improvement in compatibility, accuracy and energy consumption.
[0082] Example 2
[0083] The abstract intermediate communication interface between the application layer and the Android kernel layer is constructed, including:
[0084] Obtain multi-field satellite navigation data through the satellite navigation raw measurement interface provided by the Android system and convert it into a structured data format;
[0085] Establish a data callback mechanism, including synchronously delivering data change events to the application layer by registering a listening callback. The application layer receives and processes the updated data in real time in an asynchronous manner by binding the corresponding callback interface.
[0086] Furthermore, a set of data monitoring registration methods is preset in the intermediate communication interface module. The application layer registers a satellite navigation data monitor with the intermediate module by calling this method during the initialization phase. The monitor is used to receive data change notification events from the underlying driver or HAL layer.
[0087] When the intermediate communication interface detects that the original measured satellite navigation data is updated, it constructs a data update event object according to the set event trigger conditions and pushes the event to all registered listening instances through the asynchronous event distribution mechanism.
[0088] Furthermore, after binding the corresponding callback interface, the application layer can receive the event in a non-blocking manner and extract the structured navigation data contained therein, enabling real-time access and processing of positioning data. The construction of the abstracted intermediate communication interface includes: defining a unified data access abstract class at the Android platform's system service layer to encapsulate access methods for GNSS raw data fields; implementing data call and cache synchronization logic in C / C++ at the JNI layer; and completing the complete path of event monitoring and data transmission at the application framework layer through an interface registration mechanism and thread management mechanism, forming a communication architecture that decouples upper-layer applications from underlying GNSS data.
[0089] The driver module for calling the standardized satellite navigation system includes:
[0090] Access the satellite navigation chipset through the hardware abstraction layer interface to obtain multi-band satellite observation data; standardize the format of NMEA protocol data, RTCM differential correction data and raw observation data.
[0091] The batch buffering and collecting of the received satellite navigation data includes:
[0092] Continuously receive the satellite navigation raw data output by the satellite navigation module by building a circular data buffer;
[0093] A batch threshold is preset. When the buffered data reaches the batch threshold, the fusion processing task is triggered to uniformly parse and filter the batch data that currently reaches the batch threshold.
[0094] Furthermore, the "multi-band satellite observation data" here refers to the raw measurement values from signals of different frequencies, while the "multi-field satellite navigation data" mentioned above refers to the multiple information items contained in the multi-band signals, namely a structured data set including time, satellite number, and pseudorange.
[0095] In this embodiment, the circular data buffer is constructed based on a FIFO queue, and the output raw data includes pseudorange, carrier phase, and signal strength;
[0096] The constructed abstract intermediate communication interface achieves seamless access to kernel data across Android versions through standardized data format conversion and asynchronous callback mechanism, thus improving system compatibility.
[0097] Calling the standardized driver module to obtain multi-band observation data provides a high-integrity original data source for subsequent fusion processing, thereby improving data availability;
[0098] A specially designed batch buffer collection mechanism accumulates data in a ring buffer, and a preset batch threshold of 20-50 packets, adjusted based on chipset throughput and CPU processing power, is used to trigger batch processing tasks;
[0099] Compared with the traditional polling method, the threshold trigger mechanism reduces CPU usage and effectively eliminates single-point data errors through batch analysis and filtering. The entire process forms an efficient pipeline from data acquisition and standardization to preprocessing, which not only ensures the accuracy of spatiotemporal alignment of multi-source data, but also saves resource overhead for subsequent fusion calculations, ultimately achieving the dual optimization of improved positioning stability and reduced energy consumption.
[0100] Example 3
[0101] The timing processing of the received satellite navigation data further includes:
[0102] Based on the terminal device's motion status, sampling frequency, and resource usage dynamics, a method combining experimental measurement, application demand analysis, and system resource optimization evaluation is used;
[0103] Calculate the trajectory change rate Gb of the terminal device in the current timing processing cycle, and compare and analyze the trajectory change rate Gb with the preset threshold R to determine the motion state of the vehicle corresponding to the terminal device;
[0104] The time intervals in the static state and the high-speed motion state are set respectively, including setting the time intervals in the static state and the high-speed motion state respectively; within this time interval, the system performs processing once in the static state and once in the high-speed motion state respectively.
[0105] The method of setting a dynamic sampling frequency and using a scheduling mechanism to control the data processing frequency includes:
[0106] Storing real-time satellite navigation data in a circular data buffer; adjusting the frequency of satellite navigation data acquisition in real time according to the motion state of the terminal device;
[0107] When the device is stationary or in a low-speed state, the sampling frequency is reduced to save energy. When a sudden speed change or increased trajectory deviation is detected, the sampling frequency is automatically increased.
[0108] Furthermore, the evaluation trajectory change rate Gb is calculated using the following formula:
[0109]
[0110] Where d(Pt, Pt-1) represents the spatial distance between the two positioning points in the current timing processing cycle t and the previous timing processing cycle t-1; Δt represents the timestamp of the two samples;
[0111] When the trajectory change rate Gb exceeds the preset threshold, the system determines that the device is in a moving or accelerating state and increases the sampling frequency;
[0112] When the trajectory change rate Gb is lower than the threshold and lasts for a period of time, the sampling frequency is reduced to reduce power consumption.
[0113] Table 1 is used to define the hierarchical adjustment strategy for the sampling frequency of the terminal device according to the trajectory change rate Gb:
[0114]
[0115]
[0116] Monitor system CPU and memory usage; when system resources are tight, lower data processing priority to ensure basic positioning functions; when system resources are sufficient, increase data processing frequency to optimize positioning accuracy.
[0117] The multi-source data fusion model is constructed, including:
[0118] A unified data fusion framework is established based on the extended Kalman filter algorithm. Based on the timestamp, the buffered satellite navigation data, the standard positioning data output by the NMEA protocol, the RTCM differential correction data and the original observation data are synchronously aligned and weightedly fused.
[0119] The input of the multi-source data fusion model includes the above-mentioned multi-source heterogeneous data, and the output is high-precision position information after error correction, state estimation and data filtering.
[0120] The CPU usage and energy consumption per unit positioning accuracy during the real-time monitoring data fusion process include:
[0121] After completing the generation of high-precision location information, the system further constructs a resource monitoring submodule to perform real-time resource occupancy monitoring of the multi-source data fusion process;
[0122] The resource monitoring submodule is used for CPU occupancy collection and positioning energy efficiency evaluation;
[0123] The CPU usage is collected based on the performance interface provided by the operating system layer. The CPU usage time of the data processing thread in each data fusion cycle is obtained, and the CPU usage is calculated based on the total duration of the evaluation cycle.
[0124] The positioning energy efficiency evaluation unit estimates the CPU power consumption during the evaluation period, including multiplying the processing time by the unit power consumption constant and combining it with the positioning accuracy index in the high-precision location information to calculate the energy consumption required for unit positioning accuracy.
[0125] Furthermore, continuous monitoring of the above parameters can be used to subsequently dynamically adjust the sampling frequency, fusion model complexity and scheduling mechanism to achieve an adaptive optimization balance between positioning accuracy and system energy consumption.
[0126] In this embodiment, the optimization of positioning system resource utilization is achieved by dynamically adjusting the data processing strategy, among which the adaptive sampling mechanism based on the trajectory change rate R is of core value;
[0127] When R < 0.2 m / s, 1 Hz low-frequency sampling is used, and when R ≥ 1.5 m / s, 10 Hz high-frequency sampling is switched. This dynamic adjustment improves energy efficiency when the system is stationary and maintains centimeter-level positioning accuracy even at high speeds.
[0128] The preset thresholds of 0.2m / s and 1.5m / s are the optimized demarcation points determined after 2000 sets of motion scene tests, which accurately distinguish between static, low-speed and high-speed states. The table data specifically shows the parameter mapping relationship under different motion states, including the disaster recovery mechanism that automatically reduces the frequency to 0.5-2Hz when resources are limited. When the extended Kalman filter framework fuses multi-source data, it monitors the CPU usage and unit positioning energy consumption ΔE in real time. p, When ΔE p Exceeding the threshold P E The model complexity is automatically simplified at the same time, so that the system can maintain a CPU usage rate below 40% when the positioning error is ≤0.3 meters, ultimately achieving the best balance between accuracy and energy consumption.
[0129] Example 4
[0130] The CPU occupancy rate and the energy consumption change of the unit positioning accuracy during the monitoring data fusion process are used to obtain the CPU active power consumption change ΔE cpu and the energy consumption change ΔE required for positioning accuracy p ;include:
[0131] Extract the CPU energy consumption of the current timed processing cycle and the CPU energy consumption of the previous timed processing cycle, and perform correlation calculations to obtain the CPU active power consumption change ΔE cpu The specific calculation formula is as follows:
[0132]
[0133] in, Indicates the CPU energy consumption of the current timing processing cycle, Indicates the CPU energy consumption during the previous processing cycle. The CPU energy consumption is obtained by converting the thread running time and the power consumption factor per unit frequency.
[0134] At the same time, the calculation formula for the change in energy consumption required for unit positioning accuracy is:
[0135]
[0136] Among them, Pt and Pt-1 represent the positioning accuracy indicators output by the current timing processing cycle and the previous timing processing cycle respectively;
[0137] The two changes are CPU active power consumption change ΔE cpu and the energy consumption change ΔE required for positioning accuracy p It is used to determine the system energy consumption change trend and energy efficiency fluctuation characteristics, and then provide real-time feedback basis for sampling frequency adjustment and fusion model selection.
[0138] Furthermore, the specific calculation formula for CPU energy consumption is as follows:
[0139] E cpu =T active ×Pcpu f
[0140] Where: E cpu Indicates the CPU energy consumption during the timing processing cycle; T active Indicates the CPU thread running time of executing data fusion tasks within the timing processing cycle; Pcpu f Indicates the average power consumption factor of the CPU at unit frequency, which is obtained by dynamic table lookup based on the current operating frequency f;
[0141] Specifically, the current thread running frequency and power consumption factor are dynamically read through the performance monitoring interface provided by the operating system. This includes reading the CPU frequency information in " / proc / cpuinfo" and the frequency configuration file in the " / sys / cpufreq" path, or calling the "Battery Status Statistics Manager" interface to obtain the CPU module power consumption estimate, thereby realizing CPU energy consumption modeling and real-time calculation in the fusion computing process.
[0142] Furthermore, in this invention, " / proc / cpuinfo" is a virtual file provided by the Android kernel that displays real-time static and dynamic CPU information, including the number of cores, frequency range, and architecture type. " / sys / cpufreq" is the system-provided CPU dynamic frequency adjustment interface path, providing access to each core's current operating frequency, available frequency ranges, and frequency adjustment policy configuration files. By accessing these files, real-time monitoring of the terminal device's CPU operating status and frequency changes is achieved, providing fundamental data support for subsequent energy consumption modeling and calculations.
[0143] The dynamic sampling frequency and scheduling mechanism are adjusted based on the change in CPU active power consumption and the change in energy consumption required for positioning accuracy, combined with the feedback information sent back by the terminal device, including:
[0144] Get the vehicle running status information sent back by the terminal device; preset the first threshold CPU E Change in CPU active power consumption ΔE cpu Perform comparative evaluation and preset the second threshold value P E , and the change in energy consumption required for positioning accuracy ΔE p Conduct comparative assessments;
[0145] If the CPU active power consumption changes by ΔE during the current timing processing cycle cpu Exceeds the first threshold, or the energy consumption change required for positioning accuracy ΔE p If the second threshold is exceeded, the sampling frequency and scheduling mechanism are adjusted according to the vehicle's driving status, including:
[0146] When the vehicle is stationary or running at low speed, the data sampling frequency is lowered, and the time interval of scheduled processing in the scheduling mechanism is increased to control the data processing frequency;
[0147] When the vehicle is in a high-speed driving state, the task scheduling priority and target positioning accuracy requirements are increased at this time, the data sampling frequency is increased, and the time interval of scheduled processing scheduling is shortened;
[0148] At the same time, a joint assessment mechanism will be established, specifically including:
[0149] If the CPU active power consumption changes by ΔE cpu ≥First threshold CPU E , and the energy consumption change required for positioning accuracy ΔE p ≥ the second threshold P E , which is considered as a high-load scenario, and the sampling frequency is reduced and the timing processing cycle is extended;
[0150] If the CPU active power consumption changes by ΔE cpu <First threshold CPUE , and the energy consumption change required for positioning accuracy ΔE p <Second threshold P E , maintain the current parameters;
[0151] If the two indicators have inconsistent directions, including the CPU active power consumption change ΔE cpu The change in energy consumption required for positioning accuracy is ΔE p If it decreases, the decision weight will be further weighted based on the platform feedback information;
[0152] The weighting of the decision weight includes adjusting the sampling frequency range and adjusting the scheduling interval range.
[0153] Furthermore, the first threshold CPU E and the second threshold P E Based on the historical average energy efficiency level and task priority setting, and through dynamic adjustment through online training, the buffer collection and fusion processing strategy is updated in real time according to the above control results to ensure the optimal balance between energy consumption control and positioning accuracy.
[0154] In this embodiment, a breakthrough improvement in the energy efficiency of the positioning system is achieved through an innovative dynamic energy consumption monitoring and control mechanism. The core of this mechanism is to calculate the CPU active power consumption change ΔE in real time. cpu and the energy consumption change ΔE required for positioning accuracy p , these two key parameters reflect the processor load fluctuation and positioning energy efficiency change trend respectively; the cycle energy consumption E is calculated by dynamically reading the operating frequency f and the timing processing cycle t corresponding to the operating time cpu , the system can accurately perceive the consumption of computing resources; when ΔE cpu Exceeds the first CPU threshold E or ΔE p Exceeding the second threshold P E The system triggers adaptive adjustment, increasing the sampling frequency to above 5Hz in high-speed state and reducing it to below 1Hz in static state.
[0155] This closed-loop control mechanism based on dual-parameter joint evaluation can reduce energy consumption by 30% compared to traditional fixed-frequency solutions. At the same time, through weighted decision-making based on platform feedback information including vehicle status and path congestion level, it achieves the optimal balance between positioning accuracy and system energy consumption in complex scenarios.
[0156] It should be noted that: All calculation formulas in this application document use regression analysis including but not limited to machine learning algorithms to deeply analyze the relevant parameters collected and identify their natural trends and relationships. Use professional software, such as Python's Scikit-learn library or R language, to automatically generate mathematical models that match the data. Then, objectively evaluate the performance of the model through methods such as cross-validation, and combine continuous feedback and optimization to ensure that the created formula truly reflects the inherent laws of the data, thereby ensuring its effectiveness and accuracy. In all calculation formulas in this application, the parameters in each formula are dimensionally non-dimensionalized in a consistent range to ensure that different physical quantities are compared on the same scale; dimensionless technical means include but are not limited to maximum and minimum normalization (Min-MaxNormalization) and Z-Score standardization;
[0157] The technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.
[0158] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0159] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0160] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A high-precision satellite navigation and positioning method based on Android, applied to a terminal device with a vehicle-mounted navigation and positioning system, characterized in that: The specific steps include: S1. Build an abstract intermediate communication interface between the application layer and the Android kernel layer in the vehicle navigation and positioning system to receive satellite navigation data; S2. Calling a standardized satellite navigation driver module through the intermediate communication interface, wherein the driver module supports calling NMEA protocol data, RTCM differential correction data, and raw observation data; S3. Batch buffering and timing processing of the received satellite navigation data, setting a dynamic sampling frequency and using a scheduling mechanism to control the data processing frequency; S4. Build a multi-source data fusion model to fuse the buffered satellite navigation data with NMEA protocol data, RTCM differential correction data, and original observation data to generate high-precision position information; At the same time, the CPU usage and energy consumption per unit positioning accuracy during the data fusion process are monitored in real time; S5. Transmit the high-precision location information to the terminal device in real time, monitor the change in CPU occupancy and the energy consumption required for positioning accuracy during the data fusion process, and obtain the CPU active power consumption change ΔE cpu and the energy consumption change ΔE required for positioning accuracy p ; Then according to the CPU active power consumption change ΔE cpu and the energy consumption change ΔE required for positioning accuracy p , and adjust the sampling frequency and scheduling mechanism based on the feedback information sent back by the terminal device.
2. The high-precision satellite navigation and positioning method based on Android according to claim 1, characterized in that: The abstract intermediate communication interface between the application layer and the Android kernel layer is constructed, including: Obtain multi-field satellite navigation data through the satellite navigation raw measurement interface provided by the Android system and convert it into a structured data format; Establish a data callback mechanism, including synchronously delivering data change events to the application layer by registering a listening callback. The application layer receives and processes the updated data in real time in an asynchronous manner by binding the corresponding callback interface.
3. The high-precision satellite navigation and positioning method based on Android according to claim 2, characterized in that: The driver module for calling the standardized satellite navigation system includes: Access the satellite navigation chipset through the hardware abstraction layer interface to obtain multi-band satellite observation data; standardize the format of NMEA protocol data, RTCM differential correction data and raw observation data.
4. The high-precision satellite navigation and positioning method based on Android according to claim 3, characterized in that: The batch buffering and collecting of the received satellite navigation data includes: Continuously receive the satellite navigation raw data output by the satellite navigation module by building a circular data buffer; A batch threshold is preset. When the buffered data reaches the batch threshold, the fusion processing task is triggered to uniformly parse and filter the batch data that currently reaches the batch threshold.
5. The high-precision satellite navigation and positioning method based on Android according to claim 4, characterized in that: The timing processing of the received satellite navigation data further includes: Based on the terminal device's motion status, sampling frequency, and resource usage dynamics, a method combining experimental measurement, application demand analysis, and system resource optimization evaluation is used; Calculate the trajectory change rate Gb of the terminal device in the current timing processing cycle, and compare and analyze the trajectory change rate Gb with the preset threshold R to determine the motion state of the vehicle corresponding to the terminal device; The time intervals in the static state and the high-speed motion state are set respectively, including setting the time intervals in the static state and the high-speed motion state respectively; within this time interval, the system performs processing once in the static state and once in the high-speed motion state respectively.
6. The high-precision satellite navigation and positioning method based on Android according to claim 5, characterized in that: The method of setting a dynamic sampling frequency and using a scheduling mechanism to control the data processing frequency includes: Storing real-time satellite navigation data in a circular data buffer; adjusting the frequency of satellite navigation data acquisition in real time according to the motion state of the terminal device; When the device is stationary or in a low-speed state, the sampling frequency is reduced to save energy. When a sudden speed change or increased trajectory deviation is detected, the sampling frequency is automatically increased.
7. The high-precision satellite navigation and positioning method based on Android according to claim 6, characterized in that: The multi-source data fusion model is constructed, including: A unified data fusion framework is established based on the extended Kalman filter algorithm. Based on the timestamp, the buffered satellite navigation data, the standard positioning data output by the NMEA protocol, the RTCM differential correction data and the original observation data are synchronously aligned and weightedly fused. The input of the multi-source data fusion model includes the above-mentioned multi-source heterogeneous data, and the output is high-precision position information after error correction, state estimation and data filtering.
8. The high-precision satellite navigation and positioning method based on Android according to claim 7, characterized in that: The CPU usage and energy consumption per unit positioning accuracy during the real-time monitoring data fusion process include: After completing the generation of high-precision location information, the system further constructs a resource monitoring submodule to perform real-time resource occupancy monitoring of the multi-source data fusion process; The resource monitoring submodule is used for CPU occupancy collection and positioning energy efficiency evaluation; The CPU usage is collected based on the performance interface provided by the operating system layer. The CPU usage time of the data processing thread in each data fusion cycle is obtained, and the CPU usage is calculated based on the total duration of the evaluation cycle. The positioning energy efficiency evaluation unit estimates the CPU power consumption during the evaluation period, including multiplying the processing time by the unit power consumption constant and combining it with the positioning accuracy index in the high-precision location information to calculate the energy consumption required for unit positioning accuracy.
9. The high-precision satellite navigation and positioning method based on Android according to claim 8, characterized in that: The CPU occupancy rate and the energy consumption change of the unit positioning accuracy during the monitoring data fusion process are used to obtain the CPU active power consumption change ΔE cpu and the energy consumption change ΔE required for positioning accuracy p ; include: Extract the CPU energy consumption of the current timed processing cycle and the CPU energy consumption of the previous timed processing cycle, and perform correlation calculations to obtain the CPU active power consumption change ΔE cpu The specific calculation formula is as follows: in, Indicates the CPU energy consumption of the current timing processing cycle t, Indicates the CPU energy consumption of the previous processing cycle t-1. The CPU energy consumption is obtained by converting the thread running time and the unit frequency power consumption factor. At the same time, the calculation formula for the change in energy consumption required for unit positioning accuracy is: Among them, Pt and Pt-1 represent the positioning accuracy indicators output by the current timing processing cycle and the previous timing processing cycle respectively; The two changes are CPU active power consumption change ΔE cpu and the energy consumption change ΔE required for positioning accuracy p It is used to determine the system energy consumption change trend and energy efficiency fluctuation characteristics, and then provide real-time feedback basis for sampling frequency adjustment and fusion model selection.
10. The high-precision satellite navigation and positioning method based on Android according to claim 9, characterized in that: The dynamic sampling frequency and scheduling mechanism are adjusted based on the change in CPU active power consumption and the change in energy consumption required for positioning accuracy, combined with the feedback information sent back by the terminal device, including: Get the vehicle running status information sent back by the terminal device; preset the first threshold CPU E Change in CPU active power consumption ΔE cpu Perform comparative evaluation and preset the second threshold value P E , and the change in energy consumption required for positioning accuracy ΔE p Conduct comparative assessments; If the CPU active power consumption changes by ΔE during the timing processing period cpu Exceeds the first threshold, or the energy consumption change required for positioning accuracy ΔE p If the second threshold is exceeded, the sampling frequency and scheduling mechanism are adjusted according to the vehicle's driving status, including: When the vehicle is stationary or running at low speed, the data sampling frequency is lowered, and the time interval of scheduled processing in the scheduling mechanism is increased to control the data processing frequency; When the vehicle is in a high-speed driving state, the task scheduling priority and target positioning accuracy requirements are increased at this time, the data sampling frequency is increased, and the time interval of scheduled processing scheduling is shortened; At the same time, a joint assessment mechanism will be established, specifically including: If the CPU active power consumption changes by ΔE cpu ≥First threshold CPU E , and the energy consumption change required for positioning accuracy ΔE p ≥ the second threshold P E , which is considered as a high-load scenario, and the sampling frequency is reduced and the timing processing cycle is extended; If the CPU active power consumption changes by ΔE cpu <First threshold CPU E , and the energy consumption change required for positioning accuracy ΔE p <Second threshold P E , maintain the current parameters; If the two indicators have inconsistent directions, including the CPU active power consumption change ΔE cpu The change in energy consumption required for positioning accuracy is ΔE p If it decreases, the decision weight will be further weighted based on the platform feedback information; The weighting of the decision weight includes adjusting the sampling frequency range and adjusting the scheduling interval range.
Citation Information
Cited By
RFID (Radio Frequency Identification Device) and GPS (Global Positioning System) fused pet identity recognition and positioning system and method
CN121276559A
Blockchain-assisted GPS positioning and encrypted transmission system and method for air cargo pallets
CN122476343A
