Positioning compensation method and device, electronic equipment, storage medium and program product

By utilizing historical trajectory data and consumption records locally on electronic devices for location compensation, the problem of location compensation in scenarios with weak networks or signal obstruction is solved, achieving efficient and secure location compensation.

CN121603550APending Publication Date: 2026-03-03CHINA UNIONPAY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511640261.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

In scenarios with weak networks or obstructed signals, existing technologies cannot accurately perform location compensation and pose a risk of privacy leaks.

Method used

By acquiring users' historical trajectory data and consumption verification records locally on electronic devices, extracting structured feature sets, and using compensation data prediction models for location compensation, user data can be avoided by uploading it to the cloud.

Benefits of technology

It improves the success rate and accuracy of location compensation, reduces the risk of privacy leaks, adapts to short-term changes in user behavior, and enhances the accuracy of location compensation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121603550A_ABST
    Figure CN121603550A_ABST
Patent Text Reader

Abstract

The invention discloses a positioning compensation method and device, electronic equipment, a storage medium and a program product. The method is applied to electronic equipment and comprises the following steps: acquiring historical track data and historical consumption cancel-after-verification records of a user; feature extraction is carried out on the historical track data and the historical consumption cancel-after-verification records to obtain a structured feature set, the structured feature set comprises space-time statistical features and behavior tag features, the space-time statistical features represent laws of user behaviors in time and space, and the behavior tag features represent scene and semantic information of the user behaviors; predicting positioning compensation data corresponding to the to-be-compensated positioning time based on the structured feature set through a compensation data prediction model; and determining position information of the user at the to-be-compensated positioning time based on the positioning compensation data. According to the embodiment of the invention, positioning compensation can be accurately carried out in a weak network or signal shielding scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing technology, and in particular relates to a positioning compensation method, device, electronic device, storage medium and program product. Background Technology

[0002] Currently, some marketing activities and online services are usually limited to specific areas, and only users within the designated area can participate. When users participate in activities or use online services in scenarios with weak networks or signal obstruction, such as shopping mall basements, elevators, suburban business districts, and subway cars, they are often unable to participate in activities or use online services due to failure to obtain location signals.

[0003] In related technologies, when a location signal cannot be obtained, location compensation is mainly achieved by uploading user-related data to a cloud platform or by performing location compensation based on preset rules. However, cloud-based location compensation relies on a stable network environment, which can easily lead to compensation response timeouts and failure to achieve location compensation in scenarios with weak networks or signal obstruction. Furthermore, this method requires uploading user data to the cloud, posing a risk of privacy leakage. On the other hand, rule-based compensation methods are difficult to accurately predict user location information due to the rigidity of the rules. Summary of the Invention

[0004] This application provides a positioning compensation method, device, electronic device, storage medium, and program product that can accurately perform positioning compensation in scenarios with weak network or signal obstruction.

[0005] In a first aspect, embodiments of this application provide a positioning compensation method applied to an electronic device, the method comprising: Obtain users' historical trajectory data and historical consumption and redemption records; Feature extraction is performed on historical trajectory data and historical consumption and redemption records to obtain a structured feature set. The structured feature set includes spatiotemporal statistical features and behavioral label features. Spatiotemporal statistical features represent the patterns of user behavior in time and space, while behavioral label features represent the context and semantic information of user behavior. The compensation data prediction model predicts the location compensation data corresponding to the location time to be compensated based on the structured feature set. Based on location compensation data, determine the user's location information during the time period to be compensated.

[0006] Secondly, embodiments of this application provide a positioning compensation device applied to an electronic device, the device comprising: The data acquisition module is used to acquire users' historical trajectory data and historical consumption and verification records; The feature engineering module is used to extract features from historical trajectory data and historical consumption and redemption records to obtain a structured feature set. The structured feature set includes spatiotemporal statistical features and behavioral label features. Spatiotemporal statistical features represent the patterns of user behavior in time and space, while behavioral label features represent the context and semantic information of user behavior. The compensation data prediction module is used to predict the positioning compensation data corresponding to the positioning time to be compensated based on the structured feature set through the compensation data prediction model. The compensation location determination module is used to determine the user's location information during the time to be compensated based on the location compensation data.

[0007] Thirdly, embodiments of this application provide an electronic device, which includes: a processor and a memory storing computer program instructions; When the processor executes computer program instructions, it implements the positioning compensation method as described in the first aspect.

[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the positioning compensation method as described in the first aspect.

[0009] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform the positioning compensation method as described in the first aspect.

[0010] In this embodiment, location compensation can be achieved locally on the electronic device using a compensation data prediction model based on the user's historical trajectory data and historical consumption and verification records. This eliminates the need to send user data such as historical trajectory data and historical consumption and verification records to the cloud. Compared to centralized cloud-based location compensation schemes, this reduces the likelihood of location compensation failures due to network issues, improves the success rate of location compensation, and effectively reduces the risk of privacy leaks. Compared to rule-based location compensation schemes, location compensation accuracy is significantly improved, especially in scenarios involving short-term cross-regional user activities, where the matching degree between the compensation result and the actual location is greatly improved. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating the positioning compensation method provided in some embodiments of this application; Figure 2This is a flowchart illustrating the positioning compensation method provided in some embodiments of this application; Figure 3 This is a flowchart illustrating the positioning compensation method provided in some embodiments of this application; Figure 4 This is a schematic diagram of an edge-cloud collaborative optimization architecture provided by some embodiments of this application; Figure 5 This is a schematic diagram of the model training process provided in some embodiments of this application; Figure 6 These are schematic diagrams of the positioning compensation device provided in some embodiments of this application; Figure 7 These are schematic diagrams of the structure of electronic devices provided in some embodiments of this application. Detailed Implementation

[0013] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0014] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0015] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0016] ATCN: Attention-Enhanced Temporal Convolutional Network.

[0017] SENet: Squeeze-and-Excitation Network, a neural network module designed to enhance the importance of feature channels by dynamically assigning channel weights to improve feature extraction efficiency.

[0018] FL: Federated Learning, a distributed machine learning framework that optimizes the global model by aggregating the model gradients (rather than the original data) from various endpoints.

[0019] KD: Knowledge Distillation, a model compression technique that reduces model size while retaining core competencies by transferring knowledge from a large "teacher model" to a small "student model".

[0020] IF: Isolation Forest, a machine learning algorithm based on anomaly detection, which identifies anomalous data by randomly isolating outliers.

[0021] RF: Random Forest, an ensemble learning algorithm consisting of multiple decision trees that improves classification accuracy through a voting mechanism.

[0022] Edge-sideAIEngine: Edge-sideAIEngine is an AI processing unit deployed on the user terminal, which includes modules such as data acquisition, feature engineering, model inference, and decision execution.

[0023] CCP: CloudCollaborativePlatform is a cloud-based collaborative platform, an auxiliary optimization platform deployed in the cloud, which includes modules such as teacher model training servers and federated aggregation nodes.

[0024] Before providing a more detailed description of the embodiments of this application, the positioning compensation methods in related technologies are introduced. The related technologies mainly include the following two types of technical paths: 1. Cloud-based centralized AI positioning compensation Implementation path: The terminal collects user data, uploads it to the cloud, and then a large-scale deep learning model (such as a time series model based on the Transformer architecture) analyzes the user behavior patterns based on the data uploaded by the terminal, generates local labels or location compensation strategies, and then sends the results back to the terminal for execution.

[0025] Common limitations: It relies on a stable network environment. In weak network or signal-blocked scenarios (such as underground shopping malls and elevators), data transmission latency is high, which can easily lead to compensation response timeouts. It requires uploading users' original trajectory data, which poses a risk of privacy leakage. In addition, cloud computing resources are consumed in large quantities, making it less economical for large-scale applications. The model parameters are large in scale (usually tens of millions or more), which places high demands on the network transmission capabilities of terminal devices and makes it less compatible with low-end devices.

[0026] 2. Terminal Static Rule Engine Implementation path: Location compensation is achieved based on preset fixed rules (such as "the address with the highest consumption frequency in the past 30 days is the usual location" and "location cache is valid for 24 hours"). It has no dynamic learning capability, and rule adjustment depends on manual configuration.

[0027] Common limitations: rigid rules cannot adapt to short-term changes in user behavior (such as cross-city business trips or temporary travel), which can easily lead to discrepancies between compensation results and actual locations; it is difficult to balance risk control and user experience. When the same rule is applied to activities with different risk levels, if the rule is too strict, it will hinder user participation, while if the rule is too lenient, it will trigger abnormal redemption risks; the ability to resolve unstructured addresses (such as "near XX business district") is weak, resulting in low accuracy in merchant location matching.

[0028] None of the above technical solutions can simultaneously solve the problem of coordinating weak network adaptability, privacy security, and compensation accuracy.

[0029] In view of this, in order to improve the adaptability, privacy security and accuracy of location compensation in weak network conditions, embodiments of this application provide a location compensation method, device, electronic device, storage medium and program product.

[0030] The positioning compensation method provided in the embodiments of this application will be described below.

[0031] The positioning compensation method provided in this application can be applied to positioning failure scenarios. The following section combines... Figures 1-5 The positioning compensation method provided in the embodiments of this application will be described in detail. It should be noted that the positioning compensation method provided in the embodiments of this application can be executed by a fixed electronic device, such as a mobile phone, computer, smartwatch, or other user terminal device. This application uses an electronic device executing the positioning compensation method as an example to illustrate the positioning compensation method provided in the embodiments of this application.

[0032] Figure 1 A flowchart illustrating the positioning compensation method provided in some embodiments of this application, such as... Figure 1 As shown, the method includes the following steps 110-140.

[0033] Step 110. Obtain the user's historical trajectory data and historical consumption and verification records.

[0034] User trajectory data provides the continuity and spatiotemporal patterns of a user's physical movement, and historical trajectory data can characterize the user's behavioral patterns. When positioning fails at a certain moment, the user's most likely location at that moment can be predicted based on historical trajectory data.

[0035] User spending and redemption records provide confirmation of user intent and high-precision location anchors. Based on user trajectory data and combined with spending and redemption records, a complete user behavior profile can be constructed. Based on this profile, location compensation decisions can be made more rationally and reliably, improving the accuracy of location compensation.

[0036] Historical trajectory data and historical consumption and redemption records can both be obtained from the local storage space of electronic devices.

[0037] In some embodiments of this application, during the operation of the electronic device, after its own positioning module, such as GPS (Global Positioning System), is turned on, the positioning module can collect the user's trajectory data at a sampling frequency (e.g., 1Hz). Each trajectory data may include information such as latitude and longitude, timestamp, and network signal strength. The collected trajectory data is stored in a designated storage location on the local storage location of the electronic device. In this way, the user's historical trajectory data can be obtained from the trajectory data stored locally on the electronic device.

[0038] In some embodiments of this application, historical trajectory data may include trajectory data collected within a first time period. The first time period can be set according to actual needs. For example, historical trajectory data may include the user's trajectory data over the past 7 days. Each trajectory data entry includes at least latitude, longitude, and a timestamp.

[0039] In some embodiments of this application, when a user uses an electronic device to make a purchase, the electronic device can record the user's purchase verification record and store the record in a designated local storage location. Each purchase verification record may include merchant identifier, merchant geographic coordinates, purchase time, user location information, activity identifier, verification amount, and other purchase information. Based on this, the user's historical purchase verification records can be retrieved from the locally stored records on the electronic device.

[0040] In some embodiments of this application, historical consumption verification records may include consumption verification records recorded within a second time period, wherein the second time period can be set according to actual needs. For example, historical consumption verification records may include records of users completing verifications within the past 30 days.

[0041] In some embodiments of this application, before performing step 110, the current network signal strength can be determined first. If the network signal strength is less than or equal to a strength threshold, then step 110 is performed. If the network signal strength is slightly less than the strength threshold, it indicates that the original GPS positioning may be unstable, inaccurate, or even about to be interrupted. In this case, positioning compensation is necessary. If the network signal strength is greater than the strength threshold, it indicates that the network signal is good, and GPS can provide accurate positioning, so positioning compensation is not required, and step 110 is not necessary.

[0042] Step 120. Extract features from historical trajectory data and historical consumption verification records to obtain a structured feature set, which includes spatiotemporal statistical features and behavioral label features.

[0043] In this embodiment, spatiotemporal statistical features are features that can characterize the patterns of user behavior in time and space, while behavioral label features are features that can characterize the context and semantic information of user behavior. The spatiotemporal statistical features and behavioral label features, from both quantitative and qualitative dimensions, jointly construct a comprehensive user behavior profile to support subsequent models in performing accurate location compensation.

[0044] In some embodiments of this application, spatiotemporal statistical features are used to quantitatively and continuously characterize the mathematical regularity and stability of user behavior in time and space. Spatiotemporal statistical features are typically numerical and can be derived from raw trajectory data and consumption verification records through mathematical calculations and statistical methods, providing objective and quantitative behavioral metrics. For example, spatiotemporal statistical features may include features such as the variance of active time period locations, the frequency of consumption within a business district, the intensity of trajectory periodicity, and the clustering degree of location points. Spatiotemporal statistical features provide solid, computable evidence for the model, allowing the model to understand the mathematical nature of user behavior patterns, making the model's reasoning process more objective and accurate.

[0045] In some embodiments of this application, behavioral label features are used to qualitatively and categorically represent the scenario, context, and semantic information of user behavior. These features are enumerable (i.e., categorical variables) and can be used to summarize and "label" user behavior through rules or classification models, providing a semantic understanding of behavioral patterns. For example, behavioral label features may include active time period labels, consumption scenario labels, trajectory stability labels, device scenario labels, activity participation labels, etc. Behavioral label features provide the model with scenario-based prior knowledge and interpretability, allowing the model to know where the user might be, what they are doing, and what state they are in. Behavioral label features help the model understand the semantics behind user behavior.

[0046] In some embodiments of this application, step 120 above may include steps 1201-1203.

[0047] Step 1201. Preprocess the historical trajectory data to obtain the original trajectory feature data. The original trajectory feature data includes the time-series positioning sequence of at least one trajectory. The time-series positioning sequence includes the latitude and longitude, timestamp, and network signal strength of each positioning point within a preset time period in the trajectory.

[0048] In some embodiments of this application, preprocessing of historical trajectory data mainly includes removing outliers and filling in missing values, and determining the preprocessed historical trajectory data as the original trajectory feature data for feature extraction.

[0049] In some embodiments of this application, historical trajectory data may include data from at least one trajectory, and the historical trajectory data may be preprocessed through the following steps 210-230.

[0050] Step 210. For each trajectory, remove the positioning points that deviate from the trajectory, fill in the missing positioning points in the trajectory, and extract the positioning points outside the preset time period to obtain the preprocessed trajectory.

[0051] In some embodiments of this application, anomaly detection of positioning points in the trajectory can be performed through isolated forest, and points that deviate significantly from the normal trajectory can be automatically removed.

[0052] In some embodiments of this application, a linear interpolation algorithm may be used to complete the missing short-term data caused by signal interruption, so as to ensure the continuity of timing.

[0053] In some embodiments of this application, the preset time period is the user's active time period, during which the electronic device is powered on and in non-flight mode. The preset time period can be determined based on the user's historical usage data of the electronic device. For example, the preset time period can be 6:00-24:00. The preprocessed trajectory only retains data from the preset time period, which improves data quality and reduces data volume.

[0054] Step 220. The preprocessed trajectories containing more than the number of positioning points are determined as valid trajectories.

[0055] In this embodiment, the quantity threshold is a threshold used to filter valid trajectories. The specific value of the quantity threshold can be set according to actual needs; for example, the quantity threshold can be set to 30, without any specific limitation.

[0056] After obtaining the preprocessed trajectory, the number of localization points contained in the preprocessed trajectory is determined. This number is then compared with a threshold value. From all the preprocessed trajectories obtained, those containing more than the threshold number of localization points are selected and defined as valid trajectories. This ensures statistical significance.

[0057] In some embodiments of this application, after obtaining a preprocessed trajectory containing a number of positioning points greater than a threshold, the preprocessed trajectories containing a number of positioning points greater than the threshold can be further filtered, and trajectories with a data volume less than or equal to the data volume threshold are determined as valid trajectories. This reduces the computational load of subsequent processing and improves positioning compensation efficiency.

[0058] Step 230. Generate raw trajectory feature data based on the valid trajectory.

[0059] After selecting the valid trajectories, a temporal positioning sequence corresponding to each valid trajectory can be generated, and all generated temporal positioning sequences can be used as the original data for trajectory features.

[0060] The quality of the original trajectory feature data obtained through preprocessing can achieve an outlier removal rate of ≥95%, a data missing completion rate of 100%, and temporal continuity of ≥99%, meaning there are no consecutive missing data exceeding 10 seconds.

[0061] In some embodiments of this application, for ease of subsequent processing, the temporal feature sequence of each valid trajectory in the original trajectory feature data can be stored as a JSON array format with a latitude of N×4. Here, N represents the number of location points in the trajectory, and 4 represents the four dimensions of longitude, latitude, timestamp, and network signal strength. For example, the temporal feature sequence of a valid trajectory can be stored in the following format: [{lat:31.2304,lng:121.5063,ts:1719888000000,rssi:-95},...] Where lat represents latitude, lng represents longitude, ts represents timestamp, and rssi represents network signal strength. The example above indicates that the latitude and longitude coordinates of a location point in the valid trajectory are 31.2304, 121.5063, the timestamp is 8:00 AM on July 2, 2024, and the network signal quality assessment value is -95PB.

[0062] Step 1202. Preprocess the historical consumption verification records to obtain raw consumption characteristic data. The raw consumption characteristic data includes consumption information of at least one consumption verification record. The consumption information includes the merchant's geographical coordinates, consumption time, and activity information.

[0063] Preprocessing historical consumption verification records mainly involves removing noisy data and using the denoised historical consumption verification records as the original consumption feature data for feature extraction.

[0064] In some embodiments of this application, historical consumption verification records may include at least one record, and each record may include merchant geographic coordinates, user location coordinates, consumption time, location time, and activity information. Based on this, preprocessing the historical consumption verification records to obtain raw consumption characteristic data may include the following steps 310-330.

[0065] Step 310. For each record, determine the location deviation between the merchant's geographical coordinates and the user's location coordinates, as well as the time deviation between the consumption time and the location time.

[0066] The location deviation between the merchant's geographical coordinates and the user's location coordinates refers to the distance between them. The straight-line distance between the merchant's geographical coordinates and the user's location coordinates can be calculated as the location deviation.

[0067] The time deviation between consumption time and location time refers to the time difference between the two times. This time deviation can be determined by calculating the difference between the consumption time and the location time.

[0068] Step 320. Determine the records in the historical consumption verification records that have a location deviation value less than the location deviation threshold and a time deviation value less than the time deviation threshold as valid records.

[0069] The location deviation threshold and time deviation threshold are used to filter valid records. The specific values ​​for these thresholds can be set according to actual needs. For example, the location deviation threshold can be set to 10 meters, and the time deviation threshold can be set to 5 minutes; there are no specific limitations on these values.

[0070] If there is a location deviation between the merchant's geographical coordinates and the user's location coordinates in a record, it indicates a mismatch between the merchant's geographical coordinates and the user's location coordinates, thus classifying the record as noisy data. Similarly, if there is a time deviation between the consumption time and the location time in a record, it indicates a mismatch between the consumption time and the location time, thus classifying the record as noisy data. Noisy data is removed from historical consumption verification records to obtain valid records where both the location deviation and time deviation values ​​are less than a certain threshold. This ensures the spatiotemporal correlation of the original consumption feature data.

[0071] Step 330. Generate raw consumption characteristic data based on all valid records.

[0072] Once valid records are obtained, raw consumption characteristic data can be generated based on the consumption information of all valid records.

[0073] In some embodiments of this application, all validly recorded consumption information can be compiled into a CSV table with a dimension of M×6, which is used as the raw data of consumption characteristics. Here, M represents the number of valid records, and 6 represents the six dimensions of data: merchant identifier, merchant latitude coordinates, merchant longitude coordinates, consumption time, consumption amount, and activity information.

[0074] For example, each valid record in the raw data of consumption characteristics can correspond to the following fields: merchant_id, merchant_lat, merchant_lng, consume_ts, amount, activity_id Here, merchant_id represents the merchant identifier, merchant_lat represents the merchant's latitude coordinates, merchant_lng represents the merchant's longitude coordinates, consume_ts represents the consumption time, amount represents the consumption amount, and activity_id represents the activity identifier.

[0075] Step 1203. Extract features from the original trajectory feature data and the original consumption feature data to obtain a structured feature set.

[0076] After obtaining the original trajectory feature data and the original consumption feature data, feature engineering can be performed on the original trajectory feature data and the original consumption feature data to obtain a structured feature set.

[0077] In some embodiments of this application, step 1203 may include steps 310-320.

[0078] Step 310. Extract features from the original trajectory feature data and the original consumption feature data to obtain a candidate feature set.

[0079] In some embodiments of this application, statistical algorithms can be used to extract features from the original trajectory feature data and the original consumption feature data to obtain a candidate feature set, which includes multiple candidate features.

[0080] In some embodiments of this application, step 310 above may be combined with a sliding window to extract temporal features, specifically including steps 3101-3103 below.

[0081] Step 3101. Segment the original data of trajectory features and consumption features using a sliding window to obtain multiple sets of window data.

[0082] In some embodiments of this application, the raw trajectory feature data and raw consumption feature data can be sorted by timestamp to ensure the correctness of the time sequence. A time window is set, and the length, step size, and overlap rate of the time window can be set according to actual needs. For example, the length of the time window can be 4 hours, and the step size can be 1 hour; there is no specific limitation on this. The time window is controlled to slide according to the step size, starting from the initial time of the raw trajectory feature data and raw consumption feature data sorted by timestamp, until the end time is reached. The data in the window after each slide is regarded as a group of window data. In this way, the raw trajectory feature data and raw consumption feature data can be divided into multiple groups of window data.

[0083] Step 3102. Extract the local spatiotemporal features of each group of window data using statistical algorithms.

[0084] For each set of window data, a statistical algorithm can be used to calculate the spatiotemporal statistical characteristics of the set of window data, thereby obtaining the local spatiotemporal characteristics corresponding to the set of window data.

[0085] In some embodiments of this application, local timing features may include the following features: Activity metrics: such as the total number of points of interest within a window.

[0086] Mobility metrics: such as total distance traveled within the window and average speed of movement.

[0087] Stability Indicators: Location Variance: Calculates the variance of latitude and longitude of all locations within the window. For example, the location variance during active periods. A small variance value indicates that the user's activity range is concentrated within that window period (e.g., in the office or at home); a large variance value indicates that the user is in a mobile or exploratory state (e.g., commuting, shopping). Consumer Behavior Indicators: Such as the total number of purchases within the window and the number of different business districts involved.

[0088] Step 3103. Use the local spatiotemporal features of all window data as candidate features in the candidate feature set.

[0089] After each set of window data is calculated, a local spatiotemporal feature is obtained. The local spatiotemporal features of all window data are used as candidate features in the candidate feature set.

[0090] In this way, by using a sliding window, continuous and lengthy raw data of trajectory features and raw data of consumption features can be transformed into a series of quantitative local spatiotemporal features that can capture short-term behavioral patterns as candidate features, providing a basis for the model to understand the user's behavioral state.

[0091] Step 320. Using a feature selection algorithm, candidate features in the candidate feature set are filtered to obtain a structured feature set.

[0092] Since there are many candidate features in the candidate feature set, in order to reduce the feature dimensionality, after obtaining the candidate feature set, a feature selection algorithm can be used to filter the candidate features in the candidate feature set, thereby selecting the core features related to localization compensation to form a structured feature set.

[0093] In some embodiments of this application, the feature selection algorithm may employ the ReliefF algorithm. Based on the ReliefF algorithm, the importance score of each candidate feature in the candidate feature set for localization compensation can be calculated. The candidate features in the candidate feature set are then sorted in descending order of importance score to obtain a feature sequence. The top N candidate features in the feature sequence are selected to form a structured feature set. Here, N is a positive integer, and the value of N can be set according to the actual situation.

[0094] For example, the final structured feature set may include spatiotemporal statistical features and behavioral label features as shown in Table 1 below.

[0095] In some embodiments of this application, when extracting features from the original trajectory feature data and the original consumption feature data, in addition to obtaining a structured feature set, feature quality indicators can also be determined. Feature quality indicators may include feature completeness (0-1, 1 indicates no missing features) and feature discriminability (0-1, 1 indicates that the feature has the highest contribution to the positioning compensation, output by the ReliefF algorithm). Based on the feature quality indicators, the quality of the extracted structured feature set can be determined.

[0096] Using the above feature extraction methods, feature selection algorithms can be used to filter out core features related to localization compensation, remove redundant information, and reduce feature dimensionality.

[0097] Step 130. Using the compensation data prediction model, predict the positioning compensation data corresponding to the positioning time to be compensated based on the structured feature set.

[0098] In some embodiments of this application, the location time to be compensated may be the time when location compensation is initiated, for example, the time when the electronic device's location failed this time.

[0099] In some embodiments of this application, the compensation data prediction model is a model deployed locally on the electronic device. After obtaining the structured feature set, the electronic device inputs the structured feature set into the locally deployed compensation data prediction model to obtain the positioning compensation data output by the compensation data prediction model for positioning compensation.

[0100] In some embodiments of this application, before inputting the structured feature set into the compensation data prediction model, the behavioral label features in the structured feature set can be standardized to convert them into a feature set that the model can understand. Specifically, the behavioral label features in the structured feature set can be one-hot encoded.

[0101] In some embodiments of this application, the compensation data prediction model is an Attention-Enhanced Temporal Convolutional Network (ATCN), which includes a channel attention module, a temporal attention module, and a depthwise separable convolution. Based on this, see [link to relevant documentation]. Figure 2 Step 130 above may include the following steps 1301-1304.

[0102] Step 1301. Extract the initial local spatiotemporal feature set based on the structured feature set through depthwise separable convolution.

[0103] In some embodiments of this application, depthwise separable convolution is primarily used for lightweight feature extraction.

[0104] Suppose the structured feature set input to the compensation data prediction model is a 1×T×C feature tensor. Here, 1 represents the batch size. Since it's edge-side inference, one user's structured feature set is processed each time, hence the batch size is 1. T represents the time steps. T is fixed at 24, representing a 24-hour window (i.e., one window per hour, covering 24 hours). That is, the model processes a time series of length 24 each time. C represents the number of feature channels. One feature corresponds to one channel, and C is the number of features contained in the structured feature set. Taking Table 1 as an example, which includes 8 spatiotemporal statistical features and 5 behavioral label features, C is 13. The 1×T×C feature tensor is input into a depthwise separable convolution. First, the depthwise separable convolution independently performs a one-dimensional temporal convolution on each feature channel of the feature tensor input to the compensation data prediction model. This step uses C different convolutional kernels, each sliding only on a single channel, specifically designed to extract the local patterns of each feature over time (e.g., the pattern of a sudden increase in "location variance" during the morning rush hour). After the one-dimensional temporal convolution, the output dimension remains 1×T×C. Next, a 1×1 convolution is used to channel-mix the result of the one-dimensional temporal convolution, linearly combining information from different channels to fuse the relationships between different features (e.g., associating the "morning rush hour" label with the "increased location variance" feature), ultimately yielding the initial local spatiotemporal feature set. The dimension of the initial local spatiotemporal feature set can be 1×T×C', where C' can be adjusted as needed.

[0105] Depthwise separable convolutions significantly reduce model parameters and computational cost by decoupling convolution computations across spatial and channel dimensions, while retaining effective feature extraction capabilities. This allows the model to run efficiently on edge devices, reducing model size and adapting to edge computing power while maintaining feature extraction capabilities.

[0106] Step 1302. Through the channel attention module, determine the weight of each feature in the target local spatiotemporal feature set, and process the target local spatiotemporal feature set based on the weights of all features to obtain the intermediate local spatiotemporal feature set.

[0107] In some embodiments of this application, the channel attention module may employ the SENet architecture to evaluate "which features" are more important, and then assign greater weights to the more important features.

[0108] In some embodiments of this application, an initial local spatiotemporal feature set of 1×T×C' output from the depthwise separable convolution is input into a channel attention module. The channel attention module performs global average pooling on the temporal dimension T, compressing the entire temporal information of each channel into a single value, thus transforming the 1×T×C' tensor into a 1×1×C' vector. This vector represents the global importance of each channel. This C'-dimensional vector is then input into a small two-layer fully connected neural network (bottleneck structure). The first fully connected layer reduces the dimensionality of the vector (e.g., to C' / 4), and the second fully connected layer restores the dimensionality-reduced vector to C' dimensions. It is then activated by the Sigmoid function to obtain a 1×1×C' weight vector. Each value in the weight vector is between 0 and 1, representing the weight of each channel, with more important features receiving larger weights. The weight vector is then multiplied channel-by-channel by the 1×T×C' feature tensor output from the depthwise separable convolution to obtain an intermediate local spatiotemporal feature set. This allows high-weight feature channels to be amplified, while low-weight channels are suppressed.

[0109] The channel attention module allows the model to dynamically learn the importance of different features in the current context. For example, when determining a user's workplace, it assigns a high weight to the feature "stability of trajectory during weekday midday hours," while the weight of "frequency of nighttime consumption" may be very low. This directly improves the model's interpretability and accuracy.

[0110] Step 1303. Using the temporal attention module, determine the weight of each time period in the intermediate local spatiotemporal feature set, and process the intermediate local spatiotemporal feature set based on the weights of all time periods to obtain the feature vector.

[0111] In some embodiments of this application, the temporal attention module is used to evaluate "which time period is more important", and the more important the time period, the greater the weight assigned.

[0112] In some embodiments of this application, the 1 × T × C' intermediate local spatiotemporal feature set output by the channel attention module is input into the temporal attention mechanism. The temporal attention mechanism calculates the attention score for each time segment. Specifically, the temporal attention mechanism calculates the importance score of each time segment in the time series for the localization compensation task through a series of transformations (such as using a query-key-value mechanism or a small fully connected network), thereby obtaining a 1 × T × 1 temporal attention weight vector, which includes the weight of each time segment. The time segment with a higher importance score has a larger weight. This temporal attention weight is multiplied with the intermediate local spatiotemporal feature set step by step to obtain the final feature vector. In this way, the features of time segments with high weights (such as the time when users are usually most active) can be strengthened, while the features of time segments with low weights (such as the late night when there is no activity) can be weakened.

[0113] The temporal attention module allows the model to focus on the most relevant time segments. For example, when a user requests location compensation in the afternoon, the model will pay more attention to their behavior in the past few hours and historically, during the same time period (e.g., afternoon), while ignoring irrelevant data from the early morning hours. This effectively suppresses noise and enhances the model's grasp of key temporal contexts.

[0114] Step 1304. Based on the feature vector, determine the positioning compensation data corresponding to the positioning time to be compensated.

[0115] In some embodiments of this application, the temporal dimension of the feature tensor refined through a dual attention mechanism of "channel" and "temporal" can be globally averaged and pooled to convert it into a fixed-length feature vector. This converted feature vector is then input into one or more fully connected layers. Finally, the model output is generated using the Softmax function. The final model output includes location compensation data. This location compensation data includes the user's predicted location information at the time of location compensation.

[0116] In some embodiments of this application, the location compensation data may include a list of compensation data sources. The compensation data source list is a candidate list ordered by priority, which may include at least one candidate data source. Each candidate data source corresponds to a predicted compensation location, which is the location information used to compensate for location failures. The compensation data source list may be in the format of a JSON array, where each candidate data source corresponds to a set of data, and each set of data may include the following information: [{source_type:"frequent_area",lat:31.2304,lng:121.5063,confidence:0.92,timestamp:1719888000000},...] Here, `source_type` represents the type of data source, specifying the logic upon which the recommended compensation location is derived. For example, the data source type can be one of the following: "frequent_area" is a high-frequency activity area (such as home or office). "history_cache": Historical cache location (e.g., a location successfully accessed a few minutes ago); "temp_stay": Temporary stop (such as a shop where you will stay for a short period of time); lat and lng represent the latitude and longitude coordinates of the compensation location recommended by the data source.

[0117] Confidence represents the confidence level of the data source itself (between 0 and 1), calculated by the channel attention module inside the ATCN model, reflecting the model's judgment on the reliability of this data source in the current scenario.

[0118] The timestamp represents the timestamp associated with the data source.

[0119] By outputting a list of compensation data sources, a variety of possible compensation locations can be selected, making it easy to choose the most suitable compensation location from the list.

[0120] Based on the above-mentioned compensation data prediction model, the weights of features such as GPS trajectory and consumption records can be dynamically allocated through the channel attention module, the trajectory weights during active user periods (such as 9:00-18:00 on weekdays) can be strengthened through the time-series attention module, noise during inactive periods can be suppressed, and traditional convolution can be replaced by depthwise separable convolution to reduce the model size while ensuring feature extraction capabilities and adapt to edge computing power.

[0121] Step 140. Based on the location compensation data, determine the user's location information during the location compensation period.

[0122] In some embodiments of this application, when the location compensation data contains only one compensation location, the compensation location is determined as the user's location information during the location compensation time.

[0123] In some embodiments of this application, when the location compensation data includes multiple compensation locations, the most suitable location can be selected from the multiple compensation locations as the user's location information during the location compensation time based on the information of the data source corresponding to each compensation location.

[0124] In this embodiment, location compensation can be achieved locally on the electronic device using a compensation data prediction model based on the user's historical trajectory data and historical consumption and verification records. This eliminates the need to send user data such as historical trajectory data and historical consumption and verification records to the cloud. Compared to centralized cloud-based location compensation schemes, this reduces the likelihood of location compensation failures due to network issues, improves the success rate of location compensation, and effectively reduces the risk of privacy leaks. Compared to rule-based location compensation schemes, location compensation accuracy is significantly improved, especially in scenarios involving short-term cross-regional user activities, where the matching degree between the compensation result and the actual location is greatly improved.

[0125] In some embodiments of this application, users can perform location compensation when participating in a target activity. In order to make the compensated location more suitable for the target activity to be participated in and reduce the risk, the following steps 410-430 can be executed before step 140 above.

[0126] Step 410. Determine the trust score of the location compensation data.

[0127] In some embodiments of this application, the reliability of location compensation data can be calculated based on a multi-factor logistic regression model. Specifically, this may include steps 4101-4104.

[0128] Step 4101. Determine the feature matching score between the positioning compensation data and the target activity.

[0129] The target activity is the activity that the user wants to participate in.

[0130] In some embodiments of this application, the electronic device can determine the target activity based on an application that is running on a turntable during positioning compensation. For example, it can identify a page in a running application, obtain activity information related to the activity (such as a marketing campaign) on the page, and then determine the target activity that the user wants to participate in based on the activity information.

[0131] The feature matching score between the location compensation data and the target activity is used to indicate the degree of matching between the location compensation data and the target activity. The higher the score, the better the match.

[0132] In some embodiments of this application, the feature matching score between the location compensation data and the target activity may include at least one of the following three scores: spatial overlap score, scene matching score, and behavior matching score.

[0133] In some embodiments of this application, the spatial overlap score can be determined by calculating the intersection-union ratio (IOU) between the compensation location in the positioning compensation data and the active area of ​​the target activity, and the calculated IOU is used as the spatial overlap score. The spatial overlap score ranges from 0 to 1.

[0134] In some embodiments of this application, the scene matching score can be determined by calculating the consistency between the compensated scene of the location compensation data and the activity scene of the target activity. The compensated scene refers to the scene corresponding to the data source in the location compensation data. The activity scene of the target activity can be determined from the activity information of the target activity. For example, the compensated scene is "shopping mall," and the activity scene of the target activity is "retail activity." The scene matching score ranges from 0 to 1.

[0135] In some embodiments of this application, the behavior matching score can be determined by calculating the consistency between the user's current behavior and historical behavior in the data source of location compensation data. The behavior matching score ranges from 0 to 1.

[0136] Step 4102. Determine the behavioral stability score based on historical trajectory data and historical consumption and redemption records.

[0137] User behavior stability score is used to characterize the stability of user behavior. It can be used to identify abnormal behavior, prevent fraud risks, and improve security.

[0138] In some embodiments of this application, the user's behavior stability score can be determined based on the degree of fluctuation in the user's recent trajectory. The greater the degree of fluctuation, the more unstable the user's behavior is, and the lower the user behavior stability score. Conversely, the smaller the degree of fluctuation, the more stable the user's behavior is, and the higher the user behavior stability score.

[0139] In some embodiments of this application, the user behavior stability score may include at least one of the following three scores: The standard deviation of trajectory fluctuation can be represented by the average deviation between the user's trajectory and the compensation position over the most recent M days; Consumption stability score, with a value range of 0-1. A higher consumption stability score indicates that the user's consumption behavior is more stable. A consumption stability score of 1 indicates that the consumption scenario has not changed in the same period of the last M days. The device status stability score ranges from 0 to 1. A higher device status stability score indicates that the device is more stable. A device status stability score of 1 indicates that the device network / load has not fluctuated drastically in the past L hours.

[0140] Where M and L are positive integers, and their specific values ​​can be set according to actual needs. For example, the value of M can be 3 and the value of L can be 1.

[0141] Step 4103. Determine the timeliness score and accuracy score of the positioning compensation data.

[0142] Each compensation location in the location compensation data is determined based on its corresponding data source. The timeliness score and accuracy score of the location compensation data can be determined based on the timeliness score, accuracy score, and weight of each data source type. The weight of each data source type can be set according to actual needs; for example, the weight of frequent_area can be set to 1.0, the weight of history_cache can be set to 0.8, and the weight of temp_stay can be set to 0.6.

[0143] Step 4104. Using a multi-factor logistic regression model, determine the trust score of the location compensation data based on feature matching score, user behavior stability score, timeliness score, and accuracy score.

[0144] The feature matching score, user behavior stability score, timeliness score, and accuracy score are input into a multi-factor logistic regression model, and the trust score of the location compensation data is calculated based on the multi-factor logistic regression model.

[0145] In some embodiments of this application, to increase the interpretability of the trust score, the multi-factor logistic regression model can also output the following score information: Positive contribution factor (e.g., "spatial overlap 0.98, contribution +15 points"); Negative contribution factors (e.g., "Standard deviation of trajectory fluctuation 500m, deduct 3 points"); Sensitive factor markers (e.g., "behavioral stability < 0.5, requires close attention").

[0146] In some embodiments of this application, the trust score can be a floating-point number from 0 to 100. The higher the trust score, the better the positioning compensation data.

[0147] Step 420. Determine the score threshold corresponding to the target activity that the user is to participate in.

[0148] Different activities have different risk levels, and different scoring thresholds can be set for activities with different risk levels. The higher the risk level of an activity, the higher the scoring threshold can be set.

[0149] In some embodiments of this application, the activity provider can set the score threshold corresponding to the activity, and based on this, the pre-set score threshold of the target activity can be directly obtained.

[0150] In other embodiments of this application, a pre-defined correspondence between risk levels and trust scores can be established. Based on this, the risk level of a target activity can be analyzed based on its activity information, and the lower limit of the trust score corresponding to that risk level can be determined as the score threshold for the target activity. For example, the risk level of an activity can be divided into high risk, medium risk, and low risk, and the trust score can be divided into high trust, medium trust, and low trust. The score range corresponding to high trust can be set to [90, 100], the score range corresponding to medium trust can be set to [70, 89], and the score range corresponding to low trust can be set to [0, 69]. The pre-defined correspondence between risk levels and trust scores can include: high trust corresponds to high-risk activities (e.g., government vouchers), and medium trust corresponds to medium-risk and low-risk activities.

[0151] Step 430. Compare the trust score of the location compensation data with the score threshold to obtain the comparison result.

[0152] In some embodiments of this application, after obtaining the trust score and score threshold of the location compensation data, the trust score, score threshold, and electronic device status parameters can be input into the local execution module. The local execution module, as the decision-making implementation component of the edge AI engine, is responsible for transforming the location compensation result into user-perceptible business operations, achieving an edge-side closed loop of "model inference - decision execution." The local execution module outputs the decision result; when the trust score is greater than or equal to the score threshold, it can output a "allow location compensation" decision result and simultaneously push confirmation information "compensation location matches the activity area" to the edge-side activity verification module.

[0153] Accordingly, step 140 can be specifically implemented as follows: if the comparison result indicates that the trust score of the location compensation data is greater than or equal to the score threshold, the user's location information during the location compensation time is determined based on the location compensation data.

[0154] In some embodiments of this application, if the comparison result indicates that the trust score of the positioning compensation data is less than the score threshold, positioning compensation based on the positioning compensation data can be refused, "Unable to compensate at the moment" can be output, and a friendly prompt (such as "It is recommended to try again after the signal is restored") can be triggered, or the positioning compensation data can be verified a second time.

[0155] In some embodiments of this application, if the comparison result indicates that the trust score of the location compensation data is less than a score threshold, a risk warning can be output. The risk warning may include risk items present in the current location compensation data, so as to perform targeted secondary verification of the risk items. For example, the following risk warning may be output: "Data source timeliness is insufficient (3 hours ago), it is recommended to verify recent behavior first."

[0156] In the above technical solution, by comprehensively considering the timeliness, feature matching degree, and user behavior stability of the location compensation data, a trust score is generated through a logistic regression model. Through dynamic trust assessment, while ensuring the risk control requirements of the activity, restrictions on the participation of normal users are reduced, thus achieving a balance between risk control and user experience.

[0157] In some embodiments of this application, after step 140 above, after pushing the confirmation information "compensation location matches the activity area" to the end-side activity verification module, the activity verification module can also determine whether the user meets the verification conditions for the target activity to be participated in based on the compensation location information. The verification conditions include the activity area range. In this way, the activity verification module can be directly connected to complete the permission confirmation.

[0158] In some embodiments of this application, after location compensation is completed, a corresponding decision log can be recorded locally on the electronic device for subsequent local model fine-tuning. The decision log may include information such as "location compensation data, trust score, decision result (allow / deny / secondary verification), and execution time," where the execution time refers to the verification time of the target activity. The logs can be encrypted and stored locally on the electronic device without being uploaded to the cloud, ensuring user privacy and security.

[0159] In some embodiments of this application, the lifespan of the decision log in the electronic device can be 30 days, that is, the decision log can be retained locally in the electronic device for 30 days and automatically deleted after expiration, so as to avoid occupying too much memory space.

[0160] In some embodiments of this application, the related technologies involve large model parameter scales, high computing power requirements for terminal devices, and insufficient compatibility with low-end devices. To address the issue of poor terminal compatibility and ensure smooth operation across a range of devices from low-end to high-end, a balance between performance and compatibility is achieved. See also... Figure 3 Before step 130 above, the following steps can be performed first: Using a compensation data prediction model, based on structured features, to predict the positioning compensation data corresponding to the positioning time to be compensated, the method further includes: 510. Determine the computing power level of electronic devices.

[0161] The computing power level of an electronic device is used to indicate its computing capabilities; the higher the computing power level, the stronger the computing power.

[0162] In some embodiments of this application, device information of an electronic device can be obtained, including at least one of the following: hardware parameter data and operating status data; and the computing power level of the electronic device can be determined based on the device information using a random forest model.

[0163] In some embodiments of this application, the hardware parameter data are all integer data, which may include: CPU parameters and memory parameters. The CPU parameters may include, for example, clock speed (unit: GHz, accurate to 0.1), number of cores (e.g., 4 cores / 8 cores), architecture (e.g., ARMv8 / x86), etc., and the memory parameters may include, for example, capacity (unit: GB) and available memory (unit: GB). Optionally, the hardware parameter data may also include: GPU parameters, which may include, for example, model (e.g., Adreno 610), video memory (unit: GB), and floating-point computing power (unit: GFLOPS).

[0164] In some embodiments of this application, the operating status data may include the real-time operating load of the electronic device. Specifically, it may include CPU load, memory usage, battery capacity, network latency, etc. The electronic device may collect the real-time operating load at a preset sampling frequency, for example, the sampling frequency may be 1Hz. Based on this, the average value of the real-time operating load collected in the last 5 seconds can be obtained as the operating status data.

[0165] 520. From at least two versions of the compensation data prediction model, determine a target compensation data prediction model that matches the computing power level, wherein the different versions of the compensation data prediction model have different complexities.

[0166] In some embodiments of this application, multiple versions of compensation data prediction models are pre-configured in the electronic device. These different versions have the same architecture but varying complexity. For example, three versions of the compensation data prediction model can be pre-configured: a full version, a simplified version, and a basic version. The full version has 12 network layers, 32 feature channels, and an inference time ≤300ms. The simplified version has 8 network layers, 24 feature channels, and an inference time ≤400ms. The basic version has 4 network layers, 16 feature channels, and an inference time ≤500ms. Higher model complexity requires greater computational power but results in more accurate output.

[0167] In some embodiments of this application, a computing power-aware adaptive engine can be used to dynamically determine the model version matching the computing power level of an electronic device based on the computing power level of the electronic device, combined with reinforcement learning. The computing power-aware adaptive engine can have a correspondence between model versions and computing power levels. For example, the computing power level of an electronic device can be divided into six levels, from 1 to 6, with level 1 being the lowest and level 6 the highest. The correspondence between model versions and computing power levels can include: the full version corresponds to computing power levels 5 and 6, the simplified version corresponds to computing power levels 3 and 4, and the basic version corresponds to computing power levels 1 and 2. Based on this, the determined computing power level of the electronic device can be input into the computing power-aware adaptive engine to determine the model version matching the computing power level, and the compensation data prediction model of that version is determined as the target compensation data prediction model.

[0168] In some embodiments of this application, different versions of the model correspond to different numbers of feature channels. The full-version model can process all features in the structured feature set, while the simplified and basic versions require feature pruning. Based on this, the computing power-aware adaptive engine can automatically predict the model based on the matched target compensation data and output model adjustment suggestions. These suggestions may include feature pruning rules, such as pruning non-core features like "device scene labels" in the basic version. Furthermore, the model adjustment suggestions may also include inference optimization strategies, such as enabling INT8 quantization for low-end devices with computing power levels of 1 or 2, and enabling FP16 precision for devices with computing power levels of 5 or 6. The model adjustment suggestions may also include resource usage warnings, such as "Memory usage will reach 95%, it is recommended to close background applications," to optimize resources and improve computing efficiency.

[0169] In some embodiments of this application, the computing power-aware adaptive engine may also output an adaptation effect prediction, which may include information such as prediction inference time, prediction content usage, and user experience score.

[0170] Accordingly, step 130 above can be specifically implemented as follows: using the target compensation data prediction model, predict the positioning compensation data corresponding to the positioning time to be compensated based on structured features.

[0171] In the above scheme, random forests are used to classify the computing power of devices. Through a computing power-aware adaptive mechanism, the adaptability to devices with different performance is significantly improved. For high-end devices, the complete model is used, retaining all features and network layers. For mid-to-low-end devices, the feature dimensions and network depth are automatically reduced, covering high, medium and low-end devices. This ensures that different devices can run efficiently, reduces the problem of uneven experience caused by differences in device hardware, solves the problem of poor terminal adaptability in related technologies, and balances performance and compatibility.

[0172] In some embodiments of this application, the compensation data prediction model is obtained using a collaborative optimization mechanism of "cloud-based teacher model distillation + terminal federated learning". See also Figure 4 This is a schematic diagram of an architecture optimized for edge-cloud collaboration, such as... Figure 4 As shown, the cloud platform 401 includes a gradient aggregation module 4011 and a teacher model 4012, and the electronic device 402 includes a federated learning module 4021 and a compensated data prediction model 4022. Based on this, see... Figure 5 Before step 130 above, the electronic device can first train the compensation data prediction model through steps 610-650 as follows.

[0173] Step 610. Receive soft tags sent by the cloud platform. The soft tags are obtained by knowledge distillation of the teacher model trained on the cloud platform.

[0174] The teacher model in the cloud platform is responsible for training the patterns of the entire dataset and transmitting soft tags to electronic devices through knowledge distillation. These soft tags contain high-order localization knowledge.

[0175] Step 620. Based on the soft tags and locally stored trajectory data and consumption verification records, fine-tune the initial model to obtain the adjustment gradient of the model parameters.

[0176] Step 630. After encrypting the adjusted gradient, send it to the cloud platform.

[0177] In some embodiments of this application, the gradient adjustment can be asymmetrically encrypted.

[0178] In some embodiments of this application, the electronic device may send an encrypted adjustment gradient to a cloud platform when connected to WiFi.

[0179] In some embodiments of this application, when sending the encrypted adjustment gradient to the cloud platform, the computing power level label of the electronic device may be attached.

[0180] Step 640. Receive the model update package sent by the cloud platform. The model update package is obtained by the cloud platform aggregating the adjusted gradients using the federated averaging algorithm.

[0181] In some embodiments of this application, after receiving the encrypted adjustment gradient, the cloud platform can filter invalid gradients (such as gradient outliers caused by training anomalies) through the gradient aggregation module, and only decrypt valid gradient data (without original location / consumption data) using a dedicated key. Then, it sets gradient weights based on the computing power level of the electronic device, with different computing power levels corresponding to different gradient weights. For example, the gradient weight of an electronic device with a computing power level of 5 or 6 can be set to 1.2, the gradient weight of an electronic device with a computing power level of 3 or 4 can be set to 1.0, and the gradient weight of an electronic device with a computing power level of 1 or 2 can be set to 0.8. This avoids the impact of computing power deviation on the overall performance. After obtaining the gradient weights, the average gradient of the model variants (full / simplified / basic version) corresponding to the same computing power level can be calculated according to the gradient weights to generate a global gradient. The global gradient is then converted into a model update package corresponding to the computing power level, and the model update package is pushed to each terminal device that has deployed the compensated data prediction model.

[0182] Step 650. Adjust the model parameters of the initial model based on the model update package to obtain the compensated data prediction model.

[0183] After receiving the model update package sent by the cloud platform, the electronic device adjusts the model parameters of the initial model based on the model update package, thereby obtaining the compensated data prediction model.

[0184] Through the above scheme, the cloud platform can transfer high-order localization rules to lightweight models in electronic devices via knowledge distillation. The electronic devices then achieve group optimization by aggregating encrypted gradients through federated learning, without needing to upload the original data. This overcomes the privacy risks of traditional centralized cloud training and the accuracy limitations of isolated terminal models, achieving "data not on the cloud, model co-evolution".

[0185] The positioning compensation method provided in this application embodiment will be described below with reference to a specific application scenario.

[0186] Scenario: A user uses an electronic device with a computing power level of 3 to participate in a regional marketing activity in a merchant area along the subway line (weak network environment). There is no GPS signal and a weak 2G network throughout the process, and the user requires zero data upload.

[0187] The core technology process includes: (1) Data acquisition and cleaning Input: Commuting route for the past 30 days (including tunnel sections with no signal from 7:30 to 7:32 every day), and 3 shopping records in the subway shopping area last week.

[0188] Processing: Remove out-of-location jump points from isolated forests (such as last week's travel trajectory), and complete the 2-minute missing time based on linear interpolation of historical trajectories along the subway line.

[0189] Output: Noise-reduced tunnel commuting patterns + time-series data on consumption in commercial districts.

[0190] (2) Feature Engineering ReliefF filtering: retain the core features of "7:00-9:00 commuting time" and "frequency of consumption in the business district", and remove features irrelevant to the device.

[0191] Sliding window: Extract local features of "staying in the business district from 7:30 to 7:45" over the past 7 days (stability 0.92).

[0192] (3) ATCN model inference Configuration: Computing power level 3 → Matching the simplified version of ATCN (850,000 parameters, memory < 90MB).

[0193] Dual attention: Channel attention assigns a weight of 0.8 to "consumption records", while temporal attention strengthens the weight of 1.2 for weekday morning rush hour.

[0194] Depthwise separable convolution: Splitting computation reduces inference time to 320ms.

[0195] (4) Trust assessment Input: 100% overlap of compensation area, 0.92 user behavior stability, and 91% historical accuracy.

[0196] Output: The final trust score was 91, exceeding the marketing campaign's scoring threshold of 80.

[0197] (5) Optimization of Federal Distillation Electronic devices encrypt and upload compensation gradients, and the accuracy of similar scenarios is improved after aggregation on the cloud platform.

[0198] Based on the positioning compensation method provided in the above embodiments, this application also provides specific implementation methods of the positioning compensation device. Please refer to the following embodiments.

[0199] See Figure 6 The positioning compensation device 600 provided in this application embodiment includes the following modules: Data acquisition module 601 is used to acquire users' historical trajectory data and historical consumption and verification records; The feature engineering module 602 is used to extract features from historical trajectory data and historical consumption and verification records to obtain a structured feature set. The structured feature set includes spatiotemporal statistical features and behavioral label features. The spatiotemporal statistical features represent the patterns of user behavior in time and space, while the behavioral label features represent the context and semantic information of user behavior. The compensation data prediction module 603 is used to predict the positioning compensation data corresponding to the positioning time to be compensated based on the structured feature set through the compensation data prediction model. The compensation location determination module 604 is used to determine the user's location information during the location compensation time based on the location compensation data.

[0200] In this embodiment, location compensation can be achieved locally on the electronic device using a compensation data prediction model based on the user's historical trajectory data and historical consumption and verification records. This eliminates the need to send user data such as historical trajectory data and historical consumption and verification records to the cloud. Compared to centralized cloud-based location compensation schemes, this reduces the likelihood of location compensation failures due to network issues, improves the success rate of location compensation, and effectively reduces the risk of privacy leaks. Compared to rule-based location compensation schemes, location compensation accuracy is significantly improved, especially in scenarios involving short-term cross-regional user activities, where the matching degree between the compensation result and the actual location is greatly improved.

[0201] In some embodiments of this application, feature engineering module 602 includes: The preprocessing submodule is used to preprocess historical trajectory data to obtain raw trajectory feature data. The raw trajectory feature data includes a time-series positioning sequence of at least one trajectory. The time-series positioning sequence includes the latitude and longitude, timestamp, and network signal strength of each positioning point within a preset time period in the trajectory. The preprocessing submodule is also used to preprocess historical consumption verification records to obtain raw consumption feature data. The raw consumption feature data includes consumption information of at least one consumption verification record, including merchant identifier, merchant geographic coordinates, consumption time and activity identifier. The feature processing submodule is used to extract features from the original trajectory feature data and the original consumption feature data to obtain a structured feature set.

[0202] In some embodiments of this application, the historical trajectory data includes at least one trajectory, and the preprocessing submodule is specifically used for: For each trajectory, remove the positioning points that deviate from the trajectory, fill in the missing positioning points in the trajectory, and remove the positioning points outside the preset time period to obtain the preprocessed trajectory. The preprocessed trajectory containing more than a certain number of positioning points is identified as a valid trajectory. Based on the valid trajectory, generate the original trajectory feature data.

[0203] In some embodiments of this application, the historical consumption verification record includes at least one record, and each record includes merchant geographic coordinates, user location coordinates, consumption time, location time and activity information; The preprocessing submodule is specifically used for: For each record, determine the location deviation between the merchant's geographical coordinates and the user's location coordinates, as well as the time deviation between the consumption time and the location time. Records in the historical consumption verification records that have a location deviation value less than the location deviation threshold and a time deviation value less than the time deviation threshold are identified as valid records. Based on all valid records, generate raw data on consumption characteristics.

[0204] In some embodiments of this application, the feature processing submodule includes: The feature extraction unit is used to extract features from the original trajectory feature data and the original consumption feature data to obtain a candidate feature set; The feature selection unit is used to filter candidate features in the candidate feature set through a feature selection algorithm to obtain a structured feature set.

[0205] In some embodiments of this application, the feature extraction unit is specifically used for: The original data of trajectory features and consumption features are segmented by a sliding window to obtain multiple sets of window data; Statistical algorithms are used to extract local spatiotemporal features of each group of window data; The local spatiotemporal features of all window data are used as candidate features in the candidate feature set.

[0206] In some embodiments of this application, the compensation data prediction model includes a channel attention module, a temporal attention module, and a depthwise separable convolution; The compensation data prediction module 603 is specifically used for: By using depthwise separable convolution, an initial local spatiotemporal feature set is extracted based on a structured feature set; The channel attention module determines the weight of each feature in the initial local spatiotemporal feature set, and processes the initial local spatiotemporal feature set based on the weights of all features to obtain the intermediate local spatiotemporal feature set. The temporal attention module determines the weight of each time period in the intermediate local spatiotemporal feature set, and processes the intermediate local spatiotemporal feature set based on the weights of all time periods to obtain the feature vector. Based on the feature vector, the positioning compensation data corresponding to the positioning time to be compensated is determined.

[0207] In some embodiments of this application, the apparatus 600 further includes: a trust assessment module, used for: Before determining the user's location information for the time to be compensated based on location compensation data, a trust score for the location compensation data is determined; a score threshold corresponding to the target activity to be participated in by the user is determined; and the trust score is compared with the score threshold to obtain the comparison result. The compensation position determination module 604 is specifically used for: If the comparison results indicate that the trust score of the location compensation data is greater than the score threshold, the user's location information during the location compensation period is determined.

[0208] In some embodiments of this application, the trust assessment module is specifically used for: Determine the feature matching score between the location compensation data and the target activity; Based on historical trajectory data and historical consumption and redemption records, a stable score for user behavior is determined. Determine the timeliness and accuracy scores of the positioning compensation data; The trust score of the location compensation data is determined by using a multi-factor logistic regression model based on feature matching score, user behavior stability score, timeliness score, and accuracy score.

[0209] In some embodiments of this application, the device 600 further includes a computing power adaptive module, used for: Before predicting the location compensation data corresponding to the location time to be compensated based on structured features using the compensation data prediction model, the computing power level of the electronic device is determined; from at least two versions of the compensation data prediction model, a target compensation data prediction model matching the computing power level is determined, wherein the complexity of different versions of the compensation data prediction model is different. The compensation data prediction module 603 is specifically used for: The target compensation data prediction model predicts the positioning compensation data corresponding to the positioning time to be compensated based on structured features.

[0210] In some embodiments of this application, the computing power adaptive module is specifically used for: Obtain device information of electronic devices, which includes at least one of the following: hardware parameter data and operating status data; The computing power level of electronic devices is determined based on device information using a random forest model.

[0211] In some embodiments of this application, the method further includes: Based on location information, determine whether a user meets the redemption criteria for the target activity to be participated in. The redemption criteria include the activity area.

[0212] In some embodiments of this application, the apparatus 600 further includes a model training module for: Before predicting the location compensation data corresponding to the location time to be compensated based on structured features using the compensation data prediction model, the system receives soft tags sent by the cloud platform. The soft tags are obtained by knowledge distillation of the teacher model trained on the cloud platform. Based on soft tags and locally stored trajectory data and consumption verification records, the initial model is fine-tuned and trained to obtain the adjustment gradient of the model parameters. After encrypting the gradient adjustment, it is sent to the cloud platform; Receive model update packages sent by the cloud platform. The model update packages are obtained by the cloud platform by aggregating the adjusted gradients using a federated averaging algorithm. The model parameters of the initial model are adjusted based on the model update package to obtain the compensated data prediction model.

[0213] The positioning compensation device provided in this application embodiment can achieve... Figures 1 to 5 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0214] Figure 7 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.

[0215] Electronic device 700 may include processor 701 and memory 702 storing computer program instructions.

[0216] Specifically, the processor 701 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0217] Memory 702 may include a large-capacity memory for data or instructions. For example, and not limitingly, memory 702 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 702 may include removable or non-removable (or fixed) media. Where appropriate, memory 702 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 702 is non-volatile solid-state memory. Memory 702 may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, typically, memory 702 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it performs the operations described in any of the location compensation methods in the above embodiments.

[0218] The processor 701 implements any of the positioning compensation methods in the above embodiments by reading and executing computer program instructions stored in the memory 702.

[0219] In one example, the electronic device 700 may also include a communication interface 707 and a bus 710. For example, Figure 7 As shown, the processor 701, memory 702, and communication interface 707 are connected through bus 710 and complete communication with each other.

[0220] The communication interface 707 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0221] Bus 710 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 710 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0222] Furthermore, in conjunction with the positioning compensation methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the positioning compensation methods in the above embodiments.

[0223] This application also provides a computer program product, including a computer program, which, when executed, implements any of the positioning compensation methods described in the above embodiments.

[0224] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0225] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0226] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0227] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0228] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope 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 these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A positioning compensation method, characterized in that, Applied to electronic devices, the method includes: Obtain users' historical trajectory data and historical consumption and redemption records; Feature extraction is performed on the historical trajectory data and the historical consumption and redemption records to obtain a structured feature set. The structured feature set includes spatiotemporal statistical features and behavioral label features. The spatiotemporal statistical features represent the patterns of user behavior in time and space, and the behavioral label features represent the scenario and semantic information of user behavior. The compensation data prediction model predicts the positioning compensation data corresponding to the positioning time to be compensated based on the structured feature set. Based on the location compensation data, the user's location information during the location compensation time is determined.

2. The method according to claim 1, characterized in that, The step of extracting features from the historical trajectory data and the historical consumption and reimbursement records to obtain a structured feature set includes: The historical trajectory data is preprocessed to obtain raw trajectory feature data. The raw trajectory feature data includes a time-series positioning sequence of at least one trajectory. The time-series positioning sequence includes the latitude and longitude, timestamp, and network signal strength of each positioning point within a preset time period in the trajectory. The historical consumption verification records are preprocessed to obtain raw consumption feature data. The raw consumption feature data includes consumption information of at least one consumption verification record. The consumption information includes merchant identifier, merchant geographical coordinates, consumption time, and activity identifier. Feature extraction is performed on the original trajectory feature data and the original consumption feature data to obtain the structured feature set.

3. The method according to claim 2, characterized in that, The historical trajectory data includes at least one trajectory. The preprocessing of the historical trajectory data to obtain raw trajectory feature data includes: For each trajectory, remove the positioning points that deviate from the trajectory, fill in the missing positioning points in the trajectory, and remove the positioning points outside the preset time period to obtain the preprocessed trajectory. The preprocessed trajectory containing more than a certain number of positioning points is identified as a valid trajectory. Based on the valid trajectory, the original data of the trajectory features are generated.

4. The method according to claim 2, characterized in that, The historical consumption verification record includes at least one record, and each record includes the merchant's geographical coordinates, the user's location coordinates, the consumption time, the location time, and the activity information; The preprocessing of the historical consumption verification records to obtain raw consumption characteristic data includes: For each record, determine the location deviation between the merchant's geographical coordinates and the user's location coordinates in the record, as well as the time deviation between the consumption time and the location time; Records in the historical consumption verification records that have a location deviation value less than the location deviation threshold and a time deviation value less than the time deviation threshold are determined as valid records. Based on all valid records, the raw data of the consumption characteristics is generated.

5. The method according to claim 2, characterized in that, The step of extracting features from the original trajectory feature data and the original consumption feature data to obtain the structured feature set includes: Feature extraction is performed on the original trajectory feature data and the original consumption feature data to obtain a candidate feature set; The structured feature set is obtained by filtering candidate features in the candidate feature set using a feature selection algorithm.

6. The method according to claim 5, characterized in that, The step of extracting features from the original trajectory feature data and the original consumption feature data to obtain a candidate feature set includes: The original data of the trajectory features and the original data of the consumption features are segmented by a sliding window to obtain multiple sets of window data; Statistical algorithms are used to extract local spatiotemporal features of each group of window data; The local spatiotemporal features of all window data are used as candidate features in the candidate feature set.

7. The method according to claim 1, characterized in that, The compensation data prediction model includes a channel attention module, a temporal attention module, and a depthwise separable convolution. The step of predicting the positioning compensation data corresponding to the positioning time to be compensated based on the structured feature set using the compensation data prediction model includes: By using the depthwise separable convolution, an initial local spatiotemporal feature set is extracted based on the structured feature set; The channel attention module determines the weight of each feature in the initial local spatiotemporal feature set, and processes the initial local spatiotemporal feature set based on the weights of all features to obtain an intermediate local spatiotemporal feature set. The temporal attention module determines the weight of each time period in the intermediate local spatiotemporal feature set, and processes the intermediate local spatiotemporal feature set based on the weights of all time periods to obtain a feature vector. Based on the feature vector, the positioning compensation data corresponding to the positioning time to be compensated is determined.

8. The method according to any one of claims 1-7, characterized in that, Before determining the user's location information for the location time to be compensated based on the location compensation data, the method further includes: Determine the trust score of the location compensation data; Determine the score threshold corresponding to the target activity that the user is to participate in; The trust score is compared with the score threshold to obtain the comparison result; The step of determining the user's location information during the location compensation time based on the location compensation data includes: If the comparison result indicates that the trust score of the location compensation data is greater than the score threshold, the user's location information during the location compensation time is determined.

9. The method according to claim 8, characterized in that, Determining the trust score of the location compensation data includes: Determine the feature matching score between the positioning compensation data and the target activity; Based on the historical trajectory data and the historical consumption and redemption records, a user behavior stability score is determined. Determine the timeliness score and accuracy score of the positioning compensation data; The trust score of the location compensation data is determined by using a multi-factor logistic regression model based on the feature matching score, the user behavior stability score, the timeliness score, and the accuracy score.

10. The method according to any one of claims 1-7, characterized in that, Before predicting the positioning compensation data corresponding to the positioning time to be compensated based on the structured features using the compensation data prediction model, the method further includes: Determine the computing power level of the electronic device; From at least two versions of the compensation data prediction model, a target compensation data prediction model matching the computing power level is determined, wherein the different versions of the compensation data prediction model have different complexities; The step of predicting the positioning compensation data corresponding to the positioning time to be compensated based on the structured features using the compensation data prediction model includes: The target compensation data prediction model predicts the positioning compensation data corresponding to the positioning time to be compensated based on the structured features.

11. The method according to claim 10, characterized in that, Determining the computing power level of the electronic device includes: Obtain device information of the electronic device, wherein the device information includes at least one of the following: hardware parameter data and operating status data; The computing power level of the electronic device is determined based on the device information using a random forest model.

12. The method according to any one of claims 1-7, characterized in that, The method further includes: Based on the location information, it is determined whether the user meets the redemption conditions for the target activity to be participated in, and the redemption conditions include the activity area range.

13. The method according to any one of claims 1-7, characterized in that, Before predicting the positioning compensation data corresponding to the positioning time to be compensated based on the structured features using the compensation data prediction model, the method further includes: Receive soft tags sent by the cloud platform, which are obtained by knowledge distillation of the teacher model trained on the cloud platform; Based on the soft tags and locally stored trajectory data and consumption verification records, the initial model is fine-tuned and trained to obtain the adjustment gradient of the model parameters. After encrypting the adjusted gradient, it is sent to the cloud platform; Receive a model update package sent by the cloud platform, wherein the model update package is obtained by the cloud platform aggregating the adjusted gradients using a federated averaging algorithm; The model parameters of the initial model are adjusted based on the model update package to obtain the compensated data prediction model.

14. A positioning compensation device, characterized in that, Applied to electronic devices, the device includes: The data acquisition module is used to acquire users' historical trajectory data and historical consumption and verification records; The feature engineering module is used to extract features from the historical trajectory data and the historical consumption and redemption records to obtain a structured feature set. The structured feature set includes spatiotemporal statistical features and behavioral label features. The spatiotemporal statistical features represent the patterns of user behavior in time and space, and the behavioral label features represent the scenario and semantic information of user behavior. The compensation data prediction module is used to predict the positioning compensation data corresponding to the positioning time to be compensated based on the structured feature set using the compensation data prediction model. The compensation location determination module is used to determine the user's location information during the location compensation time based on the location compensation data.

15. An electronic device, characterized in that, The electronic device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the positioning compensation method as described in any one of claims 1-13.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the positioning compensation method as described in any one of claims 1-13.

17. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the positioning compensation method as described in any one of claims 1-13.