A PTZ camera target automatic positioning method and system
Patent Information
- Application Number
- CN202610867248.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-16
- Publication Date
- 2026-10-27
AI Technical Summary
这类技术解决方案在多数单一场景或标准化地理环境中具备一定适用性,适合网络化监控、城市场景、智能交通等领域,但当遇到野外探测、高楼异构地段、大跨度多类目标集中区时,依然易受模型固有限制影响,表现出定位误差不稳定、模型切换迟滞、增量经验无法沉淀等问题
(1)针对传统PTZ摄像头地理定位系统中地球几何模型选择依赖静态规则、难以适应复杂地理空间下多变误差行为的技术缺陷,本申请通过构建“地理误差指纹数据库”并引入基于实测偏差的动态择优机制,显著提升了模型选择的准确性与场景适配能力。现有技术通常预设某一类地球模型(如椭球或平面)适用于全域场景,忽视了不同地理区域因纬度、地形起伏及目标距离差异所导致的系统性建模偏差演化规律。本方案则在初始化阶段对全球网格进行离散化划分,并在每次定位任务完成后自动积累三类主流模型(椭球、球面、二维平面)在对应地理网格中的三维角度偏差统计特征,形成包含均值、方差、峰度、最大偏差方向及频次的结构化误差指纹簇,从而实现对各类模型在特定地理位置下长期性能表现的精细化刻画。当新任务触发时,系统依据目标坐标快速定位所属网格,检索各模型历史误差行为,并结合预置的物理启发式评分函数进行智能优选——该函数不依赖数据训练,而是基于对偏差模式的语义理解(如周期性震荡指示建模不稳定、单向偏移可线性补偿、突变响应反映适用边界)进行规则化评估,有效克服了传统方法在跨区域应用中因模型误配而导致的累积误差放大问题,大幅提高了定位结果的空间一致性与收敛可靠性。
Smart Images

Figure CN122989781A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent video surveillance and computational geometry model selection technology, and in particular to a method and system for automatic target localization using a PTZ camera. Background Technology
[0002] In the current field of video surveillance and automatic target positioning systems, especially in the application of PTZ (pan-tilt-zoom) camera target pointing control, the rapid and accurate aiming of the camera at spatial targets relies heavily on the scientific selection of the Earth's geometric model. Traditional solutions often employ ellipsoidal, spherical, or two-dimensional planar models, switching models based on preset rules considering factors such as the spatial distance and height difference between the target and the camera. For example, spherical models are preferred for long-distance scenarios to simplify calculations, while ellipsoidal models are preferred for short-distance or high-precision scenarios to achieve a closer approximation of the actual geographical curvature. However, these rules typically rely on theoretical derivations or empirical thresholds, failing to fully consider factors such as the superposition of multi-source errors in the actual environment, the influence of special terrain, or equipment installation limitations. This often leads to discrepancies between the model selection results and the optimal solution in the actual field.
[0003] Current mainstream methods mostly follow a static, encapsulated model selection framework. This means that the Earth model category is determined once during system parameter initialization based on scene classification, distance range, or device configuration, and this model type is used consistently throughout subsequent positioning calculations. This passive execution mode, lacking dynamic feedback, makes it difficult to flexibly optimize the model selection strategy based on historical positioning experience and actual error conditions during system operation. Furthermore, while some existing methods incorporate positioning error analysis and statistics, the relevant data only serves post-event error quantification and operational assessment, failing to drive model optimization and adaptive parameter compensation through a reverse closed-loop process. This means that even under long-term stable system operation, deviations inevitably accumulate due to scene changes or model incompatibility.
[0004] Currently, typical automatic positioning systems in the industry widely employ model selection methods including: switching between different models segmented by a polyline based on a static threshold of field of view distance; performing global calibration only on a single geographic model; and offline correction using empirical parameter tables. These technical solutions are applicable to most single-scenario or standardized geographic environments, suitable for networked monitoring, urban scenarios, and intelligent transportation. However, when encountering field detection, heterogeneous high-rise buildings, or large-span areas with concentrated multiple targets, they remain susceptible to inherent model limitations, exhibiting problems such as unstable positioning errors, delayed model switching, and the inability to accumulate incremental experience. Current technical methods generally fail to achieve adaptive model selection based on measured error data, and also struggle to address the need for dynamic correlation between model parameter accumulation optimization and model error characteristics.
[0005] Existing technologies suffer from the following main shortcomings in the model selection process: Firstly, the model selection process has long relied on manually preset rules based on single physical parameters such as distance and altitude, failing to incorporate real-world operational errors under different geographical locations for verification and adaptive adjustment. This easily leads to situations where the wrong model is consistently selected for a particular region, or where model parameters are difficult to self-correct. Secondly, although some systems possess post-processing correction and offline calibration functions for positioning errors, the correction data is not integrated into the closed-loop mechanism of model selection. This not only fails to dynamically respond to changes in model performance across different geographical regions but also easily results in insufficient model adaptability in new environments. Furthermore, most current solutions still rely on simple global statistical indicators such as mean and variance for error source analysis, failing to establish regionalized, model-specific, and dimensional error distribution feature libraries. This results in a single criterion for model adaptation judgment with poor generalization ability, making it difficult to guide optimal model adjustments in highly dynamic and complex scenarios.
[0006] With the increasing demand for complex monitoring involving multiple scenarios and devices, the need for intelligent, adaptive, and accumulative learning capabilities in model selection is becoming increasingly prominent. There is an urgent need for a system that can move beyond traditional static rules and rely solely on real error feedback from historical positioning tasks to automatically establish a dynamic mapping relationship between geographic region, model type, and error behavior, achieving a closed-loop evolution of the model selection mechanism. An ideal solution should support long-term storage and continuous iteration of error fingerprints from different Earth models in different regions and configurations. It should automatically guide dynamic optimization through a lightweight feedback mechanism and synchronously call historical correction values during model output parameter calculation, thereby improving the overall generalization and robustness of the system. Ultimately, this will achieve a PTZ camera target automatic positioning system with low human intervention, high adaptability, and high accuracy.
[0007] Therefore, existing technologies urgently need to overcome the technical bottlenecks of static decision-making and lack of historical experience feedback in the selection strategy of Earth geometric models. It is necessary to introduce a dynamic optimization mechanism based on geographic error fingerprint feedback and a sustainable online learning compensation channel to achieve intelligent model optimization and parameter autonomy that links the three dimensions of geospatial dimension, model type dimension, and error feature dimension, so as to further adapt to the positioning needs of changing scenarios and long-term evolution. Summary of the Invention
[0008] This application provides a method and system for automatic target localization using a PTZ camera, which aims to solve one of the problems or issues of the prior art mentioned in the background section.
[0009] This application provides a method and system for automatic target localization using a PTZ camera, specifically including: S1: Obtain the GPS coordinates of the camera and the target object and the three-dimensional angle deviation vector after manual fine-tuning and confirmation, and divide the global geographic space into latitude and longitude grid units with unique geographic identifiers; S2: Based on the unique geographic identifier, the three-dimensional angle deviation vector is associated and mapped with the Earth geometric model used in this mission to construct a geographic error fingerprint data cluster; S3: For each latitude and longitude grid cell, an independent geographic error fingerprint data cluster corresponding to multiple Earth geometric models is established to create a model region error response mapping relationship library; S4: Receive the target GPS coordinates of the new positioning task and map them to the corresponding latitude and longitude grid cell; retrieve the historical deviation distribution characteristics of the Earth's geometric model under the latitude and longitude grid cell from the model area error response mapping relationship library; S5: Based on the historical deviation distribution characteristics, perform physical heuristic rule determination to generate model fit score values for each of the Earth geometric models; S6: Select the Earth geometry model with the highest model fit score as the current basic calculation model, and activate the model-aware compensation channel for the output parameters of the current basic calculation model only. S7: Using the model perception compensation channel, the historical weighted correction values of the latitude and longitude grid cells corresponding to the current basic calculation model are called to perform real-time compensation of the basic azimuth angle, basic pitch angle and basic zoom value, generate the final gimbal control parameters and drive the camera to perform positioning actions.
[0010] S8: After the positioning action is completed, the newly generated three-dimensional angle deviation vector is injected in reverse into the geographic error fingerprint data cluster corresponding to the current basic calculation model, and the online iteration of the geographic error fingerprint data cluster is completed by updating the basic statistical index group.
[0011] The PTZ camera target automatic positioning method and system provided in this application have the following beneficial effects: (1) To address the technical shortcomings of traditional PTZ camera geolocation systems, which rely on static rules for selecting Earth geometric models and are difficult to adapt to the variable error behavior under complex geographic spaces, this application significantly improves the accuracy of model selection and scene adaptability by constructing a "geographic error fingerprint database" and introducing a dynamic optimization mechanism based on measured deviations. Existing technologies usually presuppose that a certain type of Earth model (such as an ellipsoid or a plane) is applicable to the entire scene, ignoring the evolution law of systematic modeling deviation caused by differences in latitude, terrain undulation, and target distance in different geographic regions. This scheme discretizes the global grid during the initialization stage and automatically accumulates the three-dimensional angular deviation statistical features of three mainstream models (ellipsoid, sphere, and two-dimensional plane) in the corresponding geographic grid after each positioning task, forming a structured error fingerprint cluster containing mean, variance, kurtosis, maximum deviation direction, and frequency, thereby achieving a refined characterization of the long-term performance of various models under specific geographic locations. When a new task is triggered, the system quickly locates the grid to which the target belongs based on the target coordinates, retrieves the historical error behavior of each model, and performs intelligent optimization by combining a pre-set physical heuristic scoring function. This function does not rely on data training, but is based on a semantic understanding of the deviation pattern (such as periodic oscillations indicating modeling instability, unidirectional offsets that can be linearly compensated, and abrupt responses that reflect the applicable boundaries) for rule-based evaluation. This effectively overcomes the problem of cumulative error amplification caused by model mismatch in cross-regional applications of traditional methods, and greatly improves the spatial consistency and convergence reliability of the positioning results.
[0012] (2) Furthermore, this application proposes a "model-aware compensation channel" and a lightweight online update mechanism, which realizes closed-loop enhancement of positioning accuracy and continuous self-evolution capability of the system, significantly outperforming the limitations of fixed compensation tables or global unified correction strategies in existing technologies. Traditional solutions, even with the introduction of post-correction, often use uniform offsets or offline fitting curves, failing to distinguish the differentiated error trajectories that different Earth models may produce at the same location. In contrast, after selecting the optimal model, this invention only activates the weighted correction parameters in the corresponding error fingerprint cluster, specifically adjusting the output angle (such as azimuth), avoiding interference caused by cross-model confusion; at the same time, after the task is completed, the actual deviation is injected back into the historical statistics of the selected model to perform incremental index updates—only refreshing low-dimensional statistics such as mean and variance, without storing the original data sequence, without increasing the computational dimension, and without relying on external learning algorithms, ensuring the efficient operation and long-term stability of the system on edge devices. This design not only ensures that each positioning operation obtains the optimal model configuration and compensation parameters that are closest to the real situation in the current geographic context, but also enables the entire system to continuously optimize as the frequency of use increases, forming an adaptive closed loop of "execution-feedback-optimization", which effectively solves practical problems such as insufficient accuracy in the cold start stage and slow response to dynamic environments.
[0013] The aforementioned technical approach completely avoids highly complex artificial intelligence methods such as deep learning, reinforcement learning, and graph neural networks. It does not introduce any parameter-intensive models or iterative optimizers; all logic is based on interpretable physical rules and lightweight statistical modeling. Therefore, it boasts significant advantages such as low deployment threshold, low inference latency, low maintenance costs, and strong audit traceability. It is particularly suitable for PTZ monitoring systems that require long-term stable operation in computationally limited and environmentally variable scenarios such as the field, border areas, and transportation routes. It can support high-precision, robust automatic aiming and tracking tasks across a wide geographical area, providing a solid and reliable foundation for positioning capabilities in fields such as smart security, intelligent transportation, and emergency command. Attached Figure Description
[0014] Figure 1 This is the main flowchart of a PTZ camera target automatic positioning method and system; Figure 2 This is a sub-flowchart of a PTZ camera target automatic localization method and system; Figure 3 This is another sub-flowchart of a PTZ camera target automatic localization method and system; Figure 4 This is an application environment diagram of a PTZ camera target automatic localization method in one embodiment; Figure 5 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application. Detailed Implementation
[0015] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0016] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0017] like Figure 1 As shown, this application provides a method and system for automatic target localization using a PTZ camera, specifically including: S1: Obtain the GPS coordinates of the camera and the target object, as well as the three-dimensional angle deviation vector after manual fine-tuning and confirmation, and divide the global geographic space into latitude and longitude grid units with unique geographic identifiers.
[0018] S2: Based on the unique geographic identifier, the three-dimensional angle deviation vector is associated and mapped with the Earth's geometric model and relative spatial configuration parameters used in this mission to construct a geographic error fingerprint data cluster. The geographic error fingerprint data cluster includes, but is not limited to, mean, variance, kurtosis, and the direction of maximum deviation.
[0019] S3: For each of the aforementioned latitude and longitude grid units, which corresponds to independent geographic error fingerprint data clusters of various Earth geometric models, establish a model regional error response mapping relationship library. The Earth geometric models include, but are not limited to, ellipsoidal models, spherical models, and two-dimensional planar models; the model regional error response mapping relationship library is used to store historical deviation distribution characteristics.
[0020] S4: Receive the target GPS coordinates of the new positioning task and map them to the corresponding latitude and longitude grid cell. Retrieve the historical deviation distribution characteristics of the three types of Earth geometric models under the latitude and longitude grid cell from the model area error response mapping relationship library.
[0021] S5: Based on the historical deviation distribution characteristics, perform physical heuristic rule determination to generate model fit scores for each of the Earth geometric models.
[0022] Specifically, if significant periodic fluctuations in the pitch angle component are detected in the historical deviation distribution characteristics, the score of the corresponding Earth geometry model is reduced; if a stable unidirectional shift in the azimuth component is detected in the historical deviation distribution characteristics, the base score is retained, thereby generating a model fit score for each Earth geometry model.
[0023] S6: Select the Earth geometry model with the highest model fit score as the current basic calculation model, and activate the model-aware compensation channel for the output parameters of the current basic calculation model only, so as to freeze the correction call permissions of other unselected models.
[0024] S7: Using the model perception compensation channel, the historical weighted correction values of the latitude and longitude grid cells corresponding to the current basic calculation model are called to perform real-time compensation of the basic azimuth angle, basic pitch angle and basic zoom value, generate the final gimbal control parameters and drive the camera to perform positioning actions.
[0025] S8: After the positioning action is completed, the newly generated three-dimensional angle deviation vector is injected in reverse into the geographic error fingerprint data cluster corresponding to the current basic calculation model, and the online iteration of the geographic error fingerprint data cluster is completed by updating the basic statistical index group.
[0026] Step S1: Obtain the GPS coordinates of the camera and the target object, as well as the 3D angle deviation vector after manual fine-tuning and confirmation, and divide the global geographic space into latitude and longitude grid units with unique geographic identifiers. Specifically, this includes: S1.1: Obtain real-time latitude and longitude coordinates and altitude data output by the camera's built-in GPS module, and simultaneously obtain the target latitude and longitude coordinates and altitude data sent by the target's GPS terminal. Perform timestamp alignment and coordinate system-one transformation on the above multi-source geographic coordinate data to generate a standardized dual-end geographic location information set with spatiotemporal consistency.
[0027] The system inputs real-time latitude and longitude coordinates and altitude data from the camera's built-in GPS module, and simultaneously receives target latitude and longitude coordinates and altitude data sent by the target's GPS terminal, forming a dual-end geolocation raw dataset.
[0028] Timestamp alignment is performed on each data record in the above dual-end geolocation raw dataset to unify the time identifiers of the camera end and the target end to the international standard time format, and the time offset caused by transmission delay is adjusted by the time difference compensation algorithm to achieve time sequence consistency.
[0029] Based on the timestamp-aligned dual-end geographic coordinate data, the coordinate system conversion module is called to convert all data from different reference coordinate systems (such as WGS-84 and CGCS2000) to a unified standard geographic coordinate system, ensuring the consistency and interactivity of coordinate resolution.
[0030] For altitude parameters, the elevation benchmark correction method of the Earth ellipsoid model is used to convert the uncorrected altitude values of the camera end and the target end into positive height or elevation values under different reference surfaces that match the unified coordinate system, thereby eliminating the vertical deviation caused by the difference in elevation benchmark.
[0031] Multi-source data fusion is performed on latitude, longitude and altitude data in a unified coordinate system. Through spatial vectorization processing, the three-dimensional coordinates of the camera end and the target end are transformed into standard position vectors in the spherical coordinate system, and a dual-end position vector set with spatial geometric consistency is constructed.
[0032] By using a timestamp and coordinate system synchronization method, the aforementioned dual-end location vector set is encapsulated into a standardized dual-end geographic location information set, thus achieving accurate input conditions for subsequent deviation vector calculation and spatial mapping.
[0033] For example, in a city overpass monitoring scenario, the GPS module at the camera outputs latitude and longitude as 121.4737 degrees east longitude and 31.2304 degrees north latitude, with an altitude of 15.2 meters; the GPS terminal at the target object outputs latitude and longitude as 121.4780 degrees east longitude and 31.2320 degrees north latitude, with an altitude of 16.7 meters. The timestamps of the two sets of data are 2024-06-16 14:23:15 and 2024-06-16 14:23:17, respectively. A time difference compensation algorithm is used to advance the target object's time by 2 seconds to synchronize it with the camera. The original reference coordinate systems of the two sets of data are WGS-84 and CGCS2000, respectively. A coordinate transformation module eliminates the differences and unifies them to the WGS-84 coordinate system. For altitude processing, an orthographic height calculation method based on an ellipsoidal model is used to transform the altitudes of both sets of data to the same elevation datum. After vectorization, the 3D coordinate vectors of the camera end and the target end are (0.4971, 0.5442, 0.6802) and (0.4983, 0.5450, 0.6805) respectively. The standardized dual-end geographic location information set generated after encapsulation can be directly used for subsequent deviation vector calculation and latitude and longitude grid mapping operations, realizing the spatial and temporal consistency of the input conditions of the positioning task.
[0034] S1.2: Based on the manual fine-tuning confirmation step in the standardized dual-end geographic location information set, read the final azimuth angle value, final pitch angle value, and final zoom factor value after the operator corrects them through the gimbal control interface, combine them with the basic azimuth angle value, basic pitch angle value, and basic zoom factor value calculated in the previous step, and perform vector difference operation to generate a three-dimensional angle deviation vector representing the current positioning accuracy.
[0035] Based on the manual fine-tuning confirmation step in the standardized dual-end geographic location information set generated in step S1.1, the system receives the final azimuth angle value, final pitch angle value, and final zoom magnification value input by the operator in real time through the gimbal control interface, and extracts the basic azimuth angle value, basic pitch angle value, and basic zoom magnification value calculated by the preceding Earth geometric model from the system cache.
[0036] The difference between the final azimuth angle value and the basic azimuth angle value is calculated, and the difference is used as the first component of the three-dimensional deviation vector.
[0037] The difference between the final pitch angle value and the base pitch angle value is calculated, and the difference is used as the second component of the three-dimensional deviation vector.
[0038] The difference between the final zoom magnification value and the base zoom magnification value is calculated, and the difference is used as the third component of the three-dimensional deviation vector.
[0039] Using vector difference operations, the three components mentioned above are combined in a Cartesian coordinate system to generate a three-dimensional angle deviation vector representing the current positioning accuracy. The specific calculation formula is as follows: in, This is the difference between the final azimuth value and the base azimuth value. This is the difference between the final pitch angle value and the base pitch angle value. This is the difference between the final zoom magnification value and the base zoom magnification value.
[0040] By using difference calculation and vector combination processing, the standardized location information from the previous step is transformed into a three-dimensional angle deviation vector that can be quantified to assess positioning accuracy, thus realizing a chain transition of data from location information to error measurement indicators.
[0041] S1.3: Using preset global geospatial discretization rules, the Earth's surface is divided into grids according to fixed longitude and fixed latitude intervals. Each generated latitude and longitude grid unit is assigned a globally unique geographic identifier code to construct a standard geographic grid index space covering the entire monitoring area.
[0042] Based on the preset global geospatial discretization rules and the standardized dual-end geographic location information set output by the preceding steps, when performing the Earth surface grid division operation, it is necessary to first call the latitude and longitude segmentation parameter set in the geographic modeling module, load the numerical configuration of fixed longitude interval and fixed latitude interval, and determine the discretization resolution.
[0043] The longitude data domain on the Earth's surface is periodically divided according to the fixed longitude interval to generate a non-repeating sequence of longitude segments, and longitude dividing lines of adjacent grids are established at the boundary of each segment.
[0044] The latitude data domain on the Earth's surface is continuously divided according to the fixed latitude interval to form a sequence of latitude segments, and latitude dividing lines of adjacent grids are established at the boundary of each segment.
[0045] A Cartesian product operation is performed based on the set of longitude and latitude dividing lines to generate a set of rectangular grids covering the entire globe, with each rectangular grid having a clearly defined latitude and longitude range boundary.
[0046] For each generated latitude and longitude grid, the unique identifier generation module is called to perform hash encoding based on the minimum longitude, maximum longitude, minimum latitude, and maximum latitude to ensure that the identifier code is not repeatable globally.
[0047] The unique identifier is structurally bound to the latitude and longitude range boundary to form a standard geographic grid index spatial data object with global indexing capabilities, and stored in the spatial index database for subsequent mapping calls.
[0048] Through the above discretization process and unique identification encoding method, the results of the previous step are transformed into standardized and searchable geographic grid index data, achieving the expected technical effect of quickly locating the target grid based on latitude and longitude range.
[0049] S1.4: Based on the standard geographic grid index space, the target latitude and longitude coordinates in the standardized dual-end geographic location information set are mapped to the corresponding latitude and longitude grid cells, and the geographic identification code bound to the latitude and longitude grid cell is extracted to generate a spatial positioning identifier associated with the target location.
[0050] S1.5: The spatial positioning identifier, the three-dimensional angle deviation vector, and the Earth geometric model identifier selected during this task execution are structurally encapsulated to generate an initial positioning task record package containing complete context information, which serves as the basic input data for subsequent construction of geographic error fingerprint data clusters.
[0051] Step S2: Based on the unique geographic identifier, the three-dimensional angle deviation vector is associated and mapped with the Earth's geometric model and relative spatial configuration parameters used in this mission, constructing a geographic error fingerprint data cluster containing the mean, variance, and direction of maximum deviation. Specifically, this includes: S2.1: Obtain the three-dimensional angle deviation vector after manual fine-tuning confirmation, the Earth geometric model identifier used in this task, and the relative spatial configuration parameters including horizontal distance and elevation difference. Based on the unique geographic identifier, perform key-value association processing on the three-dimensional angle deviation vector, the Earth geometric model identifier, and the relative spatial configuration parameters to generate a set of original deviation records with spatial index attributes.
[0052] Based on the initial positioning task record package output in step S1.5, the three-dimensional angle deviation vector after manual fine-tuning and confirmation, the Earth geometric model identifier used in this task, and the relative spatial configuration parameters including horizontal distance and elevation difference are parsed to form the original input object of this step.
[0053] Perform data integrity verification on the three-dimensional angle deviation vector to verify the existence and numerical validity of the azimuth, pitch, and zoom components. The vector that passes the verification is used as the core deviation data.
[0054] Perform an enumeration matching operation on the Earth geometry model identifier to ensure that it belongs to only one of the following: ellipsoidal model, spherical model, or two-dimensional planar model. Use the matching result as the model type index key value.
[0055] Structural analysis is performed on the relative spatial configuration parameters to extract horizontal distance values and elevation difference values, forming configuration parameter data pairs.
[0056] Using the unique geographic identifier as the primary key, key-value association processing is performed on the deviation data, model type index key-value, and configuration parameter data pairs. A hash mapping is then used to generate a set of original deviation records with spatial index attributes.
[0057] By using key-value association and structured encapsulation, the results of the previous step are transformed into spatially indexable deviation record data, enabling subsequent deviation feature extraction and statistical analysis.
[0058] For example, in a certain positioning task, the three-dimensional angle deviation vector after manual fine-tuning and confirmation is: azimuth deviation 2.35°, pitch deviation -1.12°, and zoom magnification deviation 0.15 times. The Earth geometric model used in this task is identified as an ellipsoidal model, with a horizontal distance of 1520 meters and an elevation difference of 85 meters in the relative spatial configuration parameters, and a unique geographic identifier of grid ID_45_128. The three-dimensional angle deviation vector is encoded into [2.35, -1.12, 0.15], the model type index key is EL, and the configuration parameter data pairs are [1520, 85]. Key-value association processing generates the original deviation record set: primary key ID_45_128 → {deviation vector: [2.35, -1.12, 0.15], model type: EL, configuration parameters: [1520, 85]}. This set was subsequently used in S2.2 for orthogonal decomposition of pitch and azimuth components, ensuring the correct spatial attribution of extracted statistical characteristics. Ultimately, it achieved full binding of deviation data with spatial location, model type, and configuration parameters, effectively supporting dynamic model selection based on geographic error fingerprints.
[0059] S2.2: The three-dimensional angle deviation vector in the original deviation record set is orthogonally decomposed into pitch and azimuth components. The fluctuation characteristics of the pitch and azimuth components in the time series are extracted using a sliding window statistical algorithm to generate a deviation component feature set containing periodic oscillation amplitude and trend offset.
[0060] Based on the original set of deviation records generated in step S2.1, when performing deviation component feature extraction, the three-dimensional angle deviation vector is projected onto the pitch and azimuth coordinate axes respectively to complete the orthogonal decomposition process, forming the pitch component sequence and azimuth component sequence as independent input sequences for subsequent analysis.
[0061] A sliding window statistical algorithm is applied to the pitch angle component sequence. The sequence is segmented according to the preset window length and window step parameters, and the local mean and local difference are calculated in each slice to form a time series fluctuation curve for detecting periodic features.
[0062] The same sliding window slicing operation is performed on the azimuth component sequence, and the local extreme difference and local trend slope of each slice are calculated to characterize the short-term fluctuation range and trend change rate.
[0063] For the detected pitch angle fluctuation curve and azimuth angle trend curve, spectral analysis is performed to extract the significant peak amplitude that appears in low frequency or specific frequency band as the periodic oscillation amplitude index, and the trend offset index is obtained by linear fitting.
[0064] The periodic amplitude is calculated using the following formula: Where A is the periodic oscillation amplitude, and N is the number of windows. Let be the oscillation amplitude value detected in the i-th window.
[0065] The following formula is used to calculate the trend offset: Where T is the trend offset, a avg Let a be the sequence mean. start t is the starting value of the sequence. end With t start These are the end and start timestamps of the component sequence.
[0066] By using the sliding window and spectrum analysis methods described above, the original deviation component data is transformed into a deviation component feature set containing periodic oscillation amplitude and trend offset, thereby achieving a quantitative characterization of the dynamic behavior of historical deviations.
[0067] For example, in a certain intelligent monitoring scenario, the horizontal distance between the camera and the target object is 1500 meters, and the elevation difference is 12 meters. The collected three-dimensional angle deviation vector is orthogonally decomposed to obtain the pitch angle component sequence [-0.12, -0.15, -0.10, -0.18, -0.14] radians and the azimuth angle component sequence [0.05, 0.06, 0.08, 0.07, 0.09] radians. The sliding window length is set to 3, and the step size is set to 1. Window slicing is performed on the pitch angle component to obtain the window mean and local differences, and spectral analysis is performed. The peak amplitude of the 1Hz frequency band is detected to be 0.06 radians, and the periodic oscillation amplitude is calculated to be 0.06 radians according to the formula. The azimuth component is processed in the same way, and the trend slope is calculated to be T = 0.005 radians / second. This deviation component feature set significantly improves the ability to identify periodic oscillations and stable offsets in subsequent statistical moment calculations, effectively supporting the accuracy of model fit scoring.
[0068] S2.3: Based on the aforementioned deviation component feature set and relative spatial configuration parameters, perform multidimensional statistical moment calculation operations to calculate the arithmetic mean of the pitch angle component and the azimuth angle component as a central tendency indicator, calculate the standard deviation as a dispersion indicator, and calculate the kurtosis as a distribution shape indicator, so as to generate a basic statistical indicator set characterizing the statistical characteristics of the error distribution.
[0069] The input conditions are the pitch and azimuth component feature sets that have been orthogonally decomposed, as well as the relative spatial configuration parameters containing information such as horizontal distance and elevation difference.
[0070] The arithmetic mean is calculated based on the pitch angle component feature set. All pitch angle data are summed and divided by the sample size to obtain the pitch angle mean, which characterizes the central trend. The formula is: in, Let i be the pitch angle sample value of the i-th sample. This represents the number of samples.
[0071] The arithmetic mean is calculated based on the azimuth component feature set, using the same formula as the elevation mean, to obtain the azimuth mean.
[0072] The standard deviation is calculated using the pitch angle component feature set. First, the difference between each sample value and the mean is calculated and squared. Then, the mean is calculated, and finally, the square root is taken. The formula is as follows: in, The standard deviation is denoted as .
[0073] The standard deviation is calculated using the azimuth component feature set, employing the same formula structure as the elevation angle.
[0074] Kurtosis is calculated based on the pitch angle component, using the following formula: in, Kurtosis is used to characterize the tail characteristics of a distribution relative to a normal distribution.
[0075] Kurtosis is calculated based on azimuth components, using the same formula structure, and the result is used as an indicator of azimuth distribution morphology.
[0076] Based on the relative spatial configuration parameters, the mean pitch angle, standard deviation of pitch angle, kurtosis of pitch angle, mean azimuth angle, standard deviation of azimuth angle, and kurtosis of azimuth angle are combined into a basic statistical index group according to a preset data structure.
[0077] Through the above calculations and encapsulation, the deviation component characteristics of the previous step are transformed into statistical indicators that have the ability to fully describe the central trend, dispersion, and distribution pattern, thereby realizing the quantitative feature extraction of the error distribution.
[0078] For example, in a positioning task with an elevation difference of 12.5 meters and a horizontal distance of 1450 meters, the pitch angle component feature set contains 50 samples, with sample values ranging from -2.3 degrees to 3.1 degrees, and the azimuth angle component feature set contains 50 samples, with sample values ranging from -1.8 degrees to 2.7 degrees. In calculating the mean pitch angle, the sum of all samples is 15.5 degrees, which, when plugged into the formula, yields... In the calculation of the standard deviation of the pitch angle, the sum of the squares of the differences is 4.85. Substituting this into the formula... In the calculation of pitch angle kurtosis, the sum of the fourth powers is 0.025. (Substituting this into the formula...) The kurtosis value is 0.0005. The sum of the sample azimuth mean is 14.2 degrees, and the mean is... The sum of squared standard deviations was 4.12, and the standard deviation was [value missing]. The kurtosis is 0.021, and its kurtosis value is [value missing]. The above six index values, along with the spatial configuration parameters of the current task, are encapsulated into a basic statistical index group, ultimately enabling a quantitative description of the error distribution of the task. This data is then used for subsequent maximum deviation direction search and error fingerprint data cluster construction, significantly improving the accuracy and robustness of the model's dynamic optimization.
[0079] S2.4: Use the vector extreme value search algorithm to traverse all three-dimensional angle deviation vectors in the original deviation record set, calculate the magnitude of each three-dimensional angle deviation vector in the spherical coordinate system and compare their sizes, and determine the three-dimensional angle deviation vector with the largest magnitude as the maximum deviation direction vector, so as to generate the maximum deviation direction that represents the extreme error.
[0080] Given the input of the basic statistical index set, unique geographic identifier, and original deviation record set output in step S2.3, a vector extreme value search algorithm is performed on the original deviation record set to extract the extreme error vector with the largest magnitude and directional orientation from all three-dimensional angle deviation vectors. For each three-dimensional angle deviation vector in the set, it is first converted into radial, polar, and azimuth components according to the definition of spherical coordinates, and then calculated using the spherical coordinate magnitude calculation formula. The value is the vector magnitude, which is used as the extremum determination index for this record. All deviation vector magnitudes are sorted in a heap structure according to their numerical values, retaining the original vector corresponding to the current maximum value and recording its polar and azimuth components. The maximum magnitude vector is normalized and projected onto a unit sphere to form a standardized maximum deviation direction vector, generating a direction identifier data object representing the direction of this extreme error. Through vector extremum search and spherical projection processing, the deviation feature data from the previous step is transformed into a maximum deviation direction technical index with directional and intensity quantification, achieving a connection between extreme error orientation identification and subsequent error fingerprint construction.
[0081] For example, in a certain monitoring task, the original deviation record set contains 100 three-dimensional angular deviation vectors. Each vector has a pitch component ranging from -5° to +8°, an azimuth component ranging from -7° to +10°, and a zoom component ranging from -0.3 to +0.5. Converting these vectors to spherical coordinates, the radial component is calculated using the following formula: in This is the pitch angle difference. This is the azimuth difference. This represents the zoom difference. The vector with the largest modulus was calculated to be... Its module length is: The value is 12.91. After normalization and projection, the vector yields the directional components (0.62, 0.77, 0.039) on a unit sphere, generating the direction of maximum deviation. This identifier is used to construct a geographic error fingerprint data cluster. Final validation shows that using this directional identifier under the same latitude and longitude grid significantly improves the accuracy of model fit scoring and enhances the robustness of positioning model selection in subsequent dynamic optimization steps.
[0082] S2.5: The basic statistical index group, the direction of maximum deviation, the Earth geometric model identifier, and the relative spatial configuration parameters are structurally encapsulated and assembled into a complete data object containing mean, variance, kurtosis, and direction of maximum deviation according to a preset data dictionary format, so as to generate a final geographic error fingerprint data cluster that can be retrieved and called.
[0083] like Figure 2 As shown, step S3: For each of the three independent geographic error fingerprint data clusters corresponding to the ellipsoidal model, spherical model, and two-dimensional plane model under each latitude and longitude grid unit, a model regional error response mapping relationship library is established to store historical deviation distribution characteristics. Specifically, this includes: S3.1: Obtain the complete geographic error fingerprint data cluster object generated in the previous steps, which includes the mean, variance, kurtosis and the direction of the maximum deviation. Perform classification and aggregation processing based on the Earth's geometric model identifier. Collect the independent data clusters belonging to the ellipsoidal model, spherical model and two-dimensional plane model within the same latitude and longitude grid cell into three temporary logical containers to generate a set of error features to be entered into the database, isolated by model type.
[0084] Upon receiving the complete set of geographic error fingerprint data clusters output from step S2.5, including mean, variance, kurtosis, and maximum deviation direction, and using the Earth's geometric model identifier as the classification basis, a structured parsing operation is performed to separate the model type field in each entry. The parsed data clusters are grouped according to their unique geographic identifiers. Within each group, a classification index is created based on the model type identifier. Data clusters with a type field equal to an ellipsoidal model are written to the first temporary logical container, those with a type field equal to a spherical model are written to the second temporary logical container, and those with a type field equal to a two-dimensional planar model are written to the third temporary logical container. The memory buffer management module is invoked to allocate independent buffers for the three temporary logical containers, ensuring that the classified data do not interfere with each other and that rapid data insertion is feasible. Consistency verification is performed on the data clusters within each temporary logical container, checking whether the mean dimension matches, whether the variance is a positive definite matrix, whether the kurtosis is within the preset stable range, and whether the maximum deviation direction format conforms to the data dictionary constraints. After successful verification, the three types of temporary logical containers are combined into error feature sets to be inserted into the database, isolated by model type, and each set is appended with a unique geographic identifier and classification timestamp metadata. Through the above classification and aggregation process, the structured error data from the previous step is transformed into a set to be stored in the database that has model type isolation characteristics and is suitable for subsequent multi-level storage index construction, thus achieving the initial data preparation effect in the process of building the model regional error response mapping relation database.
[0085] For example, in a monitoring system covering the middle reaches of the Yangtze River, the preceding steps have generated a complete geographic error fingerprint data cluster object with a unique geographic identifier "CN4301-Grid05". The mean values for the ellipsoidal model are [0.02, -0.01, 0.005], the mean values for the spherical model are [0.015, -0.008, 0.004], and the mean values for the two-dimensional plane model are [0.005, -0.004, 0.002]. All three models have positive definite variances, kurtosis of 3.1, 2.9, and 2.7 respectively, and the direction of maximum deviation points due east. The classification and aggregation process writes the ellipsoidal model data cluster into a first temporary logical container, the spherical model data cluster into a second temporary logical container, and the two-dimensional plane model data cluster into a third temporary logical container. Through consistency verification, the ellipsoidal mean length is consistent with the configured dimension threshold, the spherical kurtosis is within a stable range, and the direction of maximum deviation in the two-dimensional plane conforms to the azimuth encoding rules. The final set of features to be added to the database, formed by the combination of the three types of containers, is given a unique geographic identifier "CN4301-Grid05" and a timestamp "2024-03-15T10:35:00Z". During the subsequent construction of the index structure in S3.2, this set can be directly mapped to the first-level index node, effectively supporting the technical effects of fast location retrieval and calling by model type.
[0086] S3.2: Based on the unique geographic identifier in the set of error features to be entered into the database as the primary key index, a multi-level storage structure is constructed using a hash mapping algorithm. The latitude and longitude grid units are nested as the first-level index and the Earth geometric model is nested as the second-level index to generate a basic framework for a model area error response mapping relation library with fast positioning capabilities.
[0087] Based on the unique geographic identifier in the set of error features to be entered into the database as the first primary key index, the hash mapping initialization routine is called to abstract the mapping table from the primary key to the storage node pointer in memory, and the latitude and longitude grid index parameter set is loaded as the key value field of the first level index.
[0088] A hash function is performed on each primary key within the first-level index domain, and its hash value is mapped to a discrete address space according to a preset number of buckets. This ensures that the index maintains stable search performance in the event of a hash collision through chained storage or an open addressing strategy.
[0089] A second-level index container is created under the first-level index node. The Earth geometry model identifier is used as the secondary key value and an independent hash encoding is performed on it, so that the three model types under each latitude and longitude grid node form a nested distribution in the storage structure.
[0090] The storage block metadata structure is bound to the nested first-level latitude and longitude nodes and the second-level earth model type nodes. This metadata includes the number of records, byte offset, version number and checksum field to facilitate integrity verification for subsequent write and retrieval operations.
[0091] Memory layout optimization is performed on the nested storage structure, storing the first-level index nodes in contiguous memory segments, and allocating the second-level index nodes and their associated storage blocks in adjacent addresses, reducing cross-page access latency and improving fast location capabilities.
[0092] Through the hash mapping and hierarchical nesting processing methods described above, the model classification results of the previous step are transformed into a basic framework of a model area error response mapping relation library with rapid positioning capabilities, enabling efficient indexing and retrieval of target latitude and longitude grids and Earth geometric models.
[0093] For example, in the latitude and longitude grid division of a monitoring area, the unique geographic identifier of each latitude and longitude grid unit is a 16-byte UUID. The error feature set to be entered into the database includes three data clusters: ellipsoidal models, spherical models, and two-dimensional planar models. The system calls the SHA-256 hash function to perform hash calculation on the UUID, and uses the hash value modulo 256 as the first-level bucket index. The three model type identifiers within the first-level bucket are encoded using CRC32 hash to generate second-level index values. The first-level index table has a size of 256 buckets, with each bucket storing an average of about 10 latitude and longitude nodes. The second-level index container is a fixed-length array, with each model type identifier occupying a 32-byte metadata area. The metadata area records the serialization length, offset, and most recent update timestamp of the data cluster object. Before memory layout optimization, the average time to retrieve model data for any latitude and longitude grid unit was 1.8 milliseconds. After optimization, the average time was reduced to 0.5 milliseconds, significantly improving the retrieval speed of historical deviation distribution features in the positioning task and ensuring the real-time performance and stability of the model dynamic optimization process.
[0094] S3.3: Perform serialization encapsulation processing on each model independent data cluster in the error feature set to be entered into the database, and convert the mean, variance, kurtosis and the direction of maximum deviation into a standard storage byte stream according to a preset binary data dictionary format to generate a standardized error fingerprint record package that conforms to the database writing specification.
[0095] S3.4: Using the second-level index path of the basic framework of the model area error response mapping relation library, the standardized error fingerprint record package is written to the corresponding storage node, and a timestamp version control mechanism is established to retain the historical evolution trajectory, thereby completing the full initialization construction and persistent storage of the model area error response mapping relation library.
[0096] The system receives the standardized error fingerprint record package generated in step S3.3 as input. It uses the second-level index path in the basic framework of the model area error response mapping relation library to locate the target storage node, ensuring the uniqueness of the combination of the latitude and longitude grid cell primary key and the secondary index of the Earth geometric model. It calls the index location result to establish a data writing channel consistent with the byte stream structure of the current error fingerprint record package, configuring the block size and verification mechanism of the write buffer to ensure the integrity and consistency of batch data writing. It initiates the serialized data writing operation, writing the binary byte streams of mean, variance, kurtosis, and the direction of maximum deviation to the corresponding storage nodes one by one according to the index path, and performing CRC verification during the writing process to capture potential data errors. It constructs a timestamp version control mechanism, generating a unique version identifier code and appending it to the storage node metadata area each time a write operation is performed, recording the write time, data length, and model identifier to form a traceable historical evolution trajectory. After persistent storage is completed, the index path, version control information and data status flags are combined and encapsulated into library file index metadata and stored in the global directory mapping table to ensure that subsequent read-only queries can accurately access each version record. Through the above processing method, the result of the previous step is transformed into a model area error response mapping relationship library data structure with historical evolution records and fast retrieval capabilities, realizing the persistent storage and traceable retrieval of historical deviation distribution characteristics for different latitude and longitude grids.
[0097] For example, within a certain monitored area, the unique geographic identifier is G4321, corresponding to an ellipsoid model with a mean of [0.12°, -0.05°], variance elements of 0.004 and 0.007, kurtosis of 3.21, and maximum deviation direction of [-0.4°, 0.15°]. These values are serialized into a standardized error fingerprint record packet with a length of 128 bytes using a preset binary format. The storage node is located through the second-level index path {G4321, ELLIPSOID}. During the write operation, a CRC-32 check is performed after each batch of 64-byte data blocks is completed, and the checksum is stored in the check field. The write process generates a timestamp version identifier V20230415103045, recording the write time "2023-04-15 10:30:45", model type "ELLIPSOID", and data length of 128 bytes. After the write operation is complete, the version control information and data status flags are encapsulated into metadata objects and stored in the global directory mapping table index {G4321,ELLIPSOID,V20230415103045}. Through subsequent read-only retrieval interface calls, the deviation records of the current and all historical versions can be returned when querying the grid and model type, realizing the long-term archiving and dynamic tracking of the deviation characteristics of the ellipsoid model in this region.
[0098] S3.5: Based on the completed model area error response mapping relationship library, perform integrity verification operation, traverse the data entries of the ellipsoidal model, spherical model and two-dimensional plane model under all latitude and longitude grid units, verify the consistency of mean dimension and positive definiteness of variance, generate a health status report characterizing the availability of the database, and activate the read-only query interface of the library file for subsequent steps to call.
[0099] Based on the established model area error response mapping relation library, the structured traversal interface is called to load all latitude and longitude grid cell indices and their corresponding three sets of Earth geometric model data entries as verification input objects.
[0100] For each latitude and longitude grid cell, a dimension consistency comparison operation is performed on the mean. The dimension value of the current entry is generated using the vector length calculation function. This dimension value is then matched with the system's preset standard statistical dimensions to determine equivalence. Inconsistent entries are extracted to form a set of dimension anomaly records.
[0101] For each latitude and longitude grid cell, a positive definiteness verification process is performed on the variance. The eigenvalue decomposition method is used to calculate all eigenvalues of the matrix and determine whether all of them are greater than zero. If there are non-positive eigenvalues, the corresponding matrix is marked as failed and the reason code is recorded.
[0102] By combining the dimensional anomaly record set and the variance failure record set, logical aggregation is performed to generate the main data of the structured verification report, which includes the anomaly entry identifier, anomaly nature, and occurrence location.
[0103] The main data of the verification report is encapsulated into a health status report object, with a timestamp and database version information attached. When the status is available, the file access management module is called to set the library file to read-only mode and activate the read-only query interface to provide calls for subsequent steps.
[0104] Through the chained processing described above, the results of the previous step are transformed into a health status report with dimensional consistency and positive variance definiteness verification, thereby realizing the availability confirmation and secure access control of the model regional error response mapping relation library.
[0105] For example, in a real-world coastline monitoring deployment scenario, the established model area error response mapping database contains 480 latitude and longitude grid cells, each corresponding to three error fingerprint data clusters: an ellipsoidal model, a spherical model, and a two-dimensional planar model. The system sequentially traverses all entries, retrieves the mean dimension value, sets the standard statistical dimension to 3, and calls the dimension consistency comparison function. It finds that two latitude and longitude grid cells under the spherical model have a mean dimension of 4, marking them as dimension anomalies. For variance positive definiteness verification, the eigenvalue decomposition method is used: in For variance, It is an eigenvalue diagonal matrix. This is the eigenvector matrix. When detected... When a negative value is found, the entry is considered invalid. In this example, the variance eigenvalue set of one latitude and longitude grid cell in the 2D planar model is {2.1, -0.3, 1.4}, which is listed as invalid due to the presence of a negative value -0.3. Finally, the abnormal record set is integrated to generate a health status report. The report contains a total of 480 entries, with 3 abnormal entries. It includes the current database version v2.3 and a timestamp of 2024-06-15:14:05. Based on the report's status being available, the system activates the read-only query interface to ensure the security and consistency of subsequent retrieval operations, achieving long-term stable availability of the model area error response mapping relation library in this scenario.
[0106] like Figure 3 As shown, step S4: Receive the target Global Positioning System coordinates of the new positioning task and map them to the corresponding latitude and longitude grid cell. Retrieve the historical deviation distribution characteristics of the three types of Earth geometric models under that latitude and longitude grid cell from the model area error response mapping relationship library. Specifically, this includes: S4.1: Obtain the target GPS coordinate information for the new positioning task, and use a spatial discretization mapping algorithm to perform grid index calculation on the target GPS coordinate information to generate a unique geographic identifier code pointing to a specific storage area.
[0107] The system receives target GPS coordinate data for a new positioning task. Input includes real-time latitude, longitude, and altitude values uploaded by the target GPS terminal, ensuring the data format is consistent with the standardized dual-end geographic location information set generated in previous steps. A spatial discretization mapping algorithm is used to calculate the latitude and longitude grid position of the target GPS coordinate data. This process first calls the system's preset longitude and latitude interval parameters, dividing the target's latitude and longitude values by the corresponding intervals and rounding them down to obtain the target's longitude and latitude index values in the global geographic grid. A binary combination encoding operation is performed on the longitude and latitude index values, applying nested displacement and weighted summation rules to generate unique index values. This ensures that the index value corresponds to a unique storage node in the model's regional error response mapping database. A binary compatibility check is performed between this unique index value and the previously defined geographic identifier format to ensure no conflicts and retain the traceability of historical versions. By reconstructing a data structure conforming to system standards using the aforementioned index values, this data structure is output as a unique geographic identifier for the target, providing a spatial positioning entry point for subsequent retrieval of historical deviation distribution characteristics of the three types of Earth geometric models under this latitude and longitude grid unit. Through a spatial discretization mapping algorithm, the real-time coordinates of the target from the previous step are transformed into a globally unique geographic index identifier that can directly point to the storage area, enabling rapid positioning of new tasks within the model area error response mapping database.
[0108] For example, in a high-altitude monitoring task, the target GPS terminal outputs the coordinates as 121.482°E, 31.243°E, and 50 meters altitude. The system presets a longitude interval of 0.1 degrees and a latitude interval of 0.1 degrees. In the spatial discretization mapping algorithm, the formula for calculating the longitude index value is: The formula for calculating latitude index values is: The longitude index is calculated to be 1214, and the latitude index is calculated to be 312. The combined encoding rule is set as follows: the longitude index is shifted left by 16 bits and then bitwise ORed with the latitude index to obtain a unique index value. That is, uid=79507408. After binary compatibility verification, this uid conforms to the geospatial identifier format specification and can uniquely point to the storage node. Using this unique geospatial identifier to search the database, data entries containing historical deviation characteristics of ellipsoidal models, spherical models, and two-dimensional planar models can be located within milliseconds, significantly improving the efficiency and accuracy of subsequent model fit scoring calculations.
[0109] S4.2: Based on the target unique geographic identifier as the retrieval key, access the index structure of the model regional error response mapping relation library to locate and extract the multi-model historical deviation dataset bound to the target unique geographic identifier.
[0110] For the target unique geographic identifier code generated through step S4.1, it is used as the primary key retrieval condition and input into the index query engine of the model area error response mapping relation library to ensure that the access path completely matches the first-level latitude and longitude grid index in the storage structure.
[0111] The hash value calculation and conflict detection are performed on the unique geographic identifier of the target using a hash positioning algorithm. After matching the corresponding first-level node, the branch information of the Earth's geometric model is parsed along the preset second-level nested index path, guiding the query process to a specific storage node.
[0112] While locating the storage node, a timestamp comparison of the version control mechanism is performed, prioritizing the selection of the latest version record to ensure that the retrieved historical deviation dataset is timely and reliable.
[0113] Perform deserialization on the binary serialized error fingerprint record packet within the node to restore the mean, variance, kurtosis, and direction of maximum deviation into a computable structured data object, keeping the dimensions of each statistical indicator consistent with the original construction.
[0114] The data validation module performs dimensionality consistency and positive definiteness checks on the mean and variance after deserialization, filtering out any abnormal records that do not meet the preset mathematical constraints, in order to ensure the accuracy of the input data for subsequent physical heuristic judgment.
[0115] Through the chained retrieval and parsing process described above, the unique geographic identifier of the target in the previous step is transformed into a multi-model historical deviation dataset bound to it, thereby enabling near real-time extraction and usability verification of error features of three types of Earth geometric models under this latitude and longitude grid unit.
[0116] For example, in an urban surveillance scenario located at latitude 39.90° and longitude 116.38°, when a PTZ camera performs a new target localization task, the unique geographic identifier generated in step S4.1 is "GRID-39.90-116.38". After this identifier is input into the indexing engine, the value calculated by the hash function locates the first-level index node, whose secondary path contains three types of sub-nodes: ellipsoidal model, spherical model, and two-dimensional planar model. The version control mechanism detects that the latest timestamp of the ellipsoidal model node is 2024-05-15, confirming that this node is a valid record. After deserialization, the mean is (0.12, -0.05, 0.08), the variance is [0.0025, 0.0004, 0.000.; 0.0004, 0.0016, 0.0002; 0.000., 0.0002, 0.0020], the kurtosis is 1.85, and the direction of maximum bias is (0.12, -0.10, 0.15). Positive definiteness verification shows that all variance eigenvalues are positive, and the dataset can be used for subsequent S4.3 parsing. This retrieval process ensures the rapid and accurate extraction of historical bias data from multiple models under large-scale monitoring deployment conditions, significantly improving the stability of the input for model fit determination.
[0117] S4.3: Perform structured parsing processing on the multi-model historical deviation dataset to separate three independent geographic error fingerprint data clusters corresponding to the ellipsoidal model, spherical model and two-dimensional plane model, respectively, in order to construct a set of candidate features for the model to be analyzed.
[0118] Based on the multi-model historical deviation dataset extracted in step S4.2, the input object is set as a composite data structure carrying the type identifiers of ellipsoidal model, spherical model and two-dimensional plane model, and includes statistical indicators such as mean, variance, kurtosis and direction of maximum deviation.
[0119] The model type identification operation is performed on the multi-model historical deviation dataset. The predefined model type identifier field in the structure is read, and the dataset entries are divided into independent processing branches according to three model types: ellipsoid, sphere, and two-dimensional plane through logical matching.
[0120] Within each processing branch, the structured parsing module is called to perform field splitting and format checks on the mean and variance indexes, converting them into standard vector and matrix forms that conform to the data dictionary conventions, and generating statistical data objects with unit consistency.
[0121] Feature encapsulation is performed on kurtosis and the direction of maximum deviation. The kurtosis value is mapped to a single numerical index describing the distribution pattern, and the direction of maximum deviation is encapsulated as a direction vector in a spherical coordinate system for use in subsequent physical rule determination.
[0122] The mean, variance, kurtosis, and maximum deviation direction, after being analyzed and formatted as described above, are combined into independent geographic error fingerprint data cluster objects within the framework of model type identification. These three types of data cluster objects are then aggregated to form a set of candidate features for the model to be analyzed.
[0123] Through structured analysis, the multi-model historical deviation dataset from the previous step is transformed into independent geographic error fingerprint data clusters for ellipsoidal models, spherical models, and two-dimensional planar models, achieving the expected technical effect of differentiated feature extraction for each model.
[0124] For example, in a surveillance scenario in a certain urban area of Beijing, the unique geographic identifier of the target is mapped to the latitude and longitude grid cell ID CN-BJ-101. The retrieved dataset contains an ellipsoidal model with mean [0.12, -0.05, 0.08], variance [[0.0025, 0, 0], [0, 0.0036, 0], [0, 0, 0.0016]], kurtosis of 3.25, and spherical coordinates of the direction of maximum deviation (azimuth 12.5°, elevation -3.2°); spherical model mean [0.09, -0.04, 0.07], variance [[0.0027, 0, 0], [0, 0, 0.0016]]. The dataset contains ellipsoids, spheres, and two-dimensional planes. The mean is [0.0034, 0], variance is [[0.0018, 0, 0], kurtosis is 3.10, and the maximum deviation direction is (azimuth 11.8°, pitch -2.9°). The two-dimensional plane model has the following mean: [0.05, -0.02, 0.04], variance [[0.0018, 0, 0], [0, 0.0025, 0], [0, 0, 0.0012]], kurtosis is 2.95, and the maximum deviation direction is (azimuth 9.6°, pitch -2.1°). Model type identification is performed on this dataset. The ellipsoid, sphere, and two-dimensional plane entries are parsed into their corresponding mean, variance, kurtosis, and maximum deviation direction. The mean is converted to radians for subsequent rule determination. The formula for the mean-radian conversion is: Where α is the original angle value and π is the constant of pi. Numerical testing is performed on the variance to ensure positive definiteness, floating-point format is standardized for kurtosis, and spherical coordinate vector standardization is applied to the direction of maximum deviation. The final candidate feature set contains three independent geographic error fingerprint data clusters, which can be directly input into step S4.4 for traversal analysis. Each model candidate cluster possesses complete mean, variance, kurtosis, and directionality characteristics, supporting the strict execution of physical heuristic rules.
[0125] S4.4: Traverse each independent geographic error fingerprint data cluster in the model candidate feature set, and extract structured statistical indicators including mean, variance and direction of maximum deviation to form the model historical deviation distribution features for physical heuristic rule determination.
[0126] Step S5: Based on the retrieved historical deviation distribution characteristics, perform physical heuristic rule judgment. If significant periodic fluctuations are detected in the pitch angle component, the score of the corresponding Earth geometry model is reduced. If a stable unidirectional offset is detected in the azimuth angle component, the basic score is retained, thereby generating the model fit score value of each Earth geometry model.
[0127] In this embodiment, the significant periodic fluctuation specifically refers to the regular sinusoidal fluctuation pattern of pitch angle deviation over time detected in the historical deviation dataset. It arises from the fitting error of a specific Earth geometry model, such as an ellipsoidal model, to the surface curvature in high-latitude regions. This error manifests periodically with Earth's rotation or platform motion. The significant periodic fluctuation can be obtained by performing a Fast Fourier Transform on the pitch angle deviation sequence and extracting the main peak frequency and peak energy from its power spectrum as quantification features. This significant periodic fluctuation is a hallmark signal of a systematic mismatch in the Earth geometry model within a specific geographical region, indicating that the Earth geometry model fails to accurately describe the local Earth geometry. Therefore, its fit score in the corresponding region must be reduced to optimize the selection of the Earth geometry model.
[0128] Step S5 specifically includes: S5.1: Perform frequency domain transformation on the pitch angle deviation sequence in the retrieved historical deviation distribution characteristics to extract the significant periodic fluctuation feature parameters of the pitch angle component, and use these significant periodic fluctuation feature parameters of the pitch angle component as input conditions for subsequent fluctuation suppression determination.
[0129] A signal sampling matrix is established from the pitch angle deviation sequence in the retrieved historical deviation distribution characteristics, and the deviation value at each time point is used as the column element of the matrix to form a complete time series signal set.
[0130] The pitch angle deviation sequence is subjected to mean removal processing to eliminate the DC component and improve the sensitivity to periodic components in subsequent frequency domain transformation.
[0131] The pitch angle deviation sequence after mean removal is used to perform frequency domain transformation using the Fast Fourier Transform (FFT) algorithm, which maps the time domain signal to a set of frequency domain spectral lines.
[0132] The power spectral density (PSD) of the frequency domain spectral lines obtained by transformation is calculated, and the energy distribution of each frequency component is determined according to the following formula: in, For power spectral density, For frequency, The complex magnitude after FFT. This represents the number of sampling points.
[0133] The peak frequency and its corresponding energy value are searched on the power spectral density curve, and the main peak frequency f and peak energy are extracted as the core components of the significant periodic fluctuation characteristic parameters.
[0134] The main peak frequency and peak energy are weighted and combined according to preset feature weight coefficients to generate a set of characteristic parameters for significant periodic fluctuations in the pitch angle component, which serve as input conditions for subsequent fluctuation suppression determination.
[0135] Through the above frequency domain transformation and feature extraction processing, the historical deviation distribution characteristics of the previous step are transformed into quantitative feature data reflecting the intensity of periodic fluctuations and the main period information, so as to realize the accurate input for judging the oscillation tendency of pitch angle modeling.
[0136] For example, in a high-latitude monitoring scenario, the pitch angle deviation sequence sampling rate is set to 10Hz, with 1024 sampling points. After mean removal, the signal undergoes FFT transformation, resulting in a frequency resolution of approximately 0.00977Hz. Power spectral density calculations show a main peak frequency at 0.05Hz, with a corresponding peak energy calculated as 3.45. Weighting the main peak frequency and peak energy with coefficients of 0.6 and 0.4, respectively, yields the significant periodic fluctuation characteristic parameter value. This feature parameter is input into the fluctuation suppression judgment logic. The system determines that the ellipsoidal model has a strong tendency for periodic oscillations in this high-latitude scenario, and will subsequently optimize the model selection results by reducing the model score.
[0137] S5.2: Perform latitude correlation matching operation based on the significant periodic fluctuation characteristic parameters of the pitch angle component to generate a pitch angle modeling oscillation tendency index, and use the pitch angle modeling oscillation tendency index as a key indicator to evaluate the applicability of the ellipsoidal model in a specific high-latitude region.
[0138] Based on the significant periodic fluctuation characteristic parameters of the pitch angle component extracted in step S5.1, an input set for correlation analysis between the period amplitude and the latitude value of the target area is established. The significant periodic fluctuation characteristic parameters are retrieved according to the unique identifier of the latitude and longitude grid of the task target, and a pairing mapping operation between the parameters and latitude data is performed to form a two-dimensional data pair set for subsequent correlation calculation. Using the Pearson correlation coefficient calculation method, based on the paired data of the period amplitude sequence and latitude sequence, the linear correlation between the two is numerically evaluated. The correlation coefficient is compared with a preset high-latitude oscillation risk threshold. If the absolute value of the correlation coefficient exceeds the threshold, a strong correlation trend is determined. Using this determination result, the normalized value of the current period amplitude is weighted to generate a numerical expression for the pitch angle modeling oscillation tendency index. The calculation formula is as follows: Where I is the pitch angle modeling oscillation tendency index, and A is the current cycle amplitude value. max The historical periodic amplitude is represented by , and r is the correlation coefficient. The calculated pitch angle modeling oscillation tendency index is encapsulated as a structured index object, labeled with its corresponding Earth geometric model and latitude / longitude grid identifier, and stored for subsequent model fit scoring. Through correlation matching and index generation processing, the significant periodic fluctuation characteristic parameters from the previous step are transformed into a quantified pitch angle modeling oscillation tendency index, enabling intelligent assessment of the applicability of ellipsoidal models based on high-latitude regions.
[0139] For example, in a high-latitude monitoring area, the retrieved pitch angle period amplitude characteristic parameter is 4.2 degrees, and the mapped latitude is 65 degrees. The Pearson correlation coefficient between the uniformly processed period amplitude sequence and the latitude sequence is r=0.82. The preset high-latitude oscillation risk threshold is set to 0.75, indicating a significant correlation in this area. The normalized period amplitude value, calculated based on the historical maximum amplitude of 5.0 degrees, is 0.84. The pitch angle modeling oscillation tendency index I = |0.82| * (4.2 / 5.0) = 0.688, is encapsulated and labeled as an ellipsoidal model applicability index, stored in the error fingerprint data cluster of the corresponding latitude and longitude grid. In the subsequent model scoring stage, the value of this index is directly used as a suppression factor for the high-latitude region scoring of the ellipsoidal model, thereby achieving dynamic applicability adjustment based on measured correlation characteristics and significantly improving the accuracy and robustness of the model selection process.
[0140] S5.3: Perform linear regression fitting on the azimuth deviation sequence in the retrieved historical deviation distribution characteristics to extract the stable unidirectional offset trend vector of the azimuth component, and use this stable unidirectional offset trend vector of the azimuth component as the basis for judging the feasibility of subsequent system error compensation.
[0141] For the azimuth deviation sequence retrieved from the historical deviation distribution characteristics, the input conditions include the sequence's time index information, deviation measurement values, and its corresponding latitude and longitude grid identifiers and model type identifiers. The azimuth deviation sequence is rigorously sorted by time index to ensure the temporal continuity and spatial consistency of the data in the fitting operation. The sorted azimuth deviation values are then centered, and the sequence mean is subtracted to eliminate the interference of global bias on the trend fitting. Based on the centered sequence, a two-dimensional data matrix of time and deviation variables is constructed. A linear trend fitting model is established using the least squares method, and the regression coefficients are obtained by solving the linear equation system. This regression process can be expressed as: in, These are the coefficients of the trend vector. For time variable matrix, This is the centered bias observation vector. Based on the calculated... The coefficients are used to extract the corresponding directional components, which are then used as the stable unidirectional offset trend vector for the azimuth component. The magnitude of the trend vector is calculated, and its correlation coefficient with the time variable is verified to be higher than a preset threshold. Only when it exceeds the threshold is it marked as a stable unidirectional offset trend for subsequent feasibility assessment of system error compensation. Through the above processing method, the historical deviation distribution characteristics formed in the previous step are transformed into a trend vector and its significance index characterizing the existence of stable unidirectional offset, realizing the offset feature extraction required for physical heuristic rule determination.
[0142] For example, in a monitoring scenario, the azimuth deviation sequence of a spherical model under the target latitude and longitude grid is obtained. The sequence length is 120 time points, with the time variable ranging from 0 to 119 seconds, and the deviation observation range is -0.8 to 1.2 degrees. After sorting, X and Y are formed based on the deviation value at each time point. Centering is performed to reduce the mean deviation from 0.35 degrees to 0 degrees. The trend vector coefficient is calculated using the least squares method, resulting in a slope component of 0.005, an intercept component of 0.0, and a corresponding trend vector magnitude of 0.005. The correlation coefficient between this trend vector and the time variable is calculated to be 0.92, which is higher than the preset threshold of 0.85, thus indicating the existence of a stable unidirectional offset trend. This trend vector is used in subsequent steps to determine the feasibility of compensation. The application results show that the deviation amplitude of the camera azimuth control is significantly reduced after compensation, and the positioning accuracy is improved to meet the real-time requirements of the monitoring task.
[0143] S5.4: Perform residual consistency verification operation based on the stable unidirectional offset trend vector of the azimuth component to generate an azimuth system error compensability score, and use the azimuth system error compensability score as the core supporting data for retaining the basic score of the spherical model.
[0144] The input conditions for the residual consistency verification operation based on the stable unidirectional offset trend vector of azimuth component are: the stable unidirectional offset trend vector of azimuth output in step S5.3 and the historical deviation sequence of the multi-model under the corresponding latitude and longitude grid cell. Residual extraction processing is performed on the stable unidirectional offset trend vector, subtracting the fitted value corresponding to the trend vector from each observation value in the historical deviation sequence to generate the azimuth residual sequence.
[0145] The variance of the azimuth residual sequence is calculated to measure the dispersion of the residuals in the time series. The calculation formula is as follows: in, Let i be the i-th observation in the residual sequence. is the fitted value of the trend vector, and n is the total number of observations.
[0146] The calculated residual variance is compared with the system's preset azimuth compensability threshold. If the residual variance is lower than the threshold, the azimuth deviation is determined to have high consistency characteristics.
[0147] The judgment results are processed by a scoring mapping process, which maps the residual consistency feature value to the azimuth systematic error compensability scoring interval and generates a quantitative scoring value as the basic scoring retention criterion.
[0148] The compensability score of the azimuth system error is linked to the model identifier, and the core supporting data for the weighted fusion in step S5.5 is output.
[0149] By using residual extraction, variance calculation, threshold comparison, and score mapping processing, the stable azimuth offset trend vector from the previous step is transformed into score data with compensable quantification levels, thereby achieving accurate preservation of the basic score of the spherical model and support for physical rule determination.
[0150] For example, in a monitoring task, the stable unidirectional offset trend vector of the spherical model in the target latitude and longitude grid is found to be 0.12°, and the historical deviation sequence contains 20 observations. Through residual extraction, a residual sequence such as [-0.01°, 0.02°, ...] is obtained, and the residual variance is calculated to be 0.0004 using the aforementioned variance formula. The preset compensability threshold is 0.001. Since the residual variance is below the threshold, the consistency level is determined to be high. The mapping rule sets a score of 95 for high consistency, and outputs the spherical model identifier associated with this score. In the subsequent weighted fusion, this score significantly improves the adaptability of the spherical model in the current grid, and it is ultimately retained as a candidate model in the model selection stage, resulting in a significant reduction in positioning deviation and improved accuracy and stability of the gimbal positioning action.
[0151] S5.5: Perform a weighted fusion calculation using the pitch angle modeling oscillation tendency index and the azimuth angle systematic error compensability score to generate a model fit score for each Earth geometry model, and use the model fit score as the decision variable for the final selection of the current basic calculation model.
[0152] The pitch angle modeling oscillation tendency index generated in step S5.2 and the azimuth angle system error compensability score generated in step S5.4 are used as input parameters for fusion calculation.
[0153] The pitch angle modeling oscillation tendency index and the azimuth angle systematic error compensability score are normalized to the same numerical range, and the interval linear mapping algorithm is used to transform them into dimensionless forms in the closed interval [0,1].
[0154] Based on the normalization results, a weighting coefficient table is established according to the physical sensitivity of the Earth's geometric model. A larger suppression weight is set for the pitch angle oscillation tendency of the ellipsoidal model in the high-latitude region, a larger compensation weight is set for the stable offset trend of the azimuth component of the spherical model, and equal weighting coefficients for pitch angle and azimuth angle are set for the two-dimensional plane model according to the attenuation function of the horizontal distance from the target.
[0155] The normalized index and its corresponding weight coefficient are weighted and multiplied to form the fusion score. This operation is calculated using the following formula: in, The pitch angle oscillation tendency weighting coefficient, To model the oscillation tendency exponential normalization value for pitch angle, This is the azimuth angle compensability weighting coefficient. This is the normalized value of the azimuth compensability score.
[0156] Boundary constraint verification is performed on the fusion score. If the score exceeds the preset upper limit, it is truncated to the upper limit value. If it is lower than the lower limit, it is raised to the lower limit value to ensure the validity of the score value within the selectable model score space.
[0157] The qualified fusion score is defined as the model fit score value and mapped to the corresponding Earth geometry model identifier to form a model score mapping table, which serves as the decision variable for the subsequent step S6 to select the optimal model.
[0158] By normalization transformation, weight coefficient setting, weighted product fusion, and boundary constraint processing, the tendency index and compensability score from the previous step are transformed into model fitness scores that can be directly used for selection, thus achieving a dynamic model scoring effect based on differences in physical sensitivity.
[0159] For example, in a high-latitude target localization task, the pitch angle modeling oscillation tendency index, after normalization, is 0.73, and the azimuth angle systematic error compensability score, after normalization, is 0.58. The weight coefficient table specifies w for the ellipsoidal model. p Set to 0.4, w a Set to 0.6. Calculate the fusion score using the following formula: The calculated fusion score was 0.636. The upper limit of the boundary constraints was set to 0.8, and the lower limit to 0.3. This score, within the range, requires no adjustment and is directly used as the fitness score for the ellipsoidal model. Validation results show that in this high-latitude scene, the fusion score is significantly better than the static score based solely on distance thresholds. This model was ultimately selected as the preferred localization model due to its higher score, resulting in a significant improvement in both target image stability and accuracy after localization.
[0160] Step S6: Select the Earth geometry model with the highest model fit score as the current base calculation model, and activate the model-aware compensation channel for the output parameters of this current base calculation model only to freeze the correction call permissions for other unselected models. Specifically, this includes: S6.1: Based on the set of model fit scores for each Earth geometric model generated in step S5, perform maximum value retrieval and logical judgment operations, lock the single Earth geometric model with the highest score from the candidate set of ellipsoidal model, spherical model and two-dimensional plane model as the current basic calculation model, and generate a model selection instruction signal containing the unique identifier of the model.
[0161] Based on the model fit score set output in step S5, each Earth geometry model and its corresponding score value in the set are input as independent data entries into the maximum value retrieval module to construct a score value sequence index structure.
[0162] Perform numerical comparison operations on all score values in the score value sequence index structure, call the maximum value determination logic limited to the range of three model candidate sets, determine the unique entry with the largest numerical feature in the score value sequence, and extract its model type identifier.
[0163] The extracted model type identifier is input into the model identifier parsing unit, which calls the pre-set model identifier dictionary matching table to generate a structured signal packet containing a unique model identifier, and attaches a timestamp tag and task batch number to ensure uniqueness and traceability.
[0164] The model-unique identifier in the structured signal packet is encoded into a system-recognizable control signaling format and transmitted to the model selection instruction generation module via the internal bus to convert the identifier into a model selection instruction signal that can be executed downstream.
[0165] The generated model selection command signal is output to the initialization entry point of the current basic computing model execution environment to complete the model selection action and provide a unique criterion for subsequent compensation channel activation. Through processing methods such as maximum value retrieval and model identifier conversion, the fitness score data from the previous step is transformed into a clear model selection command signal, realizing the determination and scheduling of the optimal model.
[0166] For example, in a cross-latitude positioning task, the model fit score set generated in step S5 is: ellipsoidal model score 55.8, spherical model score 68.4, and two-dimensional planar model score 61.2. This set is input into the maximum value retrieval module. The score value sequence index structure determines that 68.4 is the maximum value entry, and the associated model type identifier is a spherical model. The parsing unit calls the dictionary matching table to map the spherical model type identifier to the unique identifier SPM-20240615-001, attaching the timestamp 20240615T103200 and the task batch number BN-4782 to generate a structured signal packet. The signal packet is encoded into the internal instruction format CMD-MSEL and transmitted via the bus to the model selection instruction generation module, forming the final execution signal. After this signal is received at the current basic calculation model execution environment entry point, the system confirms that the selected model is a spherical model. Since the spherical model has a stable unidirectional offset in the historical deviation data of the grid, high-precision positioning can be achieved through incremental weighted compensation. After the task is executed, the actual observation deviation is significantly reduced, and the positioning stability of the target object in the picture is significantly improved.
[0167] S6.2: Receive the model unique identifier in the model selection instruction signal, call the system's preset channel mapping configuration table, instantiate a model-aware compensation channel object dedicated to the current basic computing model, set the activation status flag of the channel object to be valid, and initialize its internal data filtering rule set.
[0168] The model selection instruction signal generated in step S6.1 is received as an input condition. This signal contains the model unique identifier and version information of the current basic computing model.
[0169] The system calls the pre-set channel mapping configuration table, performs an index lookup on the model's unique identifier, and parses out the set of compensation channel template parameters bound to the model type, including the data binding path, allowed access range, and security verification parameters.
[0170] A new model-aware compensation channel object is instantiated based on the compensation channel template parameter set, and an internal cache space and parameter buffer are pre-set during the object construction process to ensure the integrity of the subsequent real-time compensation data stream.
[0171] After instantiation, the activation status flag of the model perception compensation channel object is set to valid, and the status flag is written to the control register of the channel object through logical assignment operation to ensure that the system scheduler can recognize and prioritize the channel.
[0172] The data filtering rule set inside the model perception compensation channel object is initialized, and the historical correction data index path related to the unselected model is excluded from the rule set. The historical correction data path that is only bound to the current basic calculation model and its latitude and longitude grid is retained, so as to realize the unidirectionality and exclusivity of parameter calling.
[0173] Through the chained processing method described above, the model unique identifier in step S6.1 is transformed into a model-aware compensation channel object with an activation state and complete filtering rules, thereby achieving precise compensation preparation only for the output parameters of the current basic computing model.
[0174] S6.3: Traverse the historical correction data indexes corresponding to all other unselected Earth geometric models in the system, freeze the correction call permissions of the unselected models according to the data filtering rule set, and generate a model isolation control vector with an access prohibition mark to block the reading path of cross-model error fingerprint data.
[0175] After receiving the system state parameters after selecting the current basic calculation model, the system obtains the historical correction data index set corresponding to all Earth geometric models in the system as the execution object for the freeze process.
[0176] A model type comparison operation is performed on the historical correction data index set to filter out all index entries that do not contain the unique identifier of the current basic computing model, forming a list of unselected model indexes.
[0177] Based on the non-selected model index list, the data filtering rule set within the model perception compensation channel object initialized in step S6.2 is called. Rule matching operation is performed on the correction call path of each index entry to determine its access permission status and mark it as uncallable.
[0178] According to the preset access control data dictionary format, the above-mentioned uncallable state is encapsulated as an access prohibition flag, and a mapping relationship is established with the corresponding non-selected model index to generate a data control identifier matrix with model type isolation attributes.
[0179] The generated data control identifier matrix is input into the model call management module to instantiate the model isolation control vector. The control vector contains the blocking instruction encoding for the cross-model error fingerprint data reading path.
[0180] By freezing the data and generating control vectors, the results of the previous step are transformed into model call state data with access isolation and permission constraints, thereby achieving cross-model data interlocking and preventing non-selected model correction data from interfering with the current basic computing model's computing context.
[0181] For example, in a system deployed in a port monitoring scenario, the current basic calculation model is a spherical model with a unique identifier of M_ID=02. The system also has historical correction data indexes for an ellipsoidal model (M_ID=01) and a two-dimensional planar model (M_ID=03), with 120 and 85 indexes respectively. When the freeze process is executed, the list of 205 unselected model indexes is first filtered. The filtering rule set is then used to determine the access permission status. Rule RG1 specifies that if the model identifier of an index entry is not equal to the current M_ID, the flag bit is set to 0 to indicate that it cannot be accessed. After the determination, an access prohibition flag matrix of size 205×1 is generated, with all elements having Flag=0. The management module is then called to generate a model isolation control vector of length 205, with each vector element corresponding to the blocking instruction code CMD_STOP. After the blocking is executed, the correction call interfaces of the ellipsoidal model and the two-dimensional plane model are both closed, while the correction call interface of the spherical model remains open. This ensures that the output parameters of the spherical model are compensated only using the historical weighted correction values under the bound latitude and longitude grid. After the positioning action is completed, the target size of the image is verified to be consistent with the expected height calculated. The clarity of the target image is significantly improved, and the system stability remains good during long-term operation.
[0182] S6.4: Utilize the activated model-aware compensation channel object to establish a one-way data binding relationship between the output parameters of the current basic calculation model and the historical weighted correction values under the corresponding latitude and longitude grid cells, and generate the final gimbal control parameter calculation context environment with exclusive characteristic parameter compensation capabilities.
[0183] Based on the activated model-aware compensation channel object, it receives the input signals of the model unique identifier of the current basic computing model and the geographic identification code of the latitude and longitude grid cell, performs a two-way index binding initialization operation within the channel, and establishes a physical address mapping table to limit the data retrieval range.
[0184] The bound address mapping table is invoked to access the model area error response mapping relationship library, extract the historical weighted correction value dataset that matches the geographic identification code and is consistent with the model's unique identifier, and perform permission verification within the channel to ensure the exclusivity of data access.
[0185] Perform parameter dimension matching detection on the extracted historical weighted correction value dataset, establish a one-to-one mapping relationship between the azimuth, pitch and zoom values output by the basic calculation model and the corresponding correction value vectors in sequence, and generate a one-way parameter mapping chain according to the preset data binding protocol.
[0186] A link anti-interference mechanism is introduced during the mapping chain establishment process. Internal filtering rules are used to block the injection of any correction data from non-current basic calculation models or non-current latitude and longitude grid units, ensuring the purity and stability of the data binding process.
[0187] The established one-way parameter mapping chain is merged and encapsulated with the model-aware compensation channel object to generate the final gimbal control parameter calculation context environment, which includes a binding table, permission control identifier, and data link verification code, for subsequent real-time compensation calls.
[0188] By establishing a one-way data binding relationship between the model output parameters and the historical weighted correction values under the corresponding latitude and longitude grid cells, the model selection and correction permission freezing results of the previous step are transformed into a computational context with exclusive characteristic parameter compensation capabilities, thereby achieving the security, accuracy, and directionality of the compensation invocation process.
[0189] For example, in a high-latitude long-distance monitoring scenario, an ellipsoidal model is selected as the current basic calculation model. Its output base azimuth angle is 128.75 degrees, base elevation angle is 15.42 degrees, and base zoom is 21.3x; the geographic identifier for the latitude and longitude grid unit is GID-482910. The model perception compensation channel accesses the error response mapping database, extracts the historical weighted correction value vector {ΔAz=-0.58, ΔEl=+0.21, ΔZoom=+0.32} of the ellipsoidal model under this GID, and establishes a unidirectional mapping chain after performing parameter dimension matching. The base azimuth angle is bound to ΔAz, the elevation angle to ΔEl, and the zoom to ΔZoom. During the mapping chain establishment process, an anti-interference mechanism is enabled to shield the spherical model and two-dimensional planar model data in the GID, ensuring the purity of the link. The final generated gimbal control parameter calculation context includes a mapping binding table, access permission identifiers, and link verification codes. During subsequent compensation calls, vector superposition calculations can be directly performed using this environment. For example, the compensation azimuth angle calculation formula is: Among them Az base Using the base azimuth angle value and ΔAz as the historical weighted correction value, through this binding mechanism, the compensated Az... final With a resolution of 128.17 degrees, precise correction of the positioning angle and effective isolation of external interference to the model were achieved.
[0190] Step S7: Using the model perception compensation channel, the historical weighted correction values of the latitude and longitude grid cells corresponding to the current basic calculation model are called to perform real-time compensation for the basic azimuth angle, basic pitch angle, and basic zoom value, generating the final gimbal control parameters and driving the camera to perform positioning actions. Specifically, this includes: S7.1: Obtain the model unique identifier of the current basic calculation model and the geographic identifier of the target latitude and longitude grid cell. Based on the model unique identifier, access the model regional error response mapping relationship library and extract the specific geographic error fingerprint data cluster bound to the geographic identifier to generate an original corrected feature set containing the historical deviation mean and historical deviation variance.
[0191] Based on the established one-way binding relationship of the model-aware compensation channel, the unique identifier of the current basic computing model and the geographic identifier of the target latitude and longitude grid cell are received as parallel input conditions.
[0192] Using the model's unique identifier as the access path parameter, the second-level model type node in the model region error response mapping relation library is located by index.
[0193] Using the geographic identifier as a spatial index key, hash matching is performed within the model type node to accurately retrieve the data storage unit bound to the target latitude and longitude grid.
[0194] Read the complete geographic error fingerprint data cluster encapsulated in the corresponding storage unit, perform structured analysis on its internal statistical indicators, and extract two core correction features: historical deviation mean and historical deviation variance.
[0195] The extracted historical deviation mean and historical deviation variance are encapsulated into an original modified feature set, and their respective model types and spatial index attributes are labeled to provide accurate benchmark data for subsequent dynamic weighted correction calculations.
[0196] Through the above processing method, the model channel binding information of the previous step is transformed into a set of historical correction features that can be directly used in compensation calculation, thereby realizing the function of retrieving correction data based on the selected model and region.
[0197] For example, in a port monitoring scenario, the unique identifier of the current basic calculation model is set to "ELLIPSOID_01", and the geographic identifier of the target latitude and longitude grid cell is "GRID_22345". The system accesses the ellipsoidal model node of the error response mapping relation library with "ELLIPSOID_01" and matches the storage cell under that node with "GRID_22345", extracting the historical deviation data cluster in the storage cell, where the mean is (0.21, -0.15, 0.05) and the variance is [0.0025, 0.0018, 0.0009]. The mean corresponds to the deviation center of the historical azimuth angle, pitch angle, and zoom magnification, respectively, and the variance reflects its fluctuation range. In this scenario, the elevation difference of the port operation area is 3 meters and the horizontal distance is 120 meters. Since the ellipsoid model has a small historical mean deviation and stable variance in this grid, the original corrected feature set will be fused with incremental weights in step S7.2. The compensated gimbal parameters can significantly improve the automatic focusing accuracy of the target ship and reduce the impact of positioning errors on the port operation monitoring screen.
[0198] S7.2: The historical deviation mean and historical deviation variance in the original corrected feature set are processed by an incremental weighted average algorithm, and a dynamic weight coefficient is calculated by combining the preset time decay factor to generate a real-time weighted correction vector that represents the latest error trend as compensation benchmark data.
[0199] Based on the extracted historical deviation mean and historical deviation variance, an initial dataset for incremental weighted average processing is constructed, and a parameter set of time decay factor is established as the control condition for dynamic weight calculation.
[0200] The historical deviation mean is differentially calculated by dividing each component by the deviation mean in the latest monitoring period to generate the deviation change vector for the current period. This change vector is then multiplied by the time decay factor to obtain the decayed deviation change.
[0201] The diagonal elements of the historical bias variance are multiplied element-wise with the time decay factor to generate a variance decay matrix, which is then used as the weight adjustment benchmark for the subsequent mean fusion process.
[0202] The attenuated deviation change is then vector-weighted and summed with the original historical deviation mean. The weighting coefficients are calculated jointly by the time attenuation factor and the variance attenuation value of each component, as shown in the following formula: Where α is the time decay factor, σ decay This represents the variance attenuation value of the corresponding component.
[0203] The aforementioned weighting coefficients are applied to the weighted superposition of the deviation change and the historical mean to generate a real-time weighted correction vector that represents the latest error trend.
[0204] By using an incremental weighted average processing method, the original correction feature set from the previous step is transformed into dynamic and timely real-time compensation benchmark data, thereby enabling precise error compensation preparation for the current target positioning scenario.
[0205] For example, the historical mean deviation of a certain latitude and longitude grid cell is [0.15°, -0.08°, 0.02 times], and the diagonal elements of the historical deviation variance are 0.0045, 0.0062, and 0.0009, respectively. The time decay factor is set to 0.85. The vector of changes in the mean deviation within the calculation period is [0.03°, -0.02°, 0.005 times]. Each component of the change vector is multiplied by the time decay factor to obtain the decay change [0.0255°, -0.017°, 0.00425 times]. The diagonal elements of the variance are multiplied by the time decay factor to obtain the variance decay values [0.003825, 0.00527, 0.000765]. These are then combined with the decay factor to calculate weighting coefficients, which are applied to the weighted superposition of the historical mean and the decay change. For example, the weighting coefficient for the azimuth component is calculated as follows: The calculated weighting coefficient is approximately 0.00325. Applying this coefficient to the weighted superposition generates a real-time weighted correction vector of [0.175°, -0.097°, 0.024x]. This correction vector is then used in step S7.3 for vector compensation with the base azimuth, elevation, and zoom magnification, resulting in a significant improvement in positioning accuracy and maintaining high stability and low deviation output during repeated execution of similar monitoring tasks.
[0206] S7.3: Obtain the basic azimuth angle, basic pitch angle, and basic zoom ratio calculated by the Earth's geometric model, and perform vector superposition compensation operation on the above basic parameters based on the real-time weighted correction vector to generate the pre-compensated azimuth angle, pre-compensated pitch angle, and pre-compensated zoom ratio after error correction.
[0207] Based on the base azimuth, elevation, and zoom values calculated from the Earth's geometric model, these are used as input parameters. These parameters are loaded into the compensation calculation unit in three-dimensional parameter vector form and matched with the real-time weighted correction vector generated in step S7.2 to establish the objects of the vector superposition operation. A component consistency check is performed on the loaded base parameter vector to ensure that the data format of each component is completely consistent with the unit and dimension of the corresponding component in the correction vector, thus eliminating scale offsets caused by different source data during the superposition operation. If the check passes, the vector superposition module is invoked to superimpose the compensation values of the base azimuth, elevation, and zoom values by weighted summation of the components one by one. The compensation values are derived from the corresponding components of the real-time weighted correction vector, following the vector superposition formula: in, This represents the generated pre-compensation parameter vector. Represents the basic parameter vector, This represents the real-time weighted correction vector. For the superposition result of each component, precision constraint processing is performed. For the angular component, a ring-shaped modulus operation is used to ensure the output value is within the rotatable angle range of the gimbal. For the zoom factor component, a linear limiting algorithm is used to ensure the result is within the physical zoom range of the lens. Through the above vector superposition compensation operation and precision constraint processing, the calculation result of the real-time correction vector in the previous step is transformed into pre-compensated azimuth angle values, pre-compensated pitch angle values, and pre-compensated zoom factor values after error correction, achieving real-time and accurate compensation of the basic positioning parameters.
[0208] For example, in an outdoor high-precision monitoring scenario, the basic azimuth angle is set to 120.35 degrees, the basic elevation angle to 15.80 degrees, and the basic zoom factor to 18.5x; the components of the real-time weighted correction vector are -0.25 degrees, 0.40 degrees, and 0.2x, respectively. When executing the vector superposition formula, the azimuth angle component is calculated to be 120.10 degrees, the elevation angle component to be 16.20 degrees, and the zoom factor component to be 18.7x. After verification by ring mode calculation, the azimuth angle value remains within the range of 0 to 360 degrees; after amplitude limiting verification, the zoom factor is confirmed to be within the range of 5x to 30x allowed by the lens. The pre-compensated azimuth angle, elevation angle, and zoom factor output by this calculation process can significantly improve the stability of the target object's position in the center of the image in actual positioning tests, and ensure a clear imaging effect of the target object's outline, meeting the real-time positioning requirements of high-precision monitoring.
[0209] S7.4: Perform physical boundary constraint verification processing on the pre-compensated azimuth angle value, pre-compensated pitch angle value and pre-compensated zoom ratio value, and truncate or smooth the mapping according to the mechanical limit range of the camera gimbal and the optical zoom limit of the lens to generate the final set of gimbal control parameters that meet the hardware execution capabilities.
[0210] Based on the pre-compensation azimuth angle, pre-compensation pitch angle, and pre-compensation zoom ratio values generated in step S7.3, a data input object for physical boundary constraint verification is constructed, and the mechanical limit range parameters of the camera pan-tilt unit and the optical zoom limit parameters of the lens are read as physical constraint conditions.
[0211] The pre-compensated azimuth angle value is compared with the difference between the maximum positive angle and the maximum negative angle of the gimbal rotation. If it exceeds the positive limit range, it is truncated and replaced with the maximum positive limit value. If it is lower than the negative limit range, it is truncated to the maximum negative limit value.
[0212] The pre-compensated pitch angle value is compared with the upper and lower limits of the gimbal's pitch rotation. If it exceeds the upper limit, it is truncated to the upper pitch limit value; if it is below the lower limit, it is truncated to the lower pitch limit value. A smoothing mapping is performed on results close to the limit values using a linear interpolation formula. The input parameters are gradually brought closer to the limit to reduce mechanical impact. The current pitch angle, This is the limit value. This is the smoothing coefficient.
[0213] The pre-compensated zoom magnification value is compared with the maximum and minimum optical zoom magnification of the lens. If it exceeds the maximum magnification, it is truncated to the maximum magnification; if it is lower than the minimum magnification, it is truncated to the minimum magnification. An exponential attenuation mapping is applied to input values at the edge of the zoom range using the formula... To achieve progressive zoom constraints, where This is the current zoom level. This is the limit value. This is the attenuation coefficient.
[0214] The azimuth, pitch, and zoom magnification arrays, after the above truncation and smoothing mapping processes, are combined into the final set of gimbal control parameters to ensure that all parameter values are within the range of hardware execution capabilities and meet physical safety operation requirements.
[0215] By using physical boundary constraint verification and smooth mapping processing, the results of the previous step are transformed into a data set that can directly drive the gimbal to perform control, thereby achieving the safety and hardware compatibility of positioning actions.
[0216] For example, in a high-precision monitoring scenario, a selected basic calculation model yields a pre-compensated azimuth angle of 185°, a pitch angle of 92°, and a zoom ratio of 42x. The gimbal's mechanical azimuth limit range is -180° to 180°, the mechanical pitch limit range is -90° to 90°, and the lens optical zoom range is 1x to 40x. During physical boundary constraint verification, the azimuth angle value of 185° is 5° more than the maximum limit of 180°, so after truncation, the azimuth angle is adjusted to 180°. The pitch angle of 92° is 2° more than the maximum limit of 90°, so smooth interpolation is performed with a smoothing coefficient of 0.5. The result of the limit smoothing is as follows: The zoom magnification of 42x exceeds the maximum limit of 40x, so exponential decay mapping is performed. With a decay coefficient β of 0.3 and a limit of 40x, the following result is obtained: The final set of gimbal control parameters is 180° azimuth, 91° pitch, and 39.77x zoom. Verification showed that this set of parameters, when executed within hardware limits, resulted in no mechanical impact, stable positioning, clear and well-composed target objects in the image, and significantly improved system response speed and safety.
[0217] S7.5: Obtain the final set of gimbal control parameters and send it to the PTZ camera driver module through the underlying communication protocol to drive the gimbal motor to perform azimuth rotation, pitch rotation, and zoom lens extension / retraction to complete the automatic and precise alignment and imaging focusing operation of the target object.
[0218] Step S8: After the positioning action is completed, the newly generated 3D angle deviation vector is injected in reverse into the geographic error fingerprint data cluster corresponding to the current basic calculation model. The online iteration of the geographic error fingerprint data cluster is completed by updating the basic statistical index group. Specifically, this includes: S8.1: Obtain the actual three-dimensional angle deviation vector after the positioning action is completed and the model type identifier of the current basic calculation model. Based on the model type identifier, lock the specific geographic error fingerprint data cluster corresponding to the target latitude and longitude grid unit from the model area error response mapping relationship library to establish the data storage object to be updated.
[0219] S8.2: Perform a historical deviation distribution feature reading operation on the locked specific geographic error fingerprint data cluster, and extract the existing deviation mean, existing deviation variance and existing maximum deviation direction stored therein as benchmark statistics to provide a calculation basis for subsequent fusion of new data.
[0220] S8.3: Based on the actual three-dimensional angle deviation vector and the benchmark statistics, perform incremental weighted average calculation, and integrate the newly generated deviation data into the existing deviation mean and existing deviation variance according to preset weights to generate updated deviation mean and updated deviation variance to reflect the latest positioning error trend.
[0221] Based on the actual 3D angle deviation vector after the positioning operation is completed, and the existing deviation mean and variance read from a specific geographic error fingerprint data cluster as benchmark statistics, an initial input set for deviation data fusion processing is established. A data type consistency check is performed on this input set to ensure complete matching between the actual 3D angle deviation vector and the benchmark statistics in terms of component count, physical quantity units, and data precision, thus avoiding dimensional misalignment or inconsistency in units during the fusion process. An incremental weighted average operator is constructed to fuse the newly generated deviation data vector with the existing deviation mean at component levels according to preset weighting coefficients, using the following arithmetic formula: in, The vector of the mean components of the existing deviation. This is the updated mean component vector of the deviation. This is the actual three-dimensional angle deviation vector. The preset weighting coefficients are used. Based on the same weighting coefficients, a variance update operation is performed on the existing bias variance and the new bias vector, using the following formula: in, For the existing bias variance, The updated bias variance is then applied. Threshold constraints are applied to the updated mean and variance results, smoothly raising elements in the variance below a preset threshold to that level to prevent statistical data distortion caused by small sample impacts. Through this incremental weighted average fusion and threshold constraint processing, the baseline statistics from the previous step are transformed into updated bias mean and updated bias variance with the ability to represent the latest error trends, enabling lightweight online iteration of the geographic error fingerprint over time series.
[0222] S8.4: Execute extreme value comparison logic using the magnitude of the actual three-dimensional angle deviation vector and the updated mean deviation. If the new deviation magnitude exceeds the existing record, replace the existing maximum deviation direction with the new deviation direction; otherwise, keep the original record, thereby generating the updated maximum deviation direction to capture extreme error characteristics.
[0223] When the actual 3D angle deviation vector after the positioning action is completed is received as input along with the updated mean deviation calculated in the previous sub-step, the actual 3D angle deviation vector is first converted into a modulus value in a specified spherical coordinate system to ensure a consistent measurement of direction and amplitude. Next, the absolute value of this new deviation modulus is compared with the modulus value corresponding to the existing maximum deviation direction record. The comparison logic is based on the extreme value search principle, i.e., determining whether the new modulus is greater than the historical modulus. If the comparison result indicates that the new modulus value is greater, the direction extraction module is invoked to parse its direction component from the actual 3D angle deviation vector, and this direction component replaces the existing maximum deviation direction record stored in the current geographic error fingerprint data cluster. If the comparison result indicates that the new modulus value is not greater than or equal to the historical modulus, the existing maximum deviation direction remains unchanged, and this determination result is marked as "no extreme update". After performing the replacement or retention operation, the direction state and the new modulus value are structurally encapsulated to generate an updated maximum deviation direction data object, which serves as the output of the extreme error feature capture module.
[0224] Where Δx, Δy, and Δz are the components of the actual three-dimensional angle deviation vector on the three coordinate axes, respectively. This is the new deviation modulus. Through the above extreme value comparison and direction replacement processing method, the result of the previous step is transformed into the maximum deviation direction data with timeliness, realizing the accurate capture, recording and updating of extreme error characteristics.
[0225] For example, within a high-latitude monitoring grid cell, the actual 3D angular deviation vector is (0.35°, -0.42°, 0.18°). After spherical coordinate transformation, we obtain Δx=0.35, Δy=-0.42, and Δz=0.18. Substituting these values into the formula, the new modulus is calculated to be approximately 0.58°. If the existing maximum deviation modulus record is 0.52°, an update is determined, and the new deviation direction vector is normalized to (0.603, -0.724, 0.310) and replaces the original record. In another low-latitude grid cell, the same formula calculates a new modulus of 0.48°, which is less than the existing record of 0.55°. Therefore, the original maximum deviation direction remains unchanged. This processing flow significantly improves the sensitivity of extreme error capture in high-latitude scenarios, ensuring that the geographic error fingerprint data cluster effectively reflects the true extreme error state of the current positioning algorithm in that grid area.
[0226] S8.5: Rewrite the generated updated mean deviation, updated variance deviation, and updated maximum deviation direction into the specific geographic error fingerprint data cluster to complete the structured overwrite and lightweight online iteration of the geographic error fingerprint data cluster, and output a timely geographic error fingerprint data cluster for the next round of model fit scoring.
[0227] In one embodiment, a PTZ camera target automatic localization system is provided, comprising: a latitude and longitude grid cell division module, a geographic error fingerprint data cluster construction module, a model area error response mapping relationship database establishment module, a historical deviation distribution feature acquisition module, a model fit score acquisition module, a model perception compensation channel activation module, and a camera positioning action execution module, wherein: Latitude and longitude grid cell division module: used to obtain the GPS coordinate information of the camera and the target object and the three-dimensional angle deviation vector after manual fine-tuning and confirmation, and divide the global geographic space into latitude and longitude grid cells with unique geographic identification codes; Geographic error fingerprint data cluster construction module: used to associate and map the three-dimensional angle deviation vector with the Earth geometric model used in this mission based on the unique geographic identifier code, and construct a geographic error fingerprint data cluster; Model Area Error Response Mapping Relationship Establishment Module: This module is used to establish a model area error response mapping relationship library for each of the independent geographic error fingerprint data clusters corresponding to various Earth geometric models under each latitude and longitude grid unit. Historical deviation distribution feature acquisition module: used to receive the target GPS coordinates of the new positioning task and map them to the corresponding latitude and longitude grid cell, and retrieve the historical deviation distribution features of the Earth geometric model under the latitude and longitude grid cell from the model area error response mapping relationship library; Model fit score acquisition module: used to perform physical heuristic rule determination based on the historical deviation distribution characteristics, and generate model fit score for each of the Earth geometric models; Model-aware compensation channel activation module: used to select the Earth geometry model with the highest model fit score as the current basic calculation model, and activate the model-aware compensation channel only for the output parameters of the current basic calculation model; Camera positioning action execution module: Used to call the historical weighted correction value of the latitude and longitude grid cell corresponding to the current basic calculation model using the model perception compensation channel to perform real-time compensation of the basic azimuth angle, basic pitch angle and basic zoom value, generate the final pan-tilt control parameters and drive the camera to perform positioning action.
[0228] This application provides a method for automatic target localization using a PTZ camera, which can be applied to, for example... Figure 4 In the application environment shown, terminal 102 communicates with server 104 via a network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices, and server 104 can be a standalone server or a server cluster consisting of multiple servers.
[0229] In one embodiment, such as Figure 5 The diagram shows a computer device including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described in the above method embodiments.
[0230] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of any of the methods described in the above method embodiments.
[0231] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.
[0232] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.
[0233] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for automatic target localization using a PTZ camera, characterized in that, Specifically, it includes: S1: Obtain the GPS coordinates of the camera and the target object and the three-dimensional angle deviation vector after manual fine-tuning and confirmation, and divide the global geographic space into latitude and longitude grid units with unique geographic identifiers; S2: Based on the unique geographic identifier, the three-dimensional angle deviation vector is associated and mapped with the Earth geometric model used in this mission to construct a geographic error fingerprint data cluster; S3: For each latitude and longitude grid cell, an independent geographic error fingerprint data cluster corresponding to multiple Earth geometric models is established to create a model region error response mapping relationship library; S4: Receive the target GPS coordinates of the new positioning task and map them to the corresponding latitude and longitude grid cell; retrieve the historical deviation distribution characteristics of the Earth's geometric model under the latitude and longitude grid cell from the model area error response mapping relationship library; S5: Based on the historical deviation distribution characteristics, perform physical heuristic rule determination to generate model fit score values for each of the Earth geometric models; S6: Select the Earth geometry model with the highest model fit score as the current basic calculation model, and activate the model-aware compensation channel for the output parameters of the current basic calculation model only. S7: Using the model perception compensation channel, the historical weighted correction values of the latitude and longitude grid cells corresponding to the current basic calculation model are called to perform real-time compensation of the basic azimuth angle, basic pitch angle and basic zoom value, generate the final gimbal control parameters and drive the camera to perform positioning actions.
2. The PTZ camera target automatic positioning method according to claim 1, characterized in that, Step S2 specifically includes: The three-dimensional angle deviation vector, the Earth geometric model identifier used in this task, and the relative spatial configuration parameters including horizontal distance and elevation difference are obtained. Based on the unique geographic identifier, the three-dimensional angle deviation vector, the Earth geometric model identifier, and the relative spatial configuration parameters are subjected to key-value association processing to generate the original deviation record set. The three-dimensional angle deviation vector in the original deviation record set is orthogonally decomposed into pitch and azimuth components. The fluctuation characteristics of the pitch and azimuth components in the time series are extracted using a sliding window statistical algorithm to generate a deviation component feature set containing periodic oscillation amplitude and trend offset. Based on the deviation component feature set and relative spatial configuration parameters, a multidimensional statistical moment calculation operation is performed to calculate the arithmetic mean of the pitch angle component and the azimuth angle component as a central tendency indicator, calculate the standard deviation as a dispersion indicator, and calculate the kurtosis as a distribution shape indicator, thereby generating a basic statistical indicator set. The vector extreme value search algorithm is used to traverse all three-dimensional angle deviation vectors in the original deviation record set, calculates the magnitude of each three-dimensional angle deviation vector in the spherical coordinate system and compares the magnitudes, and determines the three-dimensional angle deviation vector with the largest magnitude as the maximum deviation direction vector, thereby generating the maximum deviation direction that represents the direction of the extreme error. The basic statistical index group, the direction of maximum deviation, the Earth geometric model identifier, and the relative spatial configuration parameters are structured and encapsulated, and assembled into the geographic error fingerprint data cluster according to a preset data dictionary format.
3. The automatic target localization method for a PTZ camera according to claim 2, characterized in that, The geographic error fingerprint data cluster includes mean, variance, kurtosis, and direction of maximum deviation.
4. The PTZ camera target automatic positioning method according to claim 3, characterized in that, The Earth's geometric model includes: an ellipsoidal model, a spherical model, and a two-dimensional planar model.
5. The automatic target localization method for a PTZ camera according to claim 4, characterized in that, Step S3 specifically includes: Based on the Earth geometric model identifier, a classification and aggregation process is performed to collect independent data clusters belonging to the ellipsoid model, spherical model and two-dimensional plane model within the same latitude and longitude grid cell, and generate a set of error features to be entered into the database, isolated by model type. Based on the unique geographic identifier in the set of error features to be entered into the database as the primary key index, a multi-level storage structure is constructed using a hash mapping algorithm. The latitude and longitude grid units are nested as the first-level index and the Earth geometric model is nested as the second-level index to generate the basic framework of the model area error response mapping relationship database. Serialization encapsulation is performed on each of the independent data clusters to convert the mean, variance, kurtosis and maximum deviation direction into a standard storage byte stream according to a preset binary data dictionary format, and generate a standardized error fingerprint record package. Using the second-level index path of the basic framework of the model region error response mapping relationship library, the standardized error fingerprint record package is written into the corresponding storage node, and a timestamp version control mechanism is established to complete the construction of the model region error response mapping relationship library; Based on the established model area error response mapping relationship library, an integrity verification operation is performed. The data entries of the ellipsoidal model, spherical model and two-dimensional plane model under all the latitude and longitude grid units are traversed to verify the consistency of mean dimension and the positive definiteness of variance.
6. The automatic target localization method for a PTZ camera according to claim 2, characterized in that, The step of performing physical heuristic rule determination based on the historical deviation distribution characteristics includes: If significant periodic fluctuations in the pitch angle component are detected in the historical deviation distribution characteristics, the score of the corresponding Earth geometry model will be reduced. If a stable unidirectional shift of the azimuth component is detected in the historical deviation distribution characteristics, the base score of the corresponding Earth geometry model is retained.
7. The automatic target localization method for a PTZ camera according to claim 2, characterized in that, After step S7, the following is included: S8: After the positioning action is completed, the newly generated three-dimensional angle deviation vector is injected in reverse into the geographic error fingerprint data cluster corresponding to the current basic calculation model, and the online iteration of the geographic error fingerprint data cluster is completed by updating the basic statistical index group.
8. A PTZ camera target automatic positioning system, characterized in that, include: Latitude and longitude grid cell division module: used to obtain the GPS coordinate information of the camera and the target object and the three-dimensional angle deviation vector after manual fine-tuning and confirmation, and divide the global geographic space into latitude and longitude grid cells with unique geographic identification codes; Geographic error fingerprint data cluster construction module: used to associate and map the three-dimensional angle deviation vector with the Earth geometric model used in this mission based on the unique geographic identifier code, and construct a geographic error fingerprint data cluster; Model Area Error Response Mapping Relationship Establishment Module: This module is used to establish a model area error response mapping relationship library for each of the independent geographic error fingerprint data clusters corresponding to various Earth geometric models under each latitude and longitude grid unit. Historical deviation distribution feature acquisition module: used to receive the target GPS coordinates of the new positioning task and map them to the corresponding latitude and longitude grid cell, and retrieve the historical deviation distribution features of the Earth geometric model under the latitude and longitude grid cell from the model area error response mapping relationship library; Model fit score acquisition module: used to perform physical heuristic rule determination based on the historical deviation distribution characteristics, and generate model fit score for each of the Earth geometric models; Model-aware compensation channel activation module: used to select the Earth geometry model with the highest model fit score as the current basic calculation model, and activate the model-aware compensation channel only for the output parameters of the current basic calculation model; Camera positioning action execution module: Used to call the historical weighted correction value of the latitude and longitude grid cell corresponding to the current basic calculation model using the model perception compensation channel to perform real-time compensation of the basic azimuth angle, basic pitch angle and basic zoom value, generate the final pan-tilt control parameters and drive the camera to perform positioning action.
9. A computer device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor; the computer program, when executed by the processor, implements the steps of a PTZ camera target automatic positioning method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of a PTZ camera target automatic positioning method as described in any one of claims 1 to 7.