Location information determination methods, devices, storage media, electronic devices and software products
By associating location query requests with scene features, determining decision units, and selecting target location signals in priority order, the problem of unstable positioning accuracy in multi-source heterogeneous signals is solved, and efficient and reliable location result output is achieved.
Patent Information
- Application Number
- CN202611450529.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-11-10
AI Technical Summary
Existing technologies cannot effectively output reliable location results that meet the requirements of business scenarios from multi-source heterogeneous signals, resulting in unstable positioning accuracy and excessive computational overhead.
By associating location query requests with scene features, decision-making units are identified and target location signals are selected in priority order. Within-group selection rules are used to select signals that meet scene requirements from candidate location signals, achieving hierarchical smooth degradation and calibration processing, ensuring the reliability of location results and scene adaptability.
It improves the reliability and scenario adaptability of location query results, reduces computational overhead, avoids a sharp drop in accuracy due to the lack of high-priority signals, and improves the efficiency of location query processing.
Smart Images

Figure CN123075356A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of location service technology, and in particular to a method, apparatus, storage medium, electronic device and program product for determining location information. Background Technology
[0002] With the development of the internet, location services have become a fundamental capability in scenarios such as social networking, local services, and content recommendation. However, these non-map applications do not have the authority to continuously collect real-time location data such as GPS (Global Positioning System) in the background; they can only obtain this information temporarily by actively triggering specific functions. Therefore, the information that can be used to determine a user's location often comes from multiple indirect channels. Due to the orders of magnitude differences in coverage accuracy, timeliness, and reliability among various signals, how to output reliable location results that meet the requirements of business scenarios from multi-source heterogeneous signals has become an urgent technical problem to be solved. Summary of the Invention
[0003] This application provides a method, apparatus, storage medium, electronic device, and program product for determining location information, so as to improve the reliability and scenario adaptability of location query results.
[0004] This application provides the following solution: According to the first aspect, a method for determining location information is provided, including: In response to a location query request, at least one decision unit is determined that corresponds to the scene characteristics of the location query request. Each decision unit is associated with a set of candidate location signals and selection rules within the set. Different candidate location signals correspond to different positioning modes. Based on the priority of at least one decision unit in descending order, the following selection process is performed on each decision unit as the current decision unit: Based on the intra-group selection rules associated with the current decision unit, a target position signal that meets the intra-group selection rules is selected from a group of candidate position signals associated with the current decision unit. If a target position signal is selected, the selection process ends; otherwise, the selection process continues for the next decision unit. The location query result is determined based on the target location signal.
[0005] Optionally, the selection of a target location signal that conforms to the intra-group selection rule associated with the current decision unit, based on the intra-group selection rule associated with the current decision unit, includes: Obtain a set of candidate location signals associated with the current decision-making unit; Valid candidate location signals are selected from a set of candidate location signals. Valid candidate location signals include those whose acquisition time is within the validity period and / or whose coverage radius is less than the accuracy limit. The validity period and the accuracy limit are associated with the positioning mode corresponding to the candidate location signal. Based on the intra-group selection rules associated with the current decision-making unit, the target location signal that conforms to the intra-group selection rules is selected from the valid candidate location signals.
[0006] Optionally, before determining at least one decision unit corresponding to the scene features of the location query request, the method further includes: Retrieve all candidate position signals from the cache; If there is a candidate location signal with positioning accuracy that meets the preset requirements among all the candidate location signals, then the candidate location signal with positioning accuracy that meets the preset requirements is taken as the target location signal; otherwise, continue to execute the step of determining at least one decision unit corresponding to the scene features of the location query request.
[0007] Optionally, the selection of target location signals that conform to the intra-group selection rules based on the current decision-making unit's associated group selection rules includes: If the selection rule within the group is time priority, the effective candidate location signal with the smallest time difference between the acquisition time and the location query request time is selected as the target location signal from the effective candidate location signals; or If the selection rule within the group is the precision priority rule, the effective candidate position signal with the smallest coverage radius is selected as the target position signal from the effective candidate position signals.
[0008] Optionally, the method further includes: If at least two valid candidate position signals have the same minimum time difference according to the time priority rule, or have the same minimum coverage radius according to the accuracy priority rule, then the target position signal is determined from the at least two valid candidate position signals according to the pre-set candidate position signal priority.
[0009] Optionally, based on the target location signal, the location query result is determined, including: if the target location signal corresponds to a different location than the candidate location signal of other preset positioning modes in its decision unit, the IP address is parsed from the location query request and the location information corresponding to the IP address is determined as a reference location, and the target location signal is calibrated using the reference location; The location query result is determined based on the calibrated target location signal.
[0010] Optionally, the target position signal is calibrated using a reference position, including: Use candidate location signals from other preset positioning modes as alternative candidate location signals; If the position information corresponding to the target position signal is consistent with the reference position, then the target position signal remains unchanged; If the location information corresponding to the target location signal is inconsistent with the reference location, but the location corresponding to the alternative candidate location signal is consistent with the reference location, then the target location signal is replaced by the alternative candidate location signal.
[0011] Optionally, candidate location signals from other preset positioning modes are used as alternative candidate location signals, including: If the time difference between the acquisition time of the candidate position signal of other preset positioning modes and the acquisition time of the target position signal is less than or equal to the time tolerance threshold, and the accuracy difference between the coverage radius of the candidate position signal of other preset positioning modes and the coverage radius of the target position signal is less than or equal to the accuracy tolerance threshold, then the candidate position signal of other preset positioning modes is determined as the alternative candidate position signal. Otherwise, keep the target position signal unchanged.
[0012] Optionally, before replacing the target position signal with an alternative candidate position signal, the method further includes: If the calibration replacement function is off, the calibration event record containing the target position signal, the alternative candidate position signal, and the reference position will be marked as to be calibrated, and the target position signal will remain unchanged; if the calibration replacement function is on, the target position signal will be replaced using the alternative candidate position signal. The calibration mark is used to indicate that the calibration event was not actually replaced. The replacement operation is to replace the target position signal with an alternative candidate position signal.
[0013] Optionally, the method further includes: If no target location signal is selected in at least one decision unit, the IP address is parsed from the location query request, and the location information corresponding to the IP address is used as the fallback location. If the catch-all position is a valid position, then the catch-all position will be used as the location query result.
[0014] Optionally, the method further includes: If the fallback location is invalid, obtain the user location profile corresponding to the user identifier carried in the location query request; Based on user location profiles, determine location query results.
[0015] Optionally, based on the user's location profile, the location query results are determined, including: If a user's location profile includes multiple valid location information entries, and these entries are associated with the user's behavioral address, then one of the valid location entries is selected as the location query result based on its priority.
[0016] Optionally, before determining at least one decision unit corresponding to the scene features of the location query request, the method further includes: Check whether the number of users associated with the device identifier carried in the location query request is equal to the preset number of users; If the number of users is equal to the preset number, the device identifier is used as the query key to read the candidate location signal; If the number of users is not equal to the preset number, the user identifier carried in the location query request will be used as the query key to read the candidate location signal.
[0017] Optionally, based on the target location signal, the location query result is determined, including: Obtain the location result type corresponding to the scene features; If the location result type is Type 1, the latitude and longitude information corresponding to the target location signal will be used as the location query result; if the location result type is Type 2, the administrative division information corresponding to the target location signal will be used as the location query result; if the location result type is Type 3, the latitude and longitude information and administrative division information corresponding to the target location signal will be used as the location query result.
[0018] According to the second aspect, a location information determining device is provided, comprising: The decision unit determination unit is configured to determine at least one decision unit corresponding to the scene features of the location query request in response to the location query request. Each decision unit is associated with a set of candidate location signals and selection rules within the set. Different candidate location signals correspond to different positioning modes. The selection processing execution unit is configured to sequentially perform the following selection process on each decision unit as the current decision unit, based on the priority of at least one decision unit from high to low: Based on the intra-group selection rules associated with the current decision unit, select the target position signal that meets the intra-group selection rules from a group of candidate position signals associated with the current decision unit; if the target position signal is selected, the selection process ends; otherwise, the selection process continues for the next decision unit. The query result determination unit is configured to determine the location query result based on the target location signal.
[0019] According to a third aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method of any one of the first aspects described above.
[0020] According to the fourth aspect, an electronic device is provided, comprising: One or more processors; and A memory associated with one or more processors, the memory being used to store program instructions, which, when read and executed by one or more processors, perform the steps of the method described in any of the first aspects above.
[0021] According to a fifth aspect, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the steps of any one of the methods in the first aspect described above.
[0022] According to the specific embodiments provided in this application, the following technical effects are disclosed: By responding to location query requests, at least one decision unit corresponding to scene characteristics is identified, and each decision unit is associated with a set of candidate location signals from different positioning modes and selection rules within the group. This allows for flexible configuration of the combination and selection strategies of multi-source location signals according to business scenarios, enabling the selection of target location signals from candidate signals in a manner consistent with the requirements of each scenario. Selection processing is performed sequentially from high to low priority of the decision units, ending processing when a target location signal is selected; otherwise, processing continues to the next decision unit. This ensures automatic switching to subsequent decision units when high-priority units fail to produce effective results, achieving smooth hierarchical degradation and preventing a sharp drop in location accuracy due to the absence of high-priority signals. Furthermore, the selection process stops once a target location signal is identified to reduce unnecessary subsequent processing and computational overhead. Finally, the location query result is determined based on the selected target location signal, resulting in a stable output of location results that better meet scene requirements from candidate location signals corresponding to multiple positioning modes. This improves the scene adaptability and reliability of the location results and enhances the efficiency of location query processing.
[0023] Of course, any product implementing this application does not necessarily need to achieve all of the above advantages at the same time. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is an exemplary system architecture for an embodiment of this application.
[0026] Figure 2 A flowchart illustrating the location information determination method provided in this application embodiment.
[0027] Figure 3 This is a schematic diagram of the hierarchical configuration structure of the location strategy in an embodiment of this application.
[0028] Figure 4 This is a flowchart illustrating the calibration process for a target position signal, provided as an embodiment of this application.
[0029] Figure 5(A) is a schematic flowchart of the process for determining the target location signal provided in an embodiment of this application.
[0030] Figure 5(B) is a flowchart illustrating the fallback mechanism provided in the embodiments of this application.
[0031] Figure 6 This is a schematic diagram of the overall architecture and processing chain of the location information determination method provided in the embodiments of this application.
[0032] Figure 7 This is a schematic diagram illustrating the strategy layer degradation of the location information determination method provided in the embodiments of this application.
[0033] Figure 8 A schematic block diagram of a location information determination device provided in an embodiment of this application.
[0034] Figure 9 A schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0035] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0036] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0037] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0038] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0039] In non-map applications (such as social networking, e-commerce, and content recommendation), there is no permission to continuously obtain high-precision real-time location signals. Instead, the application can only passively rely on various indirect location signals (such as wireless access point scanning signals, base station signals, network address attribution signals, and historical behavior prediction signals) to infer the user's current location.
[0040] In related technologies, the following methods are typically used to determine a user's current location from multiple positioning signals: The first method pre-configures a fixed signal priority order and reads the first available signal in sequence as the location result. However, this method cannot adapt to the differentiated needs of different business scenarios. For example, local life scenarios require high accuracy (accuracy priority), while content recommendation scenarios require high freshness (time priority). Fixed priority sorting cannot satisfy both at the same time.
[0041] The second approach involves setting a uniform validity window to filter candidate signals and then selecting the best one from the filtered signals. However, this uniform validity window cannot adapt to the differences in validity periods of different data sources. For example, the validity period of a GPS signal may be several hours, while the validity period of a delivery address may be several weeks. Moreover, the uniform validity window ignores the impact of the user's movement status. For example, for stationary users, a GPS signal from 2 hours ago may still be valid, while for users traveling on highways, a GPS signal from 30 minutes ago may have shifted by hundreds of kilometers. If such a signal is used, it will cause serious misleading information.
[0042] The third method involves taking a weighted average of the latitude and longitude of multiple location signals to obtain a combined result. However, when multiple signals come from different cities (e.g., GPS signal in city A and IP signal in city B), the weighted average will produce a meaningless intermediate value, which may mislead business decisions.
[0043] The fourth approach uses a single-level fallback solution, which directly downgrades to IP signals when the primary signal (e.g., GPS) is unavailable. However, this approach lacks a transition layer. When GPS is unavailable, signals such as wireless access point scanning signals, base station signals, network address attribution signals, and historical behavior prediction signals are ignored, causing the positioning accuracy to plummet from tens of meters to the city level, affecting the user experience.
[0044] The fifth approach involves business units implementing location fusion logic within their own services, but these units lack a unified view of location data, making it impossible to make optimal decisions across signal sources. Furthermore, the quality of the fusion logic varies among different business units, resulting in significant errors in the location results.
[0045] Therefore, how to output reliable location results that meet the requirements of business scenarios from multi-source heterogeneous signals has become an urgent technical problem to be solved.
[0046] In view of this, this application provides a new approach. To facilitate understanding of this application, the system architecture on which this application is based will first be described. Figure 1 This is an exemplary system architecture for embodiments of this application, such as... Figure 1 As shown, the system architecture may include: a client and a server for non-map applications.
[0047] The server and client are the two main components of an application service. The server side uses a server as its primary hardware infrastructure and may include one or more software service modules. In this embodiment, it is mainly responsible for providing non-map application services to the client, forming a collaborative front-end and back-end mechanism with the client.
[0048] The user terminal where the client resides can include, but is not limited to, smart mobile terminals, wearable devices, and PCs (Personal Computers). Smart mobile devices can include devices such as mobile phones, tablets, PDAs (Personal Digital Assistants), and connected car terminals. Wearable devices can include devices such as smartwatches, smart glasses, smart bracelets, VR (Virtual Reality) devices, AR (Augmented Reality) devices, and mixed reality devices (i.e., devices that support both virtual and augmented reality), etc.
[0049] The client can be an application located on the user's terminal, or it can be a plugin or software development kit (SDK) or other functional unit set in the application.
[0050] A server can be a standalone server, a server cluster, or a cloud server. A cloud server, also known as a cloud computing server or cloud host, is a hosting product within the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Servers (VPS) services, such as high management difficulty and weak service scalability.
[0051] In this implementation environment, the client reads various types of candidate location signals from the user terminal's cache to execute the location information determination process of this application. The client can present corresponding information display or information filtering logic based on the determined location information, or it can send the determined location information to the server in a business request, and the server can provide services to the client based on the location information.
[0052] It should be understood that Figure 1 The server and client shown are merely illustrative. Depending on the implementation requirements, there can be any number of servers and clients.
[0053] Figure 2 This is a flowchart of a location information determination method provided in an embodiment of this application. The method can be... Figure 1 The client in the system shown executes this. For example... Figure 2 As shown, the method may include the following steps: Step 201: In response to the location query request, determine at least one decision unit corresponding to the scene features of the location query request. Each decision unit is associated with a set of candidate location signals and selection rules within the set. Different candidate location signals correspond to different positioning modes.
[0054] Step 203: Based on the priority of at least one decision unit from high to low, perform the following selection process on each decision unit as the current decision unit: Based on the intra-group selection rules associated with the current decision unit, select the target position signal that meets the intra-group selection rules from a group of candidate position signals associated with the current decision unit. If the target position signal is selected, the selection process ends; otherwise, continue to perform the selection process for the next decision unit.
[0055] Step 205: Determine the location query result based on the target location signal.
[0056] As can be seen from the above process, this application, by responding to location query requests, determines at least one decision unit corresponding to scene characteristics, and associates each decision unit with a set of candidate location signals of different positioning modes and selection rules within the group. This allows for flexible configuration of the combination and selection strategies of multi-source location signals according to business scenarios, thereby selecting the target location signal from the candidate location signals in a manner that meets the requirements of each scenario. Selection processing is performed sequentially from high to low priority of the decision units, ending when a target location signal is selected; otherwise, processing continues to the next decision unit. This ensures that when a high-priority decision unit cannot produce a valid result, it automatically switches to a subsequent decision unit, achieving smooth hierarchical degradation and avoiding a sharp drop in location result accuracy due to the absence of high-priority signals. Furthermore, the selection process of the decision unit stops once the target location signal is determined to reduce unnecessary subsequent processing and computational overhead. Finally, the location query result is determined based on the selected target location signal, thus enabling a stable output of location results that better meet scene requirements from candidate location signals corresponding to multiple positioning modes, improving the scene adaptability and reliability of the location results, and increasing the efficiency of location query processing.
[0057] The following describes in detail each step of the above process and the effects that can be further produced, with reference to the embodiments. It should be noted that the terms "first," "second," etc., used in this disclosure do not have limitations in terms of size, order, or quantity, but are only used to distinguish them by name. For example, "first type," "second type," and "third type" are used to distinguish the types of results at the three positions.
[0058] First, the above step 201, namely "in response to a location query request, determine at least one decision unit corresponding to the scene features of the location query request", will be described in detail with reference to the embodiments.
[0059] In this application, a location query request can be a request initiated by the service layer to obtain the current location information of a device or user. For example, the location query request may carry a service request containing one of the following: user identifier, device identifier, Internet Protocol (IP) address, business item identifier, or scenario characteristics; a location service call initiated by the business party; or a combination thereof. The various identifiers carried in the location query request provide a basis for subsequent querying of candidate location signals from different signal sources, enabling the system to flexibly retrieve location data based on user or device dimensions.
[0060] Scene features can be information that characterizes the business scenario or requirement characteristics of a location query request. They represent the business scenario attributes associated with the location query request, and different business scenarios (such as local life services, content recommendation, real-time delivery, etc.) can correspond to different scene features. For example, these may include, but are not limited to: business project identifier, business party identifier, strategy configuration identifier, required location accuracy level, required time freshness requirement, or a combination thereof. By associating location query requests with scene features, the system can match appropriate decision-making strategies to the differentiated needs of different business scenarios (such as different emphases on timeliness or accuracy), avoiding the problem of fixed strategies being unable to adapt to the needs of multiple scenarios.
[0061] Furthermore, before determining at least one decision unit corresponding to the scene characteristics of the location query request, the device identifier collision detection and automatic query key degradation mechanism at the location query entry point are described. In one embodiment, the method further includes: detecting whether the number of users associated with the device identifier carried in the location query request is equal to a preset number of users; if it is equal to the preset number of users, then the device identifier is used as the query key for reading candidate location signals; if it is not equal to the preset number of users, then the user identifier carried in the location query request is used as the query key for reading candidate location signals.
[0062] In this application, during the query entry stage before batch acquisition of candidate location signal data, it is possible to detect whether the number of users associated with the device identifier in the location query request is equal to the preset number of users.
[0063] Device identifier collision detection can be used to detect whether a device is being used by more than one user. A preset number of users is a baseline threshold used to determine whether a device identifier collision has occurred. For example, the preset number of users could be 1.
[0064] When the number of users associated with the detected device identifier is equal to the preset number of users, the device identifier is considered to belong to a normal system. Using the device identifier as the query key to read candidate location signals, the full number of candidate location signals under the device dimension can be obtained, making full use of device-level location information.
[0065] When the number of users associated with a detected device identifier is not equal to the preset number of users, it is considered that there is a device identifier collision, which may be an abnormal situation such as a device identifier being shared by multiple users. In this case, the user identifier carried in the location query request is used as the query key to read the candidate location signal, and all candidate location signals under the device dimension are obtained.
[0066] As can be seen, by detecting the number of users associated with the device identifier at the location query entry and comparing it with the preset number of users, when an abnormal situation is detected that the device corresponding to the device identifier is being used by more than one user, it can automatically downgrade to using the user identifier as the query key to obtain the full number of candidate location signals, thereby ensuring the accuracy of the candidate location signal attribution and avoiding the confusion of location results caused by multiple users sharing the device identifier.
[0067] Furthermore, after determining the query key for obtaining all candidate location signals, and before determining at least one decision unit corresponding to the scene features of the location query request, the method of obtaining all candidate location signals using the query key as a query index can be described. In one embodiment, the method further includes: obtaining all candidate location signals from a cache; if there is a candidate location signal with positioning accuracy meeting a preset requirement among the all candidate location signals, then the candidate location signal with positioning accuracy meeting the preset requirement is used as the target location signal; otherwise, the step of determining at least one decision unit corresponding to the scene features of the location query request continues.
[0068] In this application, obtaining the full set of candidate location signals from the cache can mean reading the location signals of all location modes associated with the current device or user from the cache, rather than just obtaining a portion of the location signals associated with a single decision unit. By obtaining the full set of candidate location signals at once, a complete data view is provided for subsequent pre-detection judgments and decision unit traversal, avoiding the risks of latency and data inconsistency caused by multiple scattered reads.
[0069] The positioning accuracy meets the preset requirements. For example, the coverage radius of the candidate location signal may be less than or equal to a preset accuracy threshold, and / or the acquisition time of the candidate location signal may be within a preset time range.
[0070] For example, a candidate location signal with positioning accuracy that meets the preset requirements may be a high-reliability latitude and longitude signal directly transmitted from the upstream business party (such as the satellite positioning signal carried in the public parameters, i.e., public parameter GPS). Such signals usually have high positioning accuracy and strong timeliness.
[0071] If there is a high-confidence latitude and longitude signal with positioning accuracy that meets the preset requirements among all candidate location signals, then the signal can be directly used as the target location signal, and the location query result can be determined based on the target location signal, skipping the decision unit traversal process.
[0072] If there is no high-confidence latitude and longitude signal with positioning accuracy that meets the preset requirements among all candidate location signals, then continue to execute the step of determining at least one decision unit corresponding to the scene features of the location query request, and enter the decision unit traversal and group selection process.
[0073] As can be seen, by first acquiring all candidate location signals in the cache and prioritizing the determination of whether there is a signal whose positioning accuracy meets the preset requirements, if there is, it is directly used as the target location signal, skipping the subsequent decision unit traversal, thereby significantly shortening the query response time and reducing invalid calculations when high-precision signals are available; only when there is no signal that meets the preset requirements does it continue to enter the decision unit process, ensuring the seamless connection between the pre-inspection step and the decision unit traversal process, which not only ensures the fast response in high-precision scenarios, but also ensures the gradual degradation capability in signal missing scenarios.
[0074] In this application, different candidate location signals correspond to different positioning modes. Positioning modes may include, for example, satellite positioning modes (such as Global Positioning System (GPS) positioning), wireless access point positioning modes (such as positioning based on Wireless Fidelity (WiFi) Basic Service Set Identifier (BSSID) scanning), mobile base station positioning modes, network address attribution positioning modes (such as city-level attribution positioning based on IP addresses), historical behavior prediction positioning modes, delivery address positioning modes, and location profile positioning modes. By supporting candidate location signals for multiple positioning modes, the system can have candidate data available for selection under different signal availability conditions, avoiding the coverage problem caused by relying on only a single signal source.
[0075] Intra-group selection rules are rules used to select the optimal target location signal from a set of candidate location signals associated with the same decision-making unit. Different decision-making units can be associated with different intra-group selection rules to adapt to the differentiated needs of different business scenarios for location signal selection dimensions. For example, intra-group selection rules may include, but are not limited to: time-priority rules and accuracy-priority rules.
[0076] In this application, each decision unit is associated with a set of candidate location signals and selection rules within the set, with different candidate location signals corresponding to different positioning modes. By breaking down the location strategy into the basic component of the decision unit, the combination and selection rules of signal sources can be configured and adjusted in a modular manner. Business users can define the acquisition combination and decision rules of multiple signal sources through configuration without modifying the underlying code, thus achieving decoupling between strategy and implementation.
[0077] For example, a location strategy can be designed with a hierarchical structure, with the decision unit being one of the basic components. Each decision unit may include a priority, an intra-group strategy (i.e., intra-group selection rules), and a set of candidate location signals associated with the decision unit, each corresponding to a data fetch unit. Location Strategy ├── DataDecisionUnit (Priority 1, Intragroup Policy: TIME_PRIORITY) │ ├── DataFetchUnit (Location mode: GPS signal, maximum validity period: N seconds, maximum accuracy: M meters) │ └── DataFetchUnit (Location mode: WiFi signal, maximum validity period: N seconds, maximum accuracy: M meters) ├── DataDecisionUnit (Priority 2, Intragroup Policy: RANGE_PRIORITY) │ ├── DataFetchUnit (Location mode: Predictive signal, maximum validity period: N seconds, maximum accuracy: M meters) │ └── DataFetchUnit (Location mode: IP signal, maximum validity period: N seconds, maximum accuracy: M meters) ... ├── DataDecisionUnit (Priority K, Intra-group Strategy: 999) │ ├── DataFetchUnit (Location mode: 999, validity period: 9 seconds, accuracy: 9 meters) │ └── DataFetchUnit (Location mode: 999, validity period: 9 seconds, accuracy: 9 meters) ├── enable_ip_fallback (whether to enable real-time IP fallback): true └── enable_profiling_fallback (whether to enable location profiling fallback): true Each DataFetchUnit carries two basic filtering strategies: Validity period limit: This indicates that data exceeding this time limit is considered invalid.
[0078] Precision limit: Data with a coverage radius exceeding this value is considered to fail to meet the precision requirements.
[0079] As can be seen from the hierarchical structure design described above, the decision-making unit is a substructure under the positional strategy level. The positional strategy defines the complete processing order—"which decision-making unit to select the best option first, and which unit to downgrade to after failure"—by including multiple ordered decision-making units. The subsequent fallback configuration is parallel to the multiple decision-making units and is located below the positional strategy. It should be noted that the number of positioning modes corresponding to a set of candidate location signals in each of the above decision units is only illustrative and does not represent the final number of positioning modes in each decision unit of this application; the unit (seconds) corresponding to the upper limit of validity period and the unit (meters) corresponding to the upper limit of accuracy for each positioning mode are also illustrative and can be determined according to the specific positioning mode.
[0080] Figure 3 This is a schematic diagram of the hierarchical configuration structure of the location strategy in an embodiment of this application.
[0081] like Figure 3 As shown, the hierarchical configuration structure of the location policy illustrates how the system organizes location decision logic under different business scenarios through configuration. Its location policy module layer 301 represents a complete location policy, including multiple decision units, and can be further configured with global switches such as whether to enable real-time IP fallback and whether to enable location profile fallback. Therefore, this layer corresponds to the overall policy entry point under a certain business scenario.
[0082] Its decision unit module layer 302 represents a decision unit. Each decision unit includes multiple data acquisition units, that is, a set of candidate location signal sources that can be compared within the decision unit, as well as the priority between decision units and the selection rules within the group of decision units.
[0083] The selection rule 303 within the decision-making unit can include a time priority rule, which can represent selection based on the most recent time, and a precision priority rule, which can represent selection based on the smallest coverage radius. The data acquisition unit 304 of this decision-making unit corresponds to a positioning mode, for example, in a positioning... Bit mode The GPS positioning mode, WiFi positioning mode, base station positioning mode, IP positioning mode, historical trajectory prediction positioning mode, delivery address positioning mode, and location profile positioning mode are exemplified in 307. Each data acquisition unit carries two types of filtering configurations: one is used to define the basic validity constraints of the candidate location signals corresponding to the positioning mode, such as the data validity duration and accuracy upper limit exemplified in the basic validity constraints 305; the other is used to define additional strategies under specific modes, such as the switch used to control whether to accept confidence prediction results exemplified in the additional strategies 306.
[0084] Figure 3Example 308 of the "Typical Strategy Example" provides two specific configuration methods: The first is GPS_WiFi, which configures only one decision unit, namely Unit 1 (Priority 1, Time), whose selection rule within the group is time priority, and the signal within the group is GPS+WiFi. This means that in this business scenario, the result is selected first from the two high-quality signals, GPS and WiFi, according to "whichever is more recent in time". The second is GPS_WiFi_D_PREDICT_IP, which configures two decision units: First, Unit 1 (Priority 1, Time): GPS+WiFi is executed, that is, GPS and WiFi are selected first according to time priority; if this decision unit fails to produce a valid location signal result, it is downgraded to Unit 2 (Priority 2, Predict): Predict+IP, that is, the predicted signal and IP signal are selected according to the smallest coverage radius.
[0085] The following describes in detail step 203, namely, "Based on the priority of at least one decision unit from high to low, the following selection process is performed on each decision unit as the current decision unit: Based on the selection rules within the group associated with the current decision unit, a target position signal that conforms to the selection rules within the group is selected from a group of candidate position signals associated with the current decision unit. If a target position signal is selected, the selection process ends; otherwise, the selection process continues for the next decision unit."
[0086] In this application, the priority of the decision-making units can be used to determine the order in which each decision-making unit is selected for processing, with higher-priority decision-making units being executed first. By setting priorities for the decision-making units and executing them sequentially from highest to lowest priority, the system can prioritize decision-making units containing high-precision or high-time-sensitivity signal sources, and only downgrade to lower-priority decision-making units when high-priority decision-making units fail to produce valid results. This achieves gradual degradation and avoids a sharp drop in accuracy caused by directly jumping to the coarsest-grained signal when high-precision signals are missing.
[0087] The logic for performing selection processing on at least one decision unit is as follows: For the current decision unit, a target position signal that conforms to the intra-group selection rule is selected from a set of candidate position signals associated with it; if a target position signal is selected, the selection process ends, and selection processing is no longer performed on subsequent lower-priority decision units; if no target position signal is selected, the selection process continues for the next (i.e., the second-highest priority) decision unit. For example, Figure 3 The second example of a typical policy, GPS_WiFi_D_PREDICT_IP, which is configured with two decision units, exemplifies the execution logic of the selection process described above.
[0088] The basic structure of the decision-making unit and the overall logic of the selection process have been explained above. The execution process of the intra-group selection rules will be further described below. In some embodiments, based on the intra-group selection rules associated with the current decision-making unit, a target location signal conforming to the intra-group selection rules is selected from a set of candidate location signals associated with the current decision-making unit. This includes: acquiring a set of candidate location signals associated with the current decision-making unit; filtering valid candidate location signals from the set of candidate location signals, where valid candidate location signals include candidate location signals whose acquisition time is within the validity period and / or whose coverage radius is less than the accuracy upper limit, and the validity period and accuracy upper limit are associated with the positioning mode corresponding to the candidate location signal; and selecting a target location signal conforming to the intra-group selection rules from the valid candidate location signals based on the intra-group selection rules associated with the current decision-making unit.
[0089] In this application, candidate location signals corresponding to the positioning mode associated with the current decision-making unit can be extracted from the aforementioned full set of candidate location signals. For example, if the positioning modes associated with the current decision-making unit are GPS positioning mode and WiFi positioning mode, then the GPS candidate location signal corresponding to the GPS positioning mode and the WiFi candidate location signal corresponding to the WiFi positioning mode can be extracted from the full set of candidate location signals.
[0090] A valid candidate location signal is a candidate location signal that simultaneously meets at least one of the following conditions: the acquisition time is within the validity period and / or the coverage radius is less than the accuracy upper limit. Candidate location signals of different positioning modes can have different validity period upper limits. For example, the validity period of satellite positioning signals can be short (e.g., on the order of several hours), while the validity period of delivery address signals can be long (e.g., on the order of several weeks). Candidate location signals of different positioning modes can also have different accuracy upper limits. For example, the accuracy upper limit for satellite positioning signals can be set to a smaller coverage radius value, while the accuracy upper limit for network address attribution signals can be set to a larger coverage radius value.
[0091] For example, if the current decision-making unit associates GPS signals, WiFi signals, and base station signals, and each positioning mode has a validity period cap and an accuracy cap, then for a GPS candidate location signal: the time difference between the acquisition time and the location query request time is 1 minute, and the coverage radius is 30 meters; the validity period cap for GPS mode is 5 minutes, and the accuracy cap is 50 meters; the acquisition time of this signal is within the validity period, and the coverage radius is less than the accuracy cap, making it a valid candidate location signal. For a WiFi candidate location signal: the time difference between the acquisition time and the location query request time is 3 hours, and the coverage radius is 80 meters; the validity period cap for WiFi mode is 6 hours, and the accuracy cap is 200 meters; the acquisition time of this signal is within the validity period, and the coverage radius is less than the accuracy cap, making it a valid candidate location signal. For a base station candidate location signal: the time difference between the acquisition time and the location query request time is 2 minutes, but the coverage radius is 3 kilometers; the accuracy cap for base station mode is 1 kilometer; the coverage radius of this signal exceeds the accuracy cap, therefore it is not a valid candidate location signal and will be filtered out.
[0092] It can be seen that by first acquiring a set of candidate location signals associated with the current decision-making unit, and then filtering for validity based on the validity period and accuracy limit associated with the positioning mode, signals with expired acquisition time or excessively large coverage radius can be eliminated in advance, preventing them from participating in the selection within the group, thereby improving the reliability of the target location signal. At the same time, the validity period and accuracy limit are configured differently according to the positioning mode, which can avoid erroneous elimination or retention caused by uniform thresholds, making the filtering more in line with the actual usability conditions of each signal source, and further improving the reliability of the location query results.
[0093] The aforementioned intra-group selection rules can be implemented in various ways. Two typical intra-group selection rules are described below. In some embodiments, the intra-group selection rule can be a time-priority rule or a precision-priority rule, enabling the system to flexibly select the optimal location signal between timeliness and precision based on the differentiated needs of business scenarios, avoiding the problem that a fixed sorting scheme cannot simultaneously meet the needs of different scenarios.
[0094] In one embodiment, based on the intra-group selection rule associated with the current decision unit, a target location signal that conforms to the intra-group selection rule is selected from the valid candidate location signals, including: if the intra-group selection rule is a time priority rule, the valid candidate location signal with the smallest time difference between the acquisition time and the request time of the location query request is selected from the valid candidate location signals as the target location signal; or if the intra-group selection rule is a precision priority rule, the valid candidate location signal with the smallest coverage radius is selected from the valid candidate location signals as the target location signal.
[0095] In this application, the time difference reflects the deviation risk between the user's location at the time of signal acquisition and the user's location at the time of the service request. The larger the time difference, the higher the probability of the user's displacement and the lower the reliability of the signal. The time priority rule ensures that the selected signal best reflects the user's true location at the time of the service request by selecting the signal with the smallest time difference. It is suitable for scenarios with high requirements for real-time location (such as real-time delivery, live streaming, etc.).
[0096] Coverage radius is a direct measure of signal positioning accuracy; a smaller coverage radius indicates lower spatial uncertainty in the location query results. The accuracy-first rule selects the signal with the smallest coverage radius to ensure that the selected signal has the highest spatial positioning accuracy, making it suitable for scenarios with high location accuracy requirements (such as store matching and geofencing determination in local life services).
[0097] For example, taking a set of candidate location signals associated within the same decision-making unit as an example, suppose that the decision-making unit obtains three valid candidate location signals through validity screening: GPS signal, with a time difference of 30 seconds and a coverage radius of 40 meters; WiFi signal, with a time difference of 90 seconds and a coverage radius of 15 meters; and base station signal, with a time difference of 180 seconds and a coverage radius of 800 meters.
[0098] If the selection rule within the decision-making unit is a time-priority rule, then from the above valid candidate location signals, the signal with the smallest time difference between the acquisition time and the location query request time is selected as the target location signal. That is, the signal with the smallest time difference is the GPS signal. Therefore, the GPS signal is determined as the target location signal of the decision-making unit, and the selection process ends.
[0099] If the selection rule within the decision-making unit is the precision priority rule, the signal with the smallest coverage radius is selected from the above valid candidate location signals as the target location signal. That is, the signal with the smallest coverage radius is the WiFi signal. Therefore, the WiFi signal is determined as the target location signal of the decision-making unit, and the selection process ends.
[0100] It can be seen that by configuring time-priority rules or precision-priority rules for decision-making units, the optimal selection method based on timeliness or precision can be flexibly chosen within the same decision-making unit according to the business scenario. Selecting the time-priority rule can more realistically reflect the user's location at the time of request, which is suitable for scenarios with high real-time requirements; selecting the precision-priority rule can obtain the location result with the highest spatial accuracy, which is suitable for scenarios with high precision requirements, thus adapting to different business needs according to the differences in business scenarios.
[0101] In response to the situation where multiple valid candidate location signals may be equally optimal under the time priority rule or the precision priority rule, in one embodiment, if at least two valid candidate location signals have the same minimum time difference according to the time priority rule, or have the same minimum coverage radius according to the precision priority rule, then the target location signal is determined from the at least two valid candidate location signals according to the pre-set candidate location signal priority.
[0102] In this application, having the same minimum time difference according to the time priority rule means that when executing the time priority rule, there are two or more valid candidate location signals whose acquisition time and the time difference between the acquisition time and the location query request time are equal and both are minimum values. Having the same minimum coverage radius according to the precision priority rule means that when executing the precision priority rule, there are two or more valid candidate location signals whose coverage radii are equal and both are minimum values.
[0103] The pre-set priority of candidate location signals can be, for example, a signal source priority pre-set based on the positioning mode corresponding to the candidate location signal. For example, this priority order could be: satellite positioning signals > wireless access point positioning signals > base station positioning signals > historical behavior prediction signals > network address attribution signals, etc.
[0104] For example, taking a set of candidate location signals associated within the same decision-making unit as an example, suppose that the decision-making unit obtains three valid candidate location signals through validity screening: GPS signal, with a time difference of 30 seconds and a coverage radius of 40 meters; WiFi signal, with a time difference of 90 seconds and a coverage radius of 40 meters; and base station signal, with a time difference of 30 seconds and a coverage radius of 800 meters.
[0105] If the selection rule within the decision-making unit is the time priority rule, and two valid candidate location signals are tied for best under the time priority rule, namely the GPS signal and the base station signal, then based on the pre-set priority of the candidate location signals, it can be known that the priority of the GPS signal is higher than that of the base station signal, so the GPS signal is taken as the target location signal.
[0106] If the selection rule within the decision-making unit is the precision priority rule, and two valid candidate location signals appear to be equally optimal under the precision priority rule, namely the GPS signal and the WiFi signal, then based on the pre-set priority of the candidate location signals, it can be known that the priority of the GPS signal is higher than that of the WiFi signal, so the GPS signal is selected as the target location signal.
[0107] It can be seen that by selecting based on the preset priority of candidate location signals when multiple valid candidate location signals have the same minimum time difference according to the time priority rule or the same minimum coverage radius according to the precision priority rule, the uncertainty and randomness of selection caused by tandem optimality can be avoided. This ensures that the target location signal is always selected uniquely and definitively within the same decision-making unit, and prioritizes the use of signal sources with higher reliability, thereby improving the consistency and credibility of location query results.
[0108] The following describes step 205, namely "determine the location query result based on the target location signal," in detail with reference to the embodiments.
[0109] After determining the target location signal, one possible approach is to directly use the location corresponding to the target location signal as the location query result.
[0110] As another feasible approach, after determining the target location signal as described above, the target location signal can be calibrated, and the location query result can be determined based on the calibrated target location signal. The calibration mechanism is described below. In one example, determining the location query result based on the target location signal includes: if the target location signal corresponds to a different location than the candidate location signals of other preset positioning modes in its decision-making unit, then the IP address is parsed from the location query request and the location information corresponding to the IP address is determined as a reference location; the target location signal is calibrated using the reference location; and the location query result is determined based on the calibrated target location signal.
[0111] In this application, candidate location signals for other preset positioning modes can be location signals belonging to the same decision unit as the target location signal but with different positioning modes. For example, within the same decision unit, when the target location signal is a GPS signal, other preset positioning modes can be Wi-Fi signals, base station signals, etc.
[0112] Resolving an IP address from a location query request can involve extracting the requester's IP address information from the network context of the location query request. The IP address may include, for example, an Internet Protocol Version 4 (IPv4) address and / or an Internet Protocol Version 6 (IPv6) address.
[0113] Determining the location information corresponding to an IP address as a reference location can be achieved by performing city-level attribution processing on the IP address to obtain the city-level location information corresponding to that IP address, and then using this location information as the reference location. IP addresses are naturally carried with each network request, possessing the characteristics of real-time performance and high coverage. Using the city-level location information obtained from its attribution as a reference location can provide a positioning benchmark for calibration processing that is independent of other positioning modes.
[0114] For example, the target location signal is a GPS signal pointing to City A; the WiFi candidate location signals within the same decision-making unit and the reference location attributed from the requested IP address both point to City B. Since the target location signal and the reference location are inconsistent, the target location signal needs to be calibrated, and the location query result is determined based on the calibrated signal.
[0115] It can be seen that when the target location signal and the candidate location signals of other preset positioning modes within the same decision-making unit point to different locations, the real-time IP address in the location query request is parsed and its corresponding location information is determined as a reference location. The target location signal is then calibrated using this reference location, and the location query result is determined based on the calibrated target location signal. This allows the use of real-time network information independent of each positioning mode as a calibration benchmark to verify and correct target location signals that may have location offsets. This improves the accuracy of location judgment and the reliability of location query results without relying on additional positioning signals.
[0116] The logic of the calibration process is further explained below. In one embodiment, the calibration process of the target position signal using a reference position includes: using candidate position signals of other preset positioning modes as alternative candidate position signals; if the position information corresponding to the target position signal is consistent with the reference position, then keeping the target position signal unchanged; if the position information corresponding to the target position signal is inconsistent with the reference position and the position corresponding to the alternative candidate position signal is consistent with the reference position, then replacing the target position signal with the alternative candidate position signal.
[0117] In this application, using candidate location signals from other preset positioning modes as alternative candidate location signals can be achieved by selecting candidate location signals from the decision unit to which the target location signal belongs, using a different positioning mode than the target location signal, as alternative candidate location signals that may be used to replace the target location signal. For example, if the target location signal is a GPS signal, the alternative candidate location signal could be a WiFi signal.
[0118] If the location information corresponding to the target location signal is consistent with the reference location, this could mean that the city corresponding to the target location signal and the city corresponding to the reference location are the same. When the target location signal and the IP reference location point to the same city, it indicates that the target location signal is reliable in the city dimension, and no replacement is needed; the original selection result remains unchanged. If the location information corresponding to the target location signal is inconsistent with the reference location, but the location corresponding to the alternative candidate location signal is consistent with the reference location, it could be that the target location signal and the IP reference location point to different cities, while the alternative candidate location signal and the IP reference location point to the same city. This indicates that the target location signal may have experienced a city offset due to environmental interference or other reasons, while the alternative candidate location signal is more likely to reflect the user's true location. In this case, the alternative candidate location signal will be replaced with the target location signal to automatically correct the city offset.
[0119] For example, when a user returns to their home city from another location, the GPS signal may be pointing to the wrong city due to environmental interference, while the WiFi signal and the current IP address both point to the correct city. In this case, the calibration mechanism will automatically switch the target location signal from the GPS signal to the WiFi signal to ensure location accuracy.
[0120] It can be seen that by using candidate position signals of other preset positioning modes within the same decision-making unit as alternative candidate position signals, and keeping them unchanged when the target position signal is consistent with the reference position, and replacing the target position signal with alternative candidate position signals when the target position signal deviates from the reference position and the alternative candidate position signal is consistent with the reference position, it is possible to correct urban offset while avoiding unnecessary replacement of the correct target position signal, thereby improving the accuracy and reliability of calibration processing.
[0121] In one embodiment, determining the candidate position signal of other preset positioning modes as a substitute candidate position signal requires certain preconditions, including: if the time difference between the acquisition time of the candidate position signal of other preset positioning modes and the acquisition time of the target position signal is less than or equal to a time tolerance threshold, and the accuracy difference between the coverage radius of the candidate position signal of other preset positioning modes and the coverage radius of the target position signal is less than or equal to an accuracy tolerance threshold, then the candidate position signal of other preset positioning modes is determined as a substitute candidate position signal; otherwise, the target position signal is kept unchanged.
[0122] In this application, the time tolerance threshold can be the maximum tolerable time difference between the acquisition of the alternative candidate position signal and the target position signal during the calibration process. This threshold is used to ensure that the two are sufficiently close in the time dimension, avoiding the use of candidate position signals with excessively different acquisition times as substitutes, thereby preventing distortion of the position information after replacement due to user movement. For example, if the acquisition time of the alternative candidate position signal is much earlier or much later than that of the target candidate position signal, the two may reflect the user's position at different times, and replacing them in this case would introduce new deviations.
[0123] The accuracy tolerance threshold can be the maximum tolerable deviation in coverage radius between the alternative candidate location signal and the target location signal during the calibration process. This threshold ensures comparability between the two in terms of accuracy, preventing the substitution of candidate location signals with coverage radii much larger than the target location signal, thus avoiding a significant decrease in location accuracy after replacement. For example, if the coverage radius of the alternative candidate location signal is much larger than that of the target candidate location signal, even if its city affiliation matches the city attribution of the requested IP, its spatial positioning accuracy will not meet business requirements.
[0124] Assume a specific business scenario where the time tolerance threshold is configured to 60 seconds and the accuracy tolerance threshold is configured to 50 meters. The target location signal is a GPS signal, acquired at 12:00:00, with a coverage radius of 40 meters. Within the same decision-making unit, there is a WiFi candidate location signal, acquired at 12:00:20, with a coverage radius of 30 meters. The calculations show that the time difference between the two acquisition times is |12:00:20 - 12:00:00| = 20 seconds, which is less than 60 seconds; the accuracy difference in their coverage radii is |30 meters - 40 meters| = 10 meters, which is less than 50 meters. Since neither the time difference nor the accuracy difference exceeds the corresponding tolerance threshold, this WiFi candidate location signal is selected as a replacement candidate location signal for subsequent calibration processing.
[0125] Conversely, if the WiFi candidate location signal is collected at 12:01:30, and the time difference with the target location signal is 90 seconds, which exceeds the 60-second time tolerance threshold, then even if its coverage radius meets the accuracy tolerance requirements, it will not be identified as a replacement candidate location signal, and calibration will be abandoned in order to keep the target location signal unchanged.
[0126] It can be seen that by setting time tolerance thresholds and accuracy tolerance thresholds, a replacement candidate position signal is only determined as a replacement candidate position signal when the time difference and accuracy difference between the replacement candidate position signal and the target position signal both meet the tolerance conditions. Otherwise, the target position signal is kept unchanged, thereby avoiding unreasonable replacement due to excessive differences in time and accuracy between the replacement signal and the target signal, and improving the reliability of calibration processing and the quality of position results.
[0127] In one embodiment, before replacing the target position signal with a candidate position signal, the on / off state of the calibration replacement function can be determined to determine whether to perform a replacement operation. Specifically, before replacing the target position signal with a candidate position signal, the method further includes: if the calibration replacement function is in the off state, recording a calibration event including the target position signal, the candidate position signal, and the reference position as a calibration mark, and keeping the target position signal unchanged; if the calibration replacement function is in the on state, performing the replacement of the target position signal with a candidate position signal; wherein the calibration mark is used to indicate that the calibration event has not actually been replaced, and the replacement operation is replacing the target position signal with a candidate position signal.
[0128] In this application, the calibration replacement function can be a configuration switch that controls whether the replacement action of "replacing the target position signal with an alternative candidate position signal" is actually performed during the calibration process. When the calibration replacement function is turned off, the system does not actually replace the signal, but only records the calibration event; when the calibration replacement function is turned on, the system performs the actual replacement.
[0129] A calibration event can be a complete record containing information such as the target position signal, alternative candidate position signal, and reference position when calibration replacement conditions are met. This record is used for subsequent offline analysis and effect evaluation. The calibration event can be written to the offline log and may carry a "to be calibrated" flag to indicate that the replacement operation has not yet been actually performed.
[0130] The calibration mark provides a clear status identifier for calibration events, enabling the system to distinguish between calibration events that have undergone replacement and those that only record calibration events that have not undergone replacement. This facilitates the evaluation of the effects of the two types of events in offline analysis and provides a data foundation for the continuous optimization of calibration strategies.
[0131] For example, in a location query, the target location signal is a GPS signal pointing to City A; the WiFi candidate location signal and the reference location (the city location attributed from the requested IP address) within the same decision-making unit both point to City B, satisfying the determination condition for replacing the candidate location signal. In this case: if the calibration replacement function is off, no replacement is performed; instead, the GPS target location signal, WiFi candidate location signal, and reference location are recorded as a calibration event in the offline log and marked as pending calibration, while the GPS target location signal remains unchanged. If the calibration replacement function is on, replacement is performed, replacing the target location signal from the GPS signal to the WiFi candidate location signal.
[0132] It can be seen that the timing of the replacement operation is controlled by the on / off state of the calibration replacement function. When the calibration replacement function is off, only the calibration event is recorded and marked as to be calibrated, while the target location signal remains unchanged. This allows for gray-scale observation and offline effect evaluation of the calibration strategy without affecting the online location query results, avoiding the risk to the quality of location query results caused by the automatic replacement of the calibration strategy without verification. When the calibration replacement function is on, the target location signal is actually replaced by the alternative candidate location signal to effectively correct the city offset, thereby improving the calibration accuracy of the target location signal.
[0133] After calibrating the target location signal, the location query result can be determined based on the calibrated target location signal.
[0134] Figure 4 This is a flowchart illustrating the calibration process for the target position signal provided in an embodiment of this application.
[0135] like Figure 4 As shown, the target location signal and candidate location signals from other preset positioning modes in the decision-making unit are used as input. It is determined whether there are candidate location signals from other preset positioning modes that correspond to a different location than the target location signal. If not, it means there are no alternative candidate location signals that can be used for cross-validation, and the target location signal is retained. If yes, the IP address is parsed from the location query request. It is determined whether the IP address was successfully parsed. If not, there is no IP reference information, and the target location signal is retained. If yes, the location information corresponding to the IP address is determined as the reference location.
[0136] From the candidate position signals of other preset positioning modes, a candidate position signal is selected. It is then determined whether the time difference between the acquisition time of the target position signal and the acquisition time of the selected candidate position signal is less than or equal to a time tolerance threshold, and whether the accuracy difference between the coverage radius of the target position signal and the coverage radius of the selected candidate position signal is less than or equal to an accuracy tolerance threshold. If not, the selected candidate position signal is deemed unsuitable for calibration, and the target position signal is retained. If yes, the selected candidate position signal is designated as a replacement candidate position signal.
[0137] Determine if the location information corresponding to the target location signal is consistent with the reference location. If yes, the preferred location is reliable at the city level and requires no calibration; retain the preferred location. If no, determine if the location information corresponding to the alternative candidate location signal is consistent with the reference location. If yes, the location corresponding to the target location signal may have shifted to a different city, and the alternative candidate is more reliable. If no, the location information corresponding to the IP address cannot support the location corresponding to the alternative candidate location signal, and the correct city cannot be determined; retain the target location signal.
[0138] If it is confirmed that the location corresponding to the target location signal may be shifted to a different city, and a more reliable alternative candidate is found, the calibration event is recorded in the offline log, and it is determined whether the calibration replacement function is enabled. If so, the target location signal is replaced with the alternative candidate location signal to complete the calibration. If not, the calibration event containing the target location signal, the alternative candidate location signal, and the reference location is marked as pending calibration, but no actual replacement is performed; this is used for a gray-scale observation period. The gray-scale observation period can be a transitional phase where the strategy is first run on a small scale or implicitly to verify its effectiveness with data before deciding whether to fully enable it.
[0139] The complete process of the calibration mechanism has been described above. The following describes the fallback mechanism when all decision units fail to select a target location signal. In one embodiment, the method further includes: if no target location signal is selected in at least one decision unit, resolving the IP address from the location query request and using the location information corresponding to the IP address as the fallback location; if the fallback location is a valid location, then using the fallback location as the location query result.
[0140] In this application, after the selection process is performed in descending order of priority of the aforementioned decision-making units, none of the decision-making units can select a target location signal that meets the group selection rules from their respective associated candidate location signals. The IP address is parsed from the location query request, and the location information corresponding to the IP address is used as a fallback location.
[0141] Resolving IP addresses from location query requests can involve extracting the requester's IP address from the network information of the location query request; for example, it could be an IPv4 address and / or an IPv6 address. Using the location information corresponding to the IP address as a fallback location refers to performing real-time city-level attribution processing on the IP address to generate city-level location information, and then using this location information as a fallback location. IP addresses are naturally carried with every network request, offering near 100% coverage. Although their positioning accuracy is only at the city level (typical coverage radius of approximately 5 to 50 kilometers), they can provide a basic location reference when all high-precision signals are unavailable, preventing location queries from returning empty results.
[0142] A valid location can be a fallback location obtained from IP address attribution that contains valid city-level coordinates and can be output as a location query result. For example, if IP attribution is successful and returns usable city-level location coordinates, the location mode of the IP fallback location is marked as IP mode, and the timestamp of the IP fallback location is set to the current time of the location query request. Conversely, if IP attribution fails, cannot be attributed to a specific city, or the returned result does not contain valid city coordinates, then the fallback location is an invalid location.
[0143] For example, in a location query request, the system performs selection processing sequentially according to the priority of the decision-making units from high to low. However, because candidate location signals such as GPS, Wi-Fi, and base stations are missing, expired, or their coverage radius exceeds the accuracy limit, all decision-making units fail to select a target location signal. In this case, the system extracts the IP address from the network information of the location query request and calls the IP city attribution service. If the attribution service successfully returns the city-level location corresponding to the IP as "City A," along with valid city-level coordinates (e.g., the latitude and longitude of the city center). The system determines that this fallback location is valid and returns the city-level location corresponding to "City A" as the location query result. If IP attribution fails, for example, if the IP address is not in the attribution database and an error is returned, or if the returned result does not contain valid city-level coordinates, then the fallback location is determined to be invalid and is not used as the location query result. In this case, the system can continue with subsequent fallback processes, such as obtaining the user location profile corresponding to the user identifier carried in the location query request to determine the result.
[0144] As can be seen, by parsing the IP address from the location query request and using the location information corresponding to the IP address as a fallback location when no target location signal is selected by all decision units, and only using the fallback location as the location query result when it is a valid location, city-level location guarantee is provided in scenarios where all high-precision signals are unavailable, avoiding the direct return of empty results, improving the success rate and robustness of location queries, and at the same time, taking advantage of the characteristics of IP addresses being naturally carried with requests and having a wide coverage, the basic availability of location services is guaranteed at a low implementation cost.
[0145] In one embodiment, if the catch-all location is invalid, that is, the catch-all location obtained based on IP address attribution does not contain valid location coordinates, or the IP attribution process fails to return a result, then a user location profile corresponding to the user identifier carried in the location query request is obtained; and the location query result is determined based on the user location profile.
[0146] In this application, historical location profile data associated with a user can be queried based on the user identifier carried in the location query request. The user location profile can be a location tag obtained based on the analysis of the user's historical behavior, such as the user's residence, workplace, frequently visited locations, etc. It reflects the most frequently occurring or stably associated locations in the user's long-term activities, rather than real-time locations, and its timestamp is usually a historical moment.
[0147] In this application, the user location profile is used as a last-line backup guarantee when all decision-making units have failed to select the target location signal and the real-time IP backup location is invalid, to avoid the location query from completely failing.
[0148] As can be seen, by obtaining the user location profile corresponding to the user identifier carried in the location query request, and determining the location query result based on the user location profile, location results based on historical behavior are provided when all real-time signals and IP attribution are unavailable, thus avoiding the return of empty location query results and improving query coverage and robustness.
[0149] Furthermore, in one embodiment, determining the location query result based on the user location profile includes: if the user location profile includes multiple valid location information and the multiple valid location information is associated with the user's behavioral address, then one of the location information is selected as the location query result based on the priority of the multiple valid location information.
[0150] In this application, the user location profile contains multiple valid location information coordinates, meaning each location information has valid latitude and longitude coordinates. For example, the user's residence, workplace, and frequently visited locations each contain valid latitude and longitude coordinates, rather than null or invalid coordinates. Valid location information is used to provide a practically output location result as a fallback.
[0151] Each valid location information for each coordinate corresponds to a user behavior address type, reflecting the locations where the user resides, works, or frequently visits during long-term activities, making the fallback location more consistent with the user's actual behavioral patterns. User behavior address types can include the user's permanent address, work address, frequently visited address, etc.
[0152] When a user's location profile contains multiple valid location information, one can be selected according to a preset priority order. For example, the priority could be tried in the order of residence, workplace, and frequently visited locations. That is, the residence (the first valid coordinate) is selected first; if the residence is invalid, the workplace is considered; if the workplace is also invalid, frequently visited locations are considered. The positioning mode of the last determined location profile is marked as the location profile mode, and the timestamp of the last location profile is set to a historical time. This allows priority to be given to the user's most frequently occurring location, increasing the probability of hitting the target location.
[0153] As can be seen, by selecting one of the multiple valid location information associated with the behavioral address in the user location profile according to the preset priority as the location query result, a fallback result can be output deterministically when multiple valid coordinate profile locations coexist, avoiding random selection, improving the rationality and hit probability of the fallback location, and prioritizing the location where the user appears most often, so that the location query result is more in line with the user's behavior pattern.
[0154] The following describes the result type routing mechanism for determining location query results based on target location signals. In this embodiment, determining the location query result based on the target location signal includes: obtaining the location result type corresponding to the scene features; if the location result type is a first type, then the latitude and longitude information corresponding to the target location signal is used as the location query result; if the location result type is a second type, then the administrative division information corresponding to the target location signal is used as the location query result; if the location result type is a third type, then the latitude and longitude information and administrative division information corresponding to the target location signal are used as the location query result.
[0155] In this application, the location result type can be a location query result output format corresponding to scene characteristics. Different business scenarios can be configured with different result types to determine whether to return latitude and longitude, administrative division, or a combination of both to the caller.
[0156] Latitude and longitude information can be the latitude and longitude coordinates corresponding to the target location signal, reflecting the precise spatial location of the location point; administrative division information can be the administrative division information such as province, city, and district corresponding to the target location signal, reflecting the administrative region to which the location point belongs.
[0157] Administrative division information can be obtained, for example, through reverse geocoding, which involves resolving the corresponding administrative division based on the latitude and longitude coordinates of the target location signal. For instance, this reverse geocoding process can be completed using a localized spatial index, eliminating the need for additional remote procedure calls (RPCs) and thus reducing query latency.
[0158] If the location result type is Type 1, for example, in high-throughput batch query scenarios, only latitude and longitude coordinates are needed. The system returns the latitude and longitude information corresponding to the target location signal without administrative division parsing, thus reducing data volume and response time. If the location result type is Type 2, for example, in regional content recommendation scenarios, only city-level location information is needed. The system returns the administrative division information (such as the city) corresponding to the target location signal without exposing precise latitude and longitude. If the location result type is Type 3, for example, in store matching and area judgment scenarios in local life services, complete location information is required. The system simultaneously returns the latitude and longitude information and administrative division information corresponding to the target location signal for business users to perform precise matching and area filtering.
[0159] It can be seen that by obtaining the corresponding location result type based on the scene characteristics, and returning latitude and longitude information, administrative division information, or a combination of both according to the type, the output format of the location query results can be matched with the needs of the business scenario, thereby improving the adaptability of the results.
[0160] Figure 5(A) is a flowchart illustrating the determination of the target location signal provided in an embodiment of this application; Figure 5(B) is a flowchart illustrating the fallback mechanism provided in an embodiment of this application.
[0161] As shown in Figure 5(A), a location query request is received, which may carry information such as user ID, device ID, and service scenario ID. The system checks whether the number of users associated with the device identifier carried in the location query request equals the preset number of users. If not, the device ID is cleared, and the user ID is used as the query key to read candidate location signals; if so, the device identifier is used as the query key to read candidate location signals. All candidate location signals are retrieved from the cache in parallel. It is determined whether there is a candidate location signal with positioning accuracy meeting preset requirements (e.g., public-parameter GPS) among the full set of candidate location signals. If so, the candidate location signal with positioning accuracy meeting the preset requirements is used as the target location signal, and the location query result is determined based on the target location signal; if not, at least one decision unit corresponding to the scenario characteristics of the location query request is determined. Based on the priority of the at least one decision unit from high to low, each decision unit is sequentially used as the current decision unit for selection processing. Determine if there are any unprocessed decision units. If not, and at least one decision unit has not selected a target location signal, proceed to the fallback procedure. If yes, continue processing the current decision unit and determine if it has a result. If yes, proceed to the fallback procedure. If not, iterate through the candidate location signals of the current decision unit. Determine if there are any untested candidate location signals within the current decision unit. If not, check if the valid candidate location signals are non-empty. If not, continue iterating through the next associated candidate location signals within the current decision unit. If not empty, determine the target location signal from the valid candidate location signals based on the group selection rules.
[0162] If there are still untested candidate location signals within the current decision-making unit, it is determined whether there is cached data for the candidate location signals of the current decision-making unit. If not, the process skips and continues to test the next candidate location signal within the decision-making unit. If yes, it is determined whether the acquisition time of the candidate location signal is within the validity period. If not, the candidate location signal is marked as not meeting the validity period requirement, skipped, and the process continues to test the next candidate location signal within the decision-making unit. If yes, the process proceeds to accuracy verification, determining whether the coverage radius of the candidate location signal of the current decision-making unit is less than the accuracy upper limit. If not, the candidate location signal is marked as not meeting the accuracy requirement, skipped, and the process continues to test the next candidate location signal within the decision-making unit. If yes, the candidate location signal passes the verification and is added to the list of valid candidate location signals.
[0163] If the selection rule associated with the current decision unit is a time-priority rule, then the effective candidate location signal with the smallest time difference between the acquisition time and the location query request time is selected as the target candidate location signal from the effective candidate location signals. If the selection rule associated with the current decision unit is a precision-priority rule, then the effective candidate location signal with the smallest coverage radius is selected as the target location signal from the effective candidate location signals. If at least two effective candidate location signals have the same minimum time difference or the same minimum coverage radius, then the target location signal is determined from at least two effective candidate location signals according to the pre-set candidate location signal priority. If the current decision unit has not determined a target location signal, then the aforementioned process continues, and the next decision unit is selected for processing. After calibrating the target location signal, the calibrated location signal is set as the final target location signal of the current decision unit.
[0164] Referring to Figure 5(B), if no target location signal is selected in at least one decision unit in Figure 5(A), it is determined whether to enable real-time IP fallback. If not, it is determined whether to enable location profiling fallback. If real-time IP fallback is enabled, the IP address is parsed from the location query request, and it is determined whether the location information corresponding to the IP address is a valid location. If it is a valid location, the location information corresponding to the IP address is used as the fallback location. If it is not a valid location, it is determined whether to enable location profiling fallback.
[0165] If location profile fallback is enabled, the user location profile corresponding to the user identifier carried in the location query request is obtained, such as residence / workplace / frequently visited locations, etc. The validity of the user location profile is then determined. If valid, one of the valid location pieces is selected as the fallback location based on the priority of multiple valid location information. If not enabled, the location query result will be empty.
[0166] Obtain the location result type corresponding to the scene characteristics, and output the corresponding location query result, namely latitude information, administrative division information, or a combination of latitude and longitude information and administrative division information.
[0167] Figure 6 This is a schematic diagram of the overall architecture and processing chain of the location information determination method provided in the embodiments of this application.
[0168] like Figure 6As shown, different business parties in the business call layer (e.g., business party A, local services; business party B, content recommendation; business party C, e-commerce) can initiate location query requests based on their own business scenarios and corresponding location strategy configurations. The strategy configuration module in the strategy layer dynamically loads the corresponding strategies based on project binding relationships, and the strategy execution engine parses these strategies to obtain priority-ordered decision units. The strategy execution engine calls the signal source adaptation layer in parallel to obtain candidate location signals under different positioning modes. Within each decision unit, it performs dual filtering on the candidate location signals based on timeliness and accuracy, and then selects the best within the group according to time priority or accuracy priority rules. The first decision unit to produce a valid location result outputs the final target location. If the core decision process does not obtain a valid location result, it enters the fallback location layer, sequentially executing real-time IP fallback and location profile fallback, forming a three-layer progressive degradation system of strategy layer degradation, real-time IP fallback, and location profile fallback. Finally, the output layer routes and outputs full location results based on the location result type, including latitude and longitude information, administrative division information, or both latitude and longitude information and administrative division information, and can complete reverse geocoding through local spatial indexing.
[0169] Figure 7 This is a schematic diagram illustrating the strategy layer degradation of the location information determination method provided in the embodiments of this application.
[0170] like Figure 7As shown in the attached diagram, regarding the first part, "Normal Path": After the business request carries the LocationStrategy into the strategy execution engine, the strategy execution engine first traverses high-priority decision units and selects the optimal location from high-precision signal sources such as GPS and WiFi signals; if a high-precision location with a fresh acquisition time and a small coverage radius is successfully obtained, the result is returned directly. Regarding the second part, "Degradation Path 1: Strategy Layer Degradation": This part still occurs within the strategy execution engine (Layer 0), indicating that even if the normal path fails, it does not immediately enter IP fallback, but first continues to degrade within the strategy layer. That is, if there is no target location signal in the high-priority decision unit, it is degraded to a low-priority decision unit within the strategy execution engine, and a suboptimal location is selected from the predicted signal or IP signal to obtain a medium-precision result. Regarding the third part, "Degradation Path 2: Real-time IP Fallback": If none of the decision units output a target location signal, then with real-time IP fallback enabled, the IP address in the location query request is parsed and IP attribution is performed to obtain the city-level real-time fallback location. Regarding Part 4, "Degradation Path 3: Location Profile Backup," in the attached diagram: if the real-time IP is still unavailable, then with location profile backup enabled, the user's historical location profile is queried, and the historically stable location is selected as the final result according to the priority of residence, workplace, and frequently visited locations. This forms a progressive, multi-layered degradation system consisting of policy-level degradation, real-time IP backup, and location profile backup.
[0171] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0172] According to another embodiment, a location information determination device is provided. Figure 8 This is a schematic block diagram of a location information determination device provided in an embodiment of this application. The device is disposed in... Figure 1 The client in the illustrated architecture. For example... Figure 8 As shown, the device 800 includes: a decision unit determination unit 810, a selection processing execution unit 820, and a query result determination unit 830.
[0173] The decision unit determination unit 810 is configured to determine at least one decision unit corresponding to the scene features of the location query request in response to the location query request. Each decision unit is associated with a set of candidate location signals and selection rules within the set. Different candidate location signals correspond to different positioning modes.
[0174] The selection processing execution unit 820 is configured to sequentially perform the following selection processing on each decision unit as the current decision unit, based on the priority of at least one decision unit from high to low: based on the intra-group selection rules associated with the current decision unit, select a target position signal that meets the intra-group selection rules from a group of candidate position signals associated with the current decision unit; if a target position signal is selected, the selection processing ends; otherwise, the selection processing continues for the next decision unit.
[0175] The query result determination unit 830 is configured to determine the location query result based on the target location signal.
[0176] In one embodiment, the selection processing execution unit 820 may further be configured to: acquire a set of candidate location signals associated with the current decision unit; filter out valid candidate location signals from the set of candidate location signals, the valid candidate location signals including candidate location signals whose acquisition time is within the validity period and / or whose coverage radius is less than the accuracy limit, the validity period and the accuracy limit being associated with the positioning mode corresponding to the candidate location signal; and select a target location signal that conforms to the intra-group selection rule from the valid candidate location signals based on the intra-group selection rule associated with the current decision unit.
[0177] In one embodiment, the device 800 further includes a position signal acquisition unit and a position signal determination unit.
[0178] The location signal acquisition unit is configured to acquire all candidate location signals from the cache; The location signal determination unit is configured to, if there is a candidate location signal with positioning accuracy that meets the preset requirements among all the candidate location signals, then take the candidate location signal with positioning accuracy that meets the preset requirements as the target location signal; otherwise, continue to execute the step of determining at least one decision unit corresponding to the scene features of the location query request.
[0179] Furthermore, the selection processing execution unit 820 can also be configured to: if the selection rule within the group is a time priority rule, select the effective candidate location signal with the smallest time difference between the acquisition time and the request time of the location query request from the effective candidate location signals as the target location signal; or if the selection rule within the group is a precision priority rule, select the effective candidate location signal with the smallest coverage radius from the effective candidate location signals as the target location signal.
[0180] Furthermore, the selection processing execution unit 820 can also be configured to: if at least two valid candidate position signals have the same minimum time difference according to the time priority rule, or have the same minimum coverage radius according to the accuracy priority rule, then the target position signal is determined from the at least two valid candidate position signals according to the preset candidate position signal priority.
[0181] In one embodiment, the query result determination unit 830 may also be configured to: if the target location signal corresponds to a different location than the candidate location signal of other preset positioning modes in its decision-making unit, then parse the IP address from the location query request and determine the location information corresponding to the IP address as a reference location, and use the reference location to calibrate the target location signal; and determine the location query result based on the calibrated target location signal.
[0182] Furthermore, the query result determination unit 830 can also be configured to: use candidate position signals of other preset positioning modes as alternative candidate position signals; if the position information corresponding to the target position signal is consistent with the reference position, then keep the target position signal unchanged; if the position information corresponding to the target position signal is inconsistent with the reference position and the position corresponding to the alternative candidate position signal is consistent with the reference position, then replace the target position signal with the alternative candidate position signal.
[0183] Furthermore, the query result determination unit 830 can also be configured to: if the time difference between the acquisition time of the candidate position signal of other preset positioning modes and the acquisition time of the target position signal is less than or equal to the time tolerance threshold, and the accuracy difference between the coverage radius of the candidate position signal of other preset positioning modes and the coverage radius of the target position signal is less than or equal to the accuracy tolerance threshold, then the candidate position signal of other preset positioning modes is determined as the alternative candidate position signal; otherwise, the target position signal is kept unchanged.
[0184] Furthermore, the query result determination unit 830 can also be configured to: if the calibration replacement function is in the off state, record the calibration event containing the target position signal, the alternative candidate position signal and the reference position with a calibration mark, and keep the target position signal unchanged; if the calibration replacement function is in the on state, perform the replacement of the target position signal with the alternative candidate position signal; wherein the calibration mark is used to indicate that the calibration event has not been actually replaced, and the replacement operation is to replace the target position signal with the alternative candidate position signal.
[0185] In one embodiment, the device 800 further includes an address resolution unit and a first result determination unit.
[0186] The address resolution unit is configured to resolve the IP address from the location query request if no target location signal is selected in at least one decision unit, and use the location information corresponding to the IP address as a fallback location.
[0187] The first result determination unit is configured to use the catch-all position as the location query result if the catch-all position is a valid position.
[0188] In one embodiment, the device 800 further includes: a location image acquisition unit and a second result determination unit.
[0189] The location profile acquisition unit is configured to acquire the user location profile corresponding to the user identifier carried in the location query request if the fallback location is invalid.
[0190] The second result determination unit is configured to determine the location query result based on the user location profile.
[0191] In one embodiment, the second result determination unit may also be configured to: if the user location profile includes multiple valid location information and the multiple valid location information is associated with the user's behavioral address, then select one of the location information as the location query result based on the priority of the multiple valid location information.
[0192] In one embodiment, the device 800 further includes: an identifier detection unit, a first query key determination unit, and a second query key determination unit.
[0193] The identifier detection unit is configured to detect whether the number of users associated with the device identifier carried in the location query request is equal to the preset number of users.
[0194] The first query key determination unit is configured to use the device identifier as the query key for reading candidate location signals if the number of users is equal to the preset number.
[0195] The second query key determination unit is configured to use the user identifier carried in the location query request as the query key for reading the candidate location signal if the number of users is not equal to the preset number of users.
[0196] In one embodiment, the query result determination unit can also be configured to: obtain the location result type corresponding to the scene features; if the location result type is a first type, then use the latitude and longitude information corresponding to the target location signal as the location query result; if the location result type is a second type, then use the administrative division information corresponding to the target location signal as the location query result; if the location result type is a third type, then use the latitude and longitude information and administrative division information corresponding to the target location signal as the location query result.
[0197] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0198] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0199] In addition, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the methods in the foregoing method embodiments.
[0200] And an electronic device, comprising: One or more processors; and A memory associated with one or more processors, the memory being used to store program instructions that, when read and executed by one or more processors, perform the steps of any of the methods in the foregoing method embodiments.
[0201] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the methods in the foregoing method embodiments.
[0202] in, Figure 9This is a schematic block diagram of an electronic device provided in an embodiment of this application. It exemplarily illustrates the architecture of the electronic device, which may specifically include a processor 910, a video display adapter 911, a disk drive 912, an input / output interface 913, a network interface 914, and a memory 920. The processor 910, video display adapter 911, disk drive 912, input / output interface 913, network interface 914, and memory 920 can be communicatively connected via a communication bus 930.
[0203] The processor 910 can be implemented using a general-purpose CPU, microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits to execute relevant programs in order to implement the technical solution provided in this application.
[0204] The memory 920 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 920 can store the operating system 921 for controlling the operation of the electronic device 900, and the basic input / output system (BIOS) 922 for controlling the low-level operations of the electronic device 900. Additionally, it can store a web browser 923, a data storage management system 924, and a location information determination device 800, etc. The aforementioned location information determination device 800 can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when the technical solution provided in this application is implemented through software or firmware, the relevant program code is stored in the memory 920 and is called and executed by the processor 910.
[0205] Input / output interface 913 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.
[0206] Network interface 914 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.).
[0207] Bus 930 includes a pathway for transmitting information between various components of the device, such as processor 910, video display adapter 911, disk drive 912, input / output interface 913, network interface 914, and memory 920.
[0208] It should be noted that although the above-described device only shows the processor 910, video display adapter 911, disk drive 912, input / output interface 913, network interface 914, memory 920, bus 930, etc., in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.
[0209] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer program product. This computer program product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of the embodiments of this application.
[0210] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for determining location information, characterized in that, The method includes: In response to a location query request, at least one decision unit corresponding to the scene characteristics of the location query request is determined. Each decision unit is associated with a set of candidate location signals and selection rules within the set. Different candidate location signals correspond to different positioning modes. Based on the priority of the at least one decision unit in descending order, each decision unit is sequentially treated as the current decision unit and the following selection process is performed: based on the intra-group selection rule associated with the current decision unit, a target position signal that conforms to the intra-group selection rule is selected from a group of candidate position signals associated with the current decision unit. If a target position signal is selected, the selection process ends; otherwise, the selection process continues for the next decision unit. Based on the target location signal, the location query result is determined.
2. The method according to claim 1, characterized in that, The step of selecting a target location signal that conforms to the intra-group selection rule associated with the current decision unit from a group of candidate location signals associated with the current decision unit includes: Obtain the set of candidate location signals associated with the current decision-making unit; Valid candidate location signals are selected from the set of candidate location signals. The valid candidate location signals include candidate location signals whose acquisition time is within the validity period and / or whose coverage radius is less than the accuracy limit. The validity period and the accuracy limit are associated with the positioning mode corresponding to the candidate location signal. Based on the intra-group selection rules associated with the current decision unit, a target location signal that conforms to the intra-group selection rules is selected from the valid candidate location signals.
3. The method according to claim 1, characterized in that, Before determining at least one decision unit corresponding to the scene features of the location query request, the method further includes: Retrieve all candidate position signals from the cache; If there is a candidate location signal with a positioning accuracy that meets the preset requirements among the full set of candidate location signals, then the candidate location signal with the positioning accuracy that meets the preset requirements is taken as the target location signal; otherwise, the step of determining at least one decision unit corresponding to the scene features of the location query request continues.
4. The method according to claim 2, characterized in that, The step of selecting a target location signal that conforms to the intra-group selection rule based on the current decision unit's association from the valid candidate location signals includes: If the selection rule within the group is a time-priority rule, the effective candidate location signal with the smallest time difference between the acquisition time and the request time of the location query request is selected from the effective candidate location signals as the target location signal; or If the selection rule within the group is a precision priority rule, the effective candidate position signal with the smallest coverage radius is selected from the effective candidate position signals as the target position signal.
5. The method according to claim 4, characterized in that, The method further includes: If at least two of the valid candidate location signals have the same minimum time difference according to the time priority rule, or have the same minimum coverage radius according to the precision priority rule, then the target location signal is determined from the at least two valid candidate location signals according to the preset candidate location signal priority.
6. The method according to claim 1, characterized in that, Determining the location query result based on the target location signal includes: If the target location signal corresponds to a different location than the candidate location signal of other preset positioning modes in its decision-making unit, then the IP address is parsed from the location query request and the location information corresponding to the IP address is determined as a reference location, and the target location signal is calibrated using the reference location. Based on the calibrated target location signal, the location query result is determined.
7. The method according to claim 6, characterized in that, The calibration process for the target position signal using the reference position includes: The candidate position signals of the other preset positioning modes are used as alternative candidate position signals; If the location information corresponding to the target location signal is consistent with the reference location, then the target location signal remains unchanged; If the location information corresponding to the target location signal is inconsistent with the reference location and the location corresponding to the alternative candidate location signal is consistent with the reference location, then the target location signal is replaced by the alternative candidate location signal.
8. The method according to claim 7, characterized in that, The step of using candidate location signals from other preset positioning modes as replacement candidate location signals includes: If the time difference between the acquisition time of the candidate position signal of the other preset positioning mode and the acquisition time of the target position signal is less than or equal to the time tolerance threshold, and the accuracy difference between the coverage radius of the candidate position signal of the other preset positioning mode and the coverage radius of the target position signal is less than or equal to the accuracy tolerance threshold, then the candidate position signal of the other preset positioning mode is determined as the alternative candidate position signal. Otherwise, keep the target position signal unchanged.
9. The method according to claim 7, characterized in that, Before replacing the target location signal with the alternative candidate location signal, the method further includes: If the calibration replacement function is off, a calibration event containing the target position signal, the alternative candidate position signal, and the reference position will be recorded with a calibration mark, and the target position signal will remain unchanged; if the calibration replacement function is on, the process of replacing the target position signal with the alternative candidate position signal will be performed. The calibration mark is used to identify that the calibration event was not actually replaced for offline analysis, and the replacement operation is to replace the target position signal with the alternative candidate position signal.
10. The method according to claim 1, characterized in that, The method further includes: If the target location signal is not selected in any of the at least one decision-making units, the IP address is parsed from the location query request, and the location information corresponding to the IP address is used as a fallback location; If the catch-all location is a valid location, then the catch-all location will be used as the location query result.
11. The method according to claim 10, characterized in that, The method further includes: If the catch-all location is invalid, obtain the user location profile corresponding to the user identifier carried in the location query request; Based on the user location profile, the location query result is determined.
12. The method according to claim 11, characterized in that, Determining the location query result based on the user location profile includes: If the user location profile includes multiple valid location information, and the multiple valid location information is associated with the user's behavioral address, then based on the priority of the multiple valid location information, one of the location information is selected as the location query result.
13. The method according to any one of claims 1 to 12, characterized in that, Before determining at least one decision unit corresponding to the scene features of the location query request, the method further includes: Detect whether the number of users associated with the device identifier carried in the location query request is equal to the preset number of users; If the number of users is equal to the preset number, then the device identifier is used as the query key to read the candidate location signal; If the number of users is not equal to the preset number, the user identifier carried in the location query request is used as the query key to read the candidate location signal.
14. The method according to any one of claims 1 to 12, characterized in that, Determining the location query result based on the target location signal includes: Obtain the location result type corresponding to the scene features; If the location result type is the first type, then the latitude and longitude information corresponding to the target location signal is used as the location query result; if the location result type is the second type, then the administrative division information corresponding to the target location signal is used as the location query result; if the location result type is the third type, then the latitude and longitude information and administrative division information corresponding to the target location signal are used as the location query result.
15. A location information determining device, characterized in that, The device includes: The decision unit determination unit is configured to determine at least one decision unit corresponding to the scene features of the location query request in response to the location query request. Each decision unit is associated with a set of candidate location signals and selection rules within the set. Different candidate location signals correspond to different positioning modes. The selection processing execution unit is configured to sequentially perform the following selection process on each decision unit as the current decision unit, based on the priority of the at least one decision unit from high to low: selecting a target position signal that conforms to the intra-group selection rule associated with the current decision unit from a group of candidate position signals associated with the current decision unit; if a target position signal is selected, the selection process ends; otherwise, the selection process continues for the next decision unit. The query result determination unit is configured to determine the location query result based on the target location signal.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program performs the steps of the method described in any one of claims 1 to 14.
17. An electronic device, characterized in that, include: One or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method according to any one of claims 1 to 14.
18. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1 to 14.
