Terminal positioning method, apparatus, device, and storage medium
By autonomously decrypting and calculating the ranging code on the terminal, and combining it with high-precision base station information, the problem of poor flexibility and privacy and security risks caused by centralized positioning on the network side in existing technologies has been solved, and high-precision autonomous positioning has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE GROUP DESIGN INST
- Filing Date
- 2026-02-09
- Publication Date
- 2026-06-05
AI Technical Summary
Existing 5G network terminal positioning methods rely on centralized measurement and calculation on the network side, resulting in poor flexibility, low real-time performance, low resource utilization efficiency, and high risks to user privacy and security.
The terminal receives the ranging code decoding key issued by the core network, decrypts the encrypted ranging code broadcast by the base station, and, in conjunction with high-precision geographical location and clock correction information, autonomously constructs and solves a system of equations to determine its location coordinates.
It enables autonomous positioning of the terminal, improves the flexibility and real-time performance of positioning, enhances positioning accuracy, and protects user privacy and security.
Smart Images

Figure CN122160716A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a terminal positioning method, apparatus, device, and storage medium. Background Technology
[0002] Currently, 5G network positioning typically relies on network-side positioning technologies, such as basic cellular positioning, SRS (Sounding Reference Signal) field strength positioning, and distance positioning. Basic cellular positioning involves network-side equipment, such as a gNodeB (generation Node B), directly acquiring the terminal's location information or measuring signal parameters, and then using a positioning server, such as an LMF (Location Management Function), to calculate and determine the terminal's coordinates. SRS field strength positioning and distance positioning, on the other hand, involve the terminal sending an uplink reference signal, which is then measured by the network side using signal strength or time of arrival, and the location is calculated using a fingerprint database or triangulation algorithm.
[0003] While the aforementioned network-side positioning methods can achieve terminal location estimation, these solutions all have significant technical problems: basic cellular positioning and SRS field strength positioning rely on centralized control on the network side, and the terminal cannot independently obtain positioning results, resulting in poor flexibility and real-time performance in the positioning process; while distance positioning methods do not consider the independent computing needs of the terminal side, causing positioning accuracy to be limited by network algorithms and data accuracy, and cannot be dynamically optimized according to the needs of the terminal side, which can easily lead to resource waste and privacy leakage risks, affecting the autonomy and efficiency of positioning. Summary of the Invention
[0004] The main objective of this invention is to provide a terminal positioning method, apparatus, device, and storage medium, which aims to solve the problems of existing terminal positioning methods, which rely on centralized measurement and calculation on the network side, resulting in the terminal's inability to locate itself autonomously, poor flexibility, low real-time performance, low resource utilization efficiency, and high risks to user privacy and security.
[0005] In a first aspect, embodiments of the present invention provide a terminal positioning method, applied to a terminal, the method comprising: Receive the ranging code decoding key issued by the core network; the ranging code decoding key is generated and issued by the core network after the terminal user has signed up for the autonomous positioning service, and corresponds to the encryption key used by the base station to encrypt the original ranging code; Receive encrypted ranging codes broadcast by at least four base stations; wherein, the encrypted ranging code is a signal generated by each base station encrypting the original ranging code generated by each base station based on its own cell identifier and the encryption key; Using the ranging code decoding key, the received encrypted ranging code is decrypted to obtain the original ranging code corresponding to each base station. Based on the original ranging code, a locally generated copy ranging code with the same structure as the original ranging code is aligned with the original ranging code to obtain the propagation time of the encrypted ranging code signal from each base station to the terminal. The pseudorange with each base station is calculated based on the propagation time. The high-precision geographic location and clock correction information of the at least four base stations are obtained. Based on the pseudorange, the high-precision geographic location and the clock correction information corresponding to the at least four base stations respectively, a system of equations is constructed with the three-dimensional coordinates of the terminal and the clock deviation as unknowns. The location coordinates of the terminal are determined by solving the system of equations. The clock correction information is used to represent the deviation of the local clock of each base station from the standard time reference.
[0006] Secondly, embodiments of the present invention provide a terminal positioning device, applied to a terminal, the device comprising: The first receiving module is used to receive the ranging code decoding key issued by the core network; the ranging code decoding key is generated and issued by the core network after the terminal user has signed up for the autonomous positioning service, and corresponds to the encryption key used by the base station to encrypt the original ranging code. The second receiving module is used to receive encrypted ranging codes broadcast by at least four base stations; wherein the encrypted ranging code is a signal generated by each base station encrypting the original ranging code generated by each base station based on its own cell identifier and the encryption key; The decryption module is used to decrypt the received encrypted ranging code using the ranging code decoding key to obtain the original ranging code corresponding to each base station. Based on the original ranging code, a locally generated copy ranging code with the same structure as the original ranging code is performed with the original ranging code for code phase alignment to obtain the propagation time of the encrypted ranging code signal from each base station to the terminal. The pseudorange with each base station is calculated based on the propagation time. The positioning module is used to acquire the high-precision geographical location and clock correction information of the at least four base stations, and based on the pseudorange, the high-precision geographical location and the clock correction information corresponding to the at least four base stations respectively, to construct a system of equations with the three-dimensional coordinates of the terminal and the clock deviation as unknowns, and to determine the position coordinates of the terminal by solving the system of equations; the clock correction information is used to represent the deviation of the local clock of each base station from the standard time reference.
[0007] Thirdly, embodiments of the present invention provide an electronic device, including: a processor; and a memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the steps of the method described in the first aspect above.
[0008] Fourthly, embodiments of the present invention provide a computer-readable storage medium for storing computer-executable instructions that, when executed by a processor, implement the steps of the method described in the first aspect above.
[0009] Fifthly, embodiments of the present invention provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect above.
[0010] The at least one technical solution provided by the embodiments of the present invention can achieve the following technical effects: In this embodiment of the invention, firstly, the terminal can receive a ranging code decoding key issued by the core network after the user subscribes to the autonomous positioning service. This key corresponds to the encryption key used by the base station to encrypt the original ranging code. Then, the terminal can receive encrypted ranging codes broadcast by at least four base stations. These encrypted ranging codes are signals formed by each base station encrypting the generated original ranging code based on its own cell identifier and encryption key. The terminal can use the decoding key to decrypt the encrypted ranging code, recover the original ranging code corresponding to each base station, and determine the propagation time of the signal from each base station to the terminal by aligning the locally generated, structurally identical, copied ranging code with the original ranging code in phase. This allows the terminal to calculate the pseudorange with each base station. Simultaneously, the terminal can obtain the high-precision geographical location and clock correction information of the at least four base stations. Based on the pseudorange, high-precision geographical location, and clock correction information of all base stations, the terminal autonomously constructs a system of equations with its own three-dimensional coordinates and clock deviation as unknowns. By solving this system of equations, the terminal determines its own position coordinates.
[0011] This invention enables terminals to directly receive and decrypt encrypted ranging codes broadcast by multiple base stations via authorization and decryption keys issued by the core network, thereby autonomously completing signal propagation time measurement and pseudorange calculation. Combined with high-precision base station location and clock information autonomously acquired by the terminal, the terminal independently completes location calculation. This solution eliminates the need for centralized control and calculation on the network side, achieving terminal autonomy in the positioning process and effectively solving the technical defects of existing network-side positioning technologies, such as poor positioning flexibility and insufficient real-time performance due to reliance on centralized network processing. Furthermore, since the entire positioning calculation process is completed on the terminal side, uploading raw measurement data or intermediate results to the network side is avoided, thus overcoming the privacy leakage risks that may arise from existing distance positioning methods. By combining high-precision base station information with autonomous measurement and calculation on the terminal side, this invention empowers the terminal with positioning autonomy while improving positioning accuracy and protecting user privacy, solving the problem that existing technologies cannot simultaneously achieve positioning autonomy, real-time performance, high accuracy, and privacy security. Attached Figure Description
[0012] Figure 1 This is one of the flowcharts illustrating a terminal positioning method provided in an embodiment of the present invention; Figure 2 This is a second schematic flowchart of a terminal positioning method provided in one embodiment of the present invention; Figure 3 This is one of the scenario diagrams illustrating a terminal positioning method provided in an embodiment of the present invention; Figure 4 A second scenario illustration of a terminal positioning method provided in an embodiment of the present invention; Figure 5 A third scenario illustration of a terminal positioning method provided in an embodiment of the present invention; Figure 6 A fourth scenario illustration of a terminal positioning method provided in an embodiment of the present invention; Figure 7 Fifth scenario illustration of a terminal positioning method provided in an embodiment of the present invention; Figure 8 A sixth scenario illustration of a terminal positioning method provided in an embodiment of the present invention; Figure 9 Seventh scenario illustration of a terminal positioning method provided in an embodiment of the present invention; Figure 10 This is the eighth scenario illustration of a terminal positioning method provided in an embodiment of the present invention; Figure 11 A schematic diagram of a scenario for a terminal positioning method provided in an embodiment of the present invention (Figure 9); Figure 12This is a schematic diagram of a scenario for a terminal positioning method provided in an embodiment of the present invention. Figure 13 11. A scenario illustration of a terminal positioning method provided in an embodiment of the present invention; Figure 14 12. A scenario diagram illustrating a terminal positioning method provided in an embodiment of the present invention; Figure 15 A schematic diagram of a scenario for a terminal positioning method provided in an embodiment of the present invention, number thirteen; Figure 16 Fourteenth scenario illustration of a terminal positioning method provided in an embodiment of the present invention; Figure 17 The third flowchart illustrates a terminal positioning method provided in one embodiment of the present invention. Figure 18 A schematic diagram of a scenario for a terminal positioning method provided in an embodiment of the present invention, number fifteen; Figure 19 A schematic diagram of a scenario for a terminal positioning method provided in an embodiment of the present invention, number sixteen; Figure 20 Schematic diagram seventeen of a scenario illustrating a terminal positioning method provided in an embodiment of the present invention; Figure 21 Schematic diagram eighteen of a scenario for a terminal positioning method provided in an embodiment of the present invention; Figure 22 A schematic diagram of a scenario for a terminal positioning method provided in an embodiment of the present invention, number nineteen; Figure 23 This is a schematic diagram of a scenario for a terminal positioning method provided in an embodiment of the present invention; Figure 24 This is a schematic diagram of a scenario for a terminal positioning method provided in an embodiment of the present invention, number twenty-one. Figure 25 The fourth flowchart illustrates a terminal positioning method provided in one embodiment of the present invention. Figure 26 A schematic diagram of the module composition of a terminal positioning device 2600 provided in one embodiment of the present invention; Figure 27 This is a schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0014] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0015] Please see Figure 1 , Figure 1 This is one of the flowcharts illustrating a terminal positioning method provided in an embodiment of the present invention, applied to a terminal, such as... Figure 1 As shown, the method includes the following steps: Step 102: Receive the ranging code decoding key issued by the core network; the ranging code decoding key is generated and issued by the core network after the terminal user has signed up for the self-positioning service, and corresponds to the encryption key used by the base station to encrypt the original ranging code.
[0016] Step 104: Receive encrypted ranging codes broadcast by at least four base stations; wherein, the encrypted ranging code is a signal generated by each base station encrypting the original ranging code generated by each base station based on its own cell identifier and encryption key.
[0017] Step 106: Use the ranging code decoding key to decrypt the received encrypted ranging code to obtain the original ranging code corresponding to each base station. Based on the original ranging code, perform code phase alignment processing on the locally generated copy ranging code with the same structure as the original ranging code to obtain the propagation time of the encrypted ranging code signal from each base station to the terminal. Calculate the pseudorange with each base station based on the propagation time.
[0018] Step 108: Obtain high-precision geographic location and clock correction information of at least four base stations, and based on the pseudorange, high-precision geographic location and clock correction information corresponding to at least four base stations respectively, construct a system of equations with the terminal's three-dimensional coordinates and clock deviation as unknowns, and determine the terminal's location coordinates by solving the system of equations; the clock correction information is used to represent the deviation of each base station's local clock from the standard time reference.
[0019] In this embodiment of the invention, the terminal can receive a ranging code decoding key issued by the core network. This ranging code decoding key can be generated and issued by the core network after the terminal user has subscribed to the autonomous positioning service, and corresponds to the encryption key used by the base station to encrypt the original ranging code.
[0020] During network registration, the terminal can receive a registration acceptance message from the core network, which carries a ranging code decoding key. The core network can generate and distribute the ranging code decoding key based on the query results of the terminal user's subscription data. The subscription data may include specified fields used to identify whether the terminal user has subscribed to the self-location service.
[0021] In this embodiment of the invention, the UDM (Unified Data Management) entity in the core network is responsible for storing user subscription data. A dedicated field can be added to the UDM's user subscription data to indicate whether the user has subscribed to an autonomous positioning service based on NR (New Radio) sensing base station signals. When a terminal initiates an initial registration request or performs cross-TA (Tracking Area) mobile registration, the AMF (Authentication Management Function) queries the UDM via the Nudm_SubscriberDataManagement_Get signaling to obtain the user's subscribed service information.
[0022] For example, such as Figure 2 The diagram shows the signaling sequence diagram of the registration process of the 5G network non-access stratum (NAS), which details the standard signaling interaction process that user equipment (UE) must go through to successfully access the 5G network and establish a management connection with the core network. Figure 2 The vertical column shows the various network function entities involved in this process, including the User Equipment (UE), Access and Mobility Management Function (AMF), Unified Data Management (UDM), and Authentication Server Function (AUSF). First, the UE sends a "Registration Request" to the network, which involves a series of key steps such as network selection, user authentication, and security mode activation. Figure 2 The document specifically specifies the interaction between the AMF and UDM (such as the Nudm_SDM_Get request), which is a crucial step for the AMF to check whether a user has subscribed to the self-location service. Only after this complete registration process is successfully executed will the AMF include and issue the ranging code decoding key in the final "Registration Accept" message. Therefore, Figure 2 This reveals the prerequisite for the terminal to acquire positioning capability in this technical solution—that is, it must first complete the standard 5G network registration and authorization process, which forms the basis for all subsequent positioning-related operations (such as receiving RRC auxiliary data and decrypting ranging codes).
[0023] This signaling uses the URI (Uniform Resource Identifier) format: {apiRoot} / nudm-sdm / <apiversion> / {supi}, where supi is a user permanent identifier; the dataset-names query parameter must include "TRACE" to ensure that a dataset containing tracking information is retrieved.
[0024] For example, it can be like Figure 3 The table shown illustrates a UDM query interface parameter table. This table defines the supported URL query parameters when retrieving user data from UDM resources using the HTTPGET method. It specifies three key parameters: the required `dataset-names` (specifying the names of the datasets to retrieve), the conditionally required `plmn-id` (specifying the Public Land Mobile Network identifier when querying specific datasets such as "TRACE"; the default is the H-PLMN ID), and the optional `supported-features`. This table serves as the technical specification basis for the AMF's process of querying the UDM to determine whether a user has subscribed to the self-location service.
[0025] UDM uses a new bit in the returned TRACE Data to indicate the user's subscription status—for example, a bit set to 0 indicates the user has not subscribed to the self-location service, while a bit set to 1 indicates they have. Figure 4 The diagram illustrates a sequence of tracking data acquisition by an NF (Network Function) service consumer (AMF in this scheme). Figure 4 This demonstrates the standard interaction process of a Network Functions (NF) service consumer (AMF) retrieving specific user trace data (TraceData) from a User Device Manager (UDM). First, the AMF sends an HTTP GET request to the UDM, with the user's SUPI (Subscription Permanent Identifier) included in the request path. After processing the request, the UDM returns one of two possible responses: a "200 OK" response and a Trace Data Response body containing the trace data upon success; or a "404 Not Found" response if no data is found. Figure 4 It can clearly explain the success and abnormal scenarios of this key signaling interaction when querying the user's contract status, such as the self-location service.
[0026] If the query results show that the user has subscribed to the autonomous positioning service, the AMF can add an optional field "UE autonomous positioning key" to the Registration Accept message. This field, which is 128 bits long, carries the ranging code decoding key. For example, ... Figure 5 As shown, Figure 5 The table details the composition of each Information Element (IE) in the 5G Registration Acceptance Message. Besides standard fields such as Protocol Authentication, Security Header Type, and Message Type, the last row specifically displays an optional "UE Autonomous Positioning Key" information element, which is 16 bytes (128 bits) long. The key's effective range is set to TA-level geographical areas, meaning that when a terminal moves into a new TA, the AMF will reissue a new key during the terminal's cross-TA registration process. This design ensures both regional key security and allows the network to update the key according to policies, such as every 24 hours, thereby enhancing overall security. The entire process ensures that only subscribed users can obtain the key necessary to decrypt the ranging code, laying a secure foundation for terminal-side autonomous positioning.
[0027] After receiving the ranging code decoding key, the terminal can receive encrypted ranging codes broadcast by at least four base stations. The encrypted ranging code is a signal generated by each base station encrypting the original ranging code generated by itself based on its own cell ID and encryption key. Before receiving the encrypted ranging code broadcast by at least four base stations, the terminal can perform signal measurements on surrounding base stations to identify available base stations with signal strength higher than a preset threshold. Then, candidate base stations that meet preset screening criteria are selected from the available base stations. These preset screening criteria may include: the encrypted ranging code broadcast by the candidate base station can be successfully decrypted by the terminal using the ranging code decoding key, and the candidate base station's high-precision geographical location and clock correction information are included in the signaling issued by the serving base station. The serving base station is the base station currently connected to the terminal. After determining the candidate base stations, the terminal can receive the encrypted ranging code broadcast by at least four candidate base stations.
[0028] In this embodiment of the invention, the terminal can first perform signal measurements on surrounding base stations. It can scan the wireless signals in the area, measuring the RSRP (Reference Signal Receiving Power) or similar indicators of each base station, and marking base stations with signal strength higher than a preset threshold, for example, -100 dBm, as available base stations. Then, the terminal can filter candidate base stations from the available base stations. There are two filtering conditions: First, the terminal must be able to successfully decrypt the encrypted ranging code broadcast by the base station using the ranging code decoding key obtained in the aforementioned steps, ensuring that the base station is a legitimate signal source authorized by the network for positioning; second, the high-precision geographical location and clock correction information of the base station must have been sent to the terminal by the serving base station through RRC (Radio Resource Control) connection reconfiguration signaling, ensuring that the terminal has the auxiliary data needed to calculate its location. The serving base station is the base station that the terminal currently maintains an RRC connection with; the corresponding cell is called the serving cell. The terminal needs to ensure that the number of candidate base stations ultimately selected is no less than four to meet the requirements of subsequent positioning equation solving.
[0029] On the base station side, the sensing base station periodically broadcasts encrypted ranging code signals during specific sensing time slots. The encryption process uses a cell ID and an encryption key. The specific encryption algorithm can be AES (Advanced Encryption Standard). The encryption formula can be defined as:
[0030] in, The original ranging code generated by the base station is a pseudo-random sequence with good autocorrelation properties; It is the unique identifier of the base station cell; It is the encryption key, corresponding to the decoding key issued by the core network to the terminal; symbol This indicates a bitwise XOR operation. The base station first... and An XOR operation is performed to obtain an intermediate key. Then, the original ranging code is encrypted using the AES algorithm and this intermediate key to generate a broadcast encrypted ranging code signal.
[0031] In this embodiment of the invention, the terminal can use the ranging code decoding key to decrypt the received encrypted ranging code, obtain the original ranging code corresponding to each base station, and based on the original ranging code, perform code phase alignment processing on the locally generated copy ranging code with the original ranging code to obtain the propagation time of the encrypted ranging code signal from each base station to the terminal, and calculate the pseudorange with each base station based on the propagation time.
[0032] Specifically, by aligning the locally generated, identically structured, copy of the ranging code with the original ranging code's phase, the propagation time of the encrypted ranging code signal from each base station to the terminal is obtained. This can be achieved by sliding the phase of the copy ranging code along the time axis and calculating the correlation coefficient between the copy ranging code and the decrypted original ranging code at each phase point. The correlation coefficient quantifies the waveform similarity between the sequences of the copy ranging code and the original ranging code. When the correlation coefficient reaches its maximum value, the symbol alignment between the copy ranging code and the original ranging code can be determined, and the sliding phase of the copy ranging code is defined as the propagation time of the encrypted ranging code signal from each base station to the terminal.
[0033] In this embodiment of the invention, the terminal can first decrypt the received encrypted ranging code. The decryption process can use the ranging code decoding key stored in the terminal and the cell ID of the corresponding base station. The decryption formula can be:
[0034] in, This represents the AES decryption algorithm. Its input parameters are the received encrypted ranging code signal and the intermediate key obtained by XORing the Cell ID and Key. The decryption output is the original ranging code sequence of the base station.
[0035] Simultaneously, the terminal locally generates a replicated ranging code with the exact same structure as the original ranging code transmitted by the base station. The generation algorithm and sequence structure of the replicated ranging code are consistent with those on the base station side, ensuring consistency in code type. To measure signal propagation time, the terminal can continuously slide the phase of the locally replicated ranging code on the time axis using an internal time delay unit in the receiver, i.e., constantly adjusting the start time point of the replicated ranging code. For each possible phase offset point, the terminal calculates the correlation coefficient between the replicated ranging code and the decrypted original ranging code at that moment. (Correlation coefficient) The calculation formula can usually be expressed as:
[0036] in, It is the value of the original ranging code obtained after decryption in the i-th chip; It is the value of the locally copied ranging code in the i-th chip; This is the current phase offset, and the summation range covers the entire code sequence length. The correlation coefficient ranges from -1 to 1; the larger its absolute value, the higher the waveform similarity between the two sequences.
[0037] The terminal continuously adjusts the phase offset. The correlation coefficient is calculated in real time. When the calculated correlation coefficient reaches its maximum value (ideally 1 for perfect alignment), the terminal can determine that the locally copied ranging code and the received original ranging code are precisely aligned in terms of symbolic representation. At this point, the total amount of sliding of the copied ranging code relative to its initial phase, i.e., the phase offset, is... This is determined to be the time it takes for the encrypted ranging code signal to propagate from the base station to the terminal, which is the air interface propagation delay. The propagation time is then obtained. Then, the terminal calculates the pseudorange with the base station according to physics formulas. :
[0038] in, This represents the speed of light in a vacuum. It's important to note that the pseudorange calculated this way is not the actual geometric distance, as it includes the deviation between the base station clock and standard time (i.e., clock error), the deviation between the terminal's own clock and standard time, and other possible transmission errors.
[0039] For example, such as Figure 6 As shown, Figure 6 The text uses a timeline to illustrate the multiple time reference points involved in the signal transmission from the NR source (base station) to the terminal reception: GNSS standard time, base station clock time, actual signal transmission time, terminal reception time, and terminal local clock time. "Pseudorange" includes the actual geometric distance propagation time, the deviation between the base station clock and standard time (source clock bias), and the deviation between the terminal clock and standard time (terminal clock bias). Figure 6 It intuitively explains the physical meaning of each term in the pseudorange observation equation, especially how the clock error term is introduced into the measurement value as an error.
[0040] In this embodiment of the invention, the terminal can obtain high-precision geographic location and clock correction information from at least four base stations. Based on the pseudorange, high-precision geographic location, and clock correction information corresponding to these at least four base stations, a system of equations is constructed with the terminal's three-dimensional coordinates and clock deviation as unknowns. The terminal's location coordinates are determined by solving the system of equations. The clock correction information can be used to represent the deviation of each base station's local clock from a standard time reference.
[0041] When acquiring high-precision geographic location and clock correction information from at least four base stations, the system first receives Radio Resource Control (RRC) connection reconfiguration signaling sent by the serving base station. This RRC connection reconfiguration signaling may carry auxiliary data for positioning. The auxiliary data may include cell identifiers of the serving cell and at least one neighboring cell, and for each cell identifier, corresponding high-precision geographic location and clock correction information for the base station antenna are configured. The serving base station is the currently connected base station. The serving cell is the currently connected cell. The RRC connection reconfiguration signaling can be parsed to obtain the auxiliary data, and based on the cell identifiers in the auxiliary data, the high-precision geographic location and clock correction information corresponding to at least four base stations can be obtained.
[0042] Before constructing the system of equations based on pseudorange, high-precision geographic location, and clock correction information corresponding to at least four base stations, a rough location coordinate of the terminal can be obtained by selecting the serving base station and the three strongest non-co-located neighboring cell base stations from the candidate base stations based on the received signal strength. Then, based on the rough location coordinates, different base station combinations are iteratively selected from the candidate base stations for evaluation, and the base station combination that minimizes or nearly minimizes the PDOP (Position Dilution of Precision) value is determined as the target base station combination for positioning. When constructing the system of equations with the terminal's three-dimensional coordinates and clock deviation as unknowns, the system of equations with the terminal's three-dimensional coordinates and clock deviation as unknowns can be constructed based on the pseudorange, high-precision geographic location, and clock correction information of each base station in the target base station combination.
[0043] When a terminal enters the RRC connected state, for example, when it transitions from idle to connected state, or when it enters a new serving cell through a handover procedure, the serving base station can send RRC connection reconfiguration signaling to the terminal. For example... Figure 7 As shown, the network sends an RRCReconfiguration message to the UE, and the UE replies with an RRCReconfigurationComplete message after completing the configuration. This interaction process is the basic signaling flow for the network to send various configurations to the terminal, including the positioning assistance data in this scheme. In this embodiment of the invention, additional information elements for transmitting positioning assistance data can be added to this signaling. Specifically, an "Antenna position" information element can be added to transmit the high-precision geographic coordinates of the base station antenna, and an "Antenna clock bias" information element can be added to transmit the deviation of the base station clock from a standard time reference (such as GNSS (Global Navigation Satellite System) system time). For example, as... Figure 8 As shown, Figure 8 This section demonstrates a snippet of the ASN.1 syntax definition for the RRCReconfiguration message. The definition explicitly lists all fields included in the message, with "Antenna position" and "Antenna clock bias"—two optional but essential information elements—highlighted in red. This code is part of the RRC protocol layer specification and provides the underlying protocol stack implementation basis for transmitting high-precision base station location and clock correction information to the terminal via RRC reconfiguration signaling in this embodiment of the invention.
[0044] For the serving cell itself, its "Antenna position" cell contains the following information: a coordinate system format indicator (3 bits), used to specify the coordinate system used for subsequent coordinate values, such as 000 for WGS-84, 001 for BDCS, etc.; an X coordinate value (usually corresponding to latitude), occupying 29 bits with a precision of 0.000001 degrees; a Y coordinate value (usually corresponding to longitude), occupying 29 bits with the same precision; and a Z coordinate value (usually corresponding to ellipsoidal altitude), occupying 29 bits with the same precision. The entire position cell occupies 90 bits. The "Antenna clock bias" cell occupies 12 bits and is used to represent the clock bias between the serving base station clock and the standard time reference. The 12-bit representation range is 0 to 4095, corresponding to a time range of 0 to 4095 multiplied by the time quantization granularity (8 picoseconds). Therefore, the maximum absolute value of the clock bias that can be represented is approximately 32.76 nanoseconds.
[0045] For example, such as Figure 9 The image shows the abstract syntax markup (ASN.1) definition of the "Antenna Position" information element (IE) in the RRC protocol layer. It defines a sequence (SEQUENCE) named "Antenna position" containing four optional fields: Coordinate system format, X, Y, and Z (three-dimensional coordinate values). The comment "-- Need N" after each field indicates that, although these fields are marked as optional in the actual implementation, the network must provide this information to complete the positioning function (i.e., "conditionally required"). This code is the specific syntax implementation in the 3GPP protocol stack of the aforementioned description that "the Antennaposition cell contains coordinate system format and XYZ coordinates," specifying the standard encoding format for this signaling during air interface transmission.
[0046] For example, such as Figure 10 The image shows the ASN.1 definition of the "Antenna Clock Bias" information element (IE). It defines a sequence (SEQUENCE) named "Antenna clock bias," whose content is a field of the same type, marked as optional (OPTIONAL, -- Need N). This defines the data structure of the clock bias value itself. This definition is the formal expression of the aforementioned "Antenna clock bias cell occupies 12 bits" in the protocol, and is the syntactic basis for carrying base station clock bias information in RRC signaling.
[0047] For example, such as Figure 11 The image shows the ASN.1 structure for the "antenna location" information element defined for a neighbor cell. (Compared to...) Figure 9 In contrast, it adds an Ncell ID (neighbor cell identifier) field to the beginning of the sequence. This structure clearly indicates that when transmitting antenna location information of neighboring cells via RRC signaling, the identifier of that neighboring cell must be included so that the terminal can associate the received location information with a specific base station (via Cell ID or Ncell ID). This corresponds to the aforementioned description that "for neighboring cells, the signaling adds an additional Ncell ID field to identify the cell."
[0048] like Figure 12 The diagram illustrates the ASN.1 structure of the "antenna clock bias" information element defined for neighboring cells. Similarly, it first includes the Ncell ID field in the sequence of Antenna clock bias, followed by the clock bias value field. This ensures that the clock correction information for each neighboring cell can be uniquely identified and matched.
[0049] For neighboring cells, the RRC reconfiguration signaling also carries their antenna location and clock bias information. Compared to the serving cell information, the neighboring cell information adds a "Neighbor Cell ID" (Ncell ID) field, occupying 32 bits, used to uniquely identify the neighboring cell. The structure of its location and clock bias information cells is the same as that of the serving cell. When selecting the list of neighboring cells to send to the terminal, the serving base station prioritizes those neighboring cells that have a neighboring relationship with its own cell and are on the same frequency as the terminal's current location. This maximizes the chances of the terminal reliably receiving the ranging code signals from these neighboring cells in the actual environment. After receiving the RRC reconfiguration signaling, the terminal parses the auxiliary data and stores it to prepare for subsequent positioning calculations.
[0050] Before starting the final precise positioning calculation, the terminal can first perform a coarse positioning step to obtain an initial location estimate. Based on the measured received signal strength, such as RSRP, the terminal can select the four strongest base stations from all candidate base stations. These must include the serving base station, and three other neighboring cell base stations with the strongest signals that are not co-located with the serving base station (i.e., not belonging to the same physical site). The terminal then uses the observation data (pseudorange) from these four base stations. Given coordinates ( Known clock difference The terminal can construct a set of pseudorange observation equations. The basic pseudorange observation equations are as follows:
[0051] in, It is a base station index. ; ( () represents the three-dimensional coordinates of the terminal to be determined; It's the speed of light; It is the undetermined clock skew of the terminal. This involves four equations and four unknowns. The system of nonlinear equations is used. The terminal can solve it using linearization and iterative methods. First, the terminal is given an initial approximate position coordinate (...). The coordinates can be estimated based on the location of the serving base station. Then, the true coordinates are represented as approximate coordinates plus a bias:
[0052]
[0053]
[0054] Expanding the pseudorange equation at approximate points using Taylor and ignoring higher-order terms yields the linearized observation equation:
[0055]
[0056]
[0057] Combine the linear equations of the four base stations into matrix form:
[0058] in, It is the design matrix. Then, the deviation vector is solved using the least squares method:
[0059] After calculating the deviation, update the approximate coordinates:
[0060] And so on. The terminal repeats this process (iteration) until the deviation value is reached. , , If it is less than a certain preset threshold, then the result is ( This is the approximate location coordinate of the terminal.
[0061] After obtaining a rough location, the terminal can select a set of four optimal base stations (including the serving base station) from all candidate base stations for final precise positioning. The goal of this selection is to minimize the Positioning Accuracy Attenuation Factor (PDOP). PDOP is an indicator of the quality of the positioning geometry. The smaller the PDOP value, the less the measurement error is amplified into a positioning error, and the higher the expected positioning accuracy.
[0062] For example, such as Figure 13 As shown, by comparing three scenarios, the relationship between the original ranging error and the final positioning error can be qualitatively explained. The "ranging error boundary" diagram on the left represents the range of uncertainty inherent in a single or multiple ranging values, which is usually quite large. The "position calculation error boundary" diagrams in the middle and right show that after using the ranging values from multiple base stations and performing position calculations based on geometric principles, the final positioning uncertainty region (i.e., the error ellipse or error volume) may be significantly reduced (middle diagram), but its shape and size strongly depend on the spatial geometry between the base station and the terminal (right diagram). Figure 13 This vividly illustrates the core concept of PDOP: a good geometry can compress errors, while a poor geometry can amplify ranging errors.
[0063] The formula for calculating PDOP is:
[0064] Where Q is the weight coefficient matrix, which is the matrix formed by the design matrix H in the linearized observation equation system. The top-left 3x3 submatrix is shown. Theoretical analysis and practice show that the PDOP value is inversely proportional to the volume of the spatial polyhedron formed by the terminal and the four selected base stations. Therefore, maximizing the volume of this polyhedron is equivalent to minimizing the PDOP value.
[0065] like Figure 14 As shown, comparing two satellite distribution scenarios visually demonstrates how spatial geometry affects positioning accuracy. Figure (a) "Smaller GDOP" shows a more open and uniform distribution of satellites in the sky, resulting in a smaller positioning error boundary and higher accuracy. Figure (b) "Larger GDOP" shows satellites clustered in a certain area of the sky. This compact and uneven distribution elongates the positioning error boundary, especially in the vertical direction, significantly reducing accuracy. Although this figure uses satellite navigation as an example, its principle is fully applicable to ground base station positioning. It powerfully illustrates, through analogy, why in terminal autonomous positioning schemes, it is necessary to select the combination with the optimal spatial geometry distribution (i.e., the combination with the smallest PDOP) from among many available base stations, rather than simply using the few base stations with the strongest signals.
[0066] like Figure 15 The diagram illustrates a complete algorithm for terminal autonomous positioning. First, initial coarse positioning is achieved using the pseudorange, antenna position, and clock bias data of the primary serving cell and three non-co-located neighboring cells with the strongest signals. Then, based on this coarse position, the volume of the spatial polyhedron formed by the terminal and these base stations is calculated, and an iterative optimization process is initiated to reselect the optimal positioning reference base station (i.e., the "positioning antenna source"). This process polls all cells that have obtained pseudorange, position, and clock bias information, continuously evaluating the spatial polyhedron volume corresponding to different base station combinations and its calculated Position Accuracy Attenuation Factor (PDOP). Since PDOP is inversely proportional to the spatial volume formed by the terminal and base stations—that is, the larger the spatial volume, the smaller the PDOP value, and the higher the positioning accuracy—the base station combination that maximizes the spatial polyhedron volume can be found, thereby indirectly obtaining the minimum PDOP value to achieve the highest positioning accuracy. The iteration terminates when a preset number of polls is reached or the PDOP value meets a threshold requirement. Finally, the base station combination that produces the largest polyhedron volume (corresponding to the minimum PDOP value) can be selected to perform the final precise positioning calculation. This flowchart clearly outlines the entire logic from data preparation, coarse positioning, iterative optimization to precise positioning.
[0067] The terminal can use a maximum volume optimization method to select the optimal combination of base stations. Two fixed points can be given: a rough location point of the terminal. Location of service base station The terminal needs to select 3 points from the remaining n candidate base stations to maximize the volume of the polyhedron formed by these five points. The volume of the polyhedron can be calculated using the tetrahedral decomposition method: first, calculate the coordinates of the center points of the five points. The same logic applies to other coordinate systems. Then, divide the entire polyhedron into 10 tetrahedrons, each formed by the center point C and any three of the five vertices. Calculate the volume of each tetrahedron. Among them, vectors AB, AC, and AD are vectors pointing from one vertex A of the tetrahedron to the other three vertices B, C, and D. Represents the determinant. Total volume of the polyhedron. It is the sum of the volumes of these 10 tetrahedrons.
[0068] For example, such as Figure 16 The Python code shown defines two key functions. The `tetrahedron_volume` function calculates the volume of a tetrahedron given the coordinates of its four vertices, based on the cross product and mixture product of vectors. The `total_volume` function is the core; it takes a list of five 3D coordinate points (two fixed points and three candidate points). First, it calculates the geometric center of these five points. Then, it uses `itertools.combinations` to generate all possible combinations of three points (i.e., any triangle among the five vertices except the center point), and sums the tetrahedron volumes formed by the center point and each triangle to obtain the total volume of the entire polyhedron. This code implements the "volume calculation using tetrahedral decomposition method" described above.
[0069] like Figure 17 The diagram illustrates the decision-making logic employed by the terminal when selecting the optimal combination of base stations. Its core is to dynamically select an optimization algorithm based on the number of candidate base stations, n: if n is less than or equal to a threshold (73 in the diagram), an exhaustive search method of "traversal solving" is used to calculate the volume of all combinations and take the maximum value; if n is greater than the threshold, an intelligent search algorithm of "PSO optimization" is used to find an approximate optimal solution within an acceptable timeframe.
[0070] If the number of candidate base stations n is small (e.g., n <= 30), the terminal can use a traversal method to calculate all possible combinations of selecting 3 points from n candidate points (the number of combinations is 1). The volume of the polyhedron corresponding to the given volume is determined, and then the base station group with the largest volume is selected.
[0071] For example, such as Figure 18 The image shows an example of the algorithm's output. With 2 fixed points and 30 candidate points, the theoretical number of combinations to be evaluated is 4,060. The configuration shows Particle Swarm Optimization (PSO) parameters as a reference only, but an exhaustive search method was actually run, traversing all combinations. The calculation was completed in 0.02 seconds, finding the optimal solution with a polyhedron volume of 26.637343. This result verifies that the exhaustive search method is feasible and efficient when the number of candidate points is small (n=30), and provides benchmark data for subsequent comparisons of the PSO algorithm's performance.
[0072] If the number of candidate base stations n is very large, the computational cost of the traversal method will be high. The number of such cases will increase dramatically. In order to achieve real-time computing on mobile devices, the terminal uses the particle swarm optimization (PSO) algorithm to approximate the optimal solution.
[0073] For example, such as Figure 19 As shown in the figure, this diagram lists the key configuration parameters in the PSO algorithm implementation in the form of code comments. It mainly includes two parts: the "Algorithm Configuration" section defines the problem size (number of candidate points NUM_CANDIDATE_POINTS=100) and the PSO algorithm size (number of iterations PSO_ITERATIONS = 300, particle swarm size PSO_SWARM_SIZE = 30); the "PSO Parameters" section sets the core hyperparameters of the algorithm: inertia weight w=0.5, individual learning factor c1=1.7, and social learning factor c2=1.6. These parameters are crucial for the PSO algorithm to converge effectively and find high-quality solutions.
[0074] The PSO algorithm process is as follows: Initialization: Randomly generate a group of particles, where the position of each particle i is a three-dimensional vector. Each dimension represents an index of a candidate base station (a continuous value, initially randomly generated within [0, n]); each particle has a velocity vector. (Initially randomly generated within [-1, 1]). Fitness evaluation: For each particle, its continuous position vector is decoded into discrete indices of three candidate base stations. Decoding method:
[0075] If any of the three decoded indices are duplicates, the fitness is set to 0 (invalid solution). Otherwise, the computation is performed using two fixed points. The volume of the polyhedron formed by the three candidate base sites is used as the fitness value of the particle. .
[0076] For example, such as Figure 20 The diagram illustrates the `evaluate` function in the PSO algorithm, used to calculate the fitness of each particle (representing a base station selection scheme). The function first decodes the particle position vector (a continuous value) into indices (discrete integers) of three candidate base stations. If any of the decoded indices are duplicated (less than three unique base stations), the fitness returns 0 (invalid solution). Otherwise, it selects the corresponding coordinate points from the candidate base station list based on these three indices, combines them with two fixed points (the approximate location of the terminal and the location of the serving base station), and calls the aforementioned `total_volume` function to calculate the volume of the polyhedron formed by these five points. This volume value is then returned as the fitness. This function directly correlates the PSO optimization objective (maximizing volume) with the particle position.
[0077] Update individual optimal Global optimality (G): Each particle records its own historical optimal position. The entire particle swarm records the globally optimal position G found by all particles in history.
[0078] For example, such as Figure 21 As shown in the figure, this diagram illustrates a code snippet of the core iterative loop of the PSO algorithm. In each iteration, the algorithm traverses all particles: evaluates the current particle's fitness (score); if the score is higher than the particle's own historical best score, the particle's individual optimal position and score are updated; if the score is also higher than the global best score of the entire population, the global optimal position and score are updated. Furthermore, the code includes logic that decodes the current global optimal position into a combination of base station indices and records it in the history list `all_history`. Figure 21 It also includes a progress printing function to facilitate monitoring of algorithm operation.
[0079] Velocity and position updates: In each iteration, the velocity and position of each particle are updated according to the following formula: Speed updates:
[0080] Location update:
[0081] in, c1 is the inertia weight, usually set to 0.5; c2 is the individual learning factor, usually set to 1.7; c3 is the social learning factor, usually set to 1.6; r1 and r2 are random numbers in the range [0,1]. The termination condition is: when the number of iterations reaches a preset maximum value, such as 300, the algorithm terminates and outputs the combination of base stations corresponding to the globally optimal position G as the optimal solution.
[0082] For example, such as Figure 22 As shown, for each particle in the particle swarm, a new velocity *v* is calculated in each of its three dimensions (representing consecutive values of the indices of the three candidate base stations). The velocity update follows the standard PSO formula: New Velocity = Inertia Weight * Old Velocity + Individual Learning Factor * Random Number * (Individual Historical Best Position - Current Position) + Social Learning Factor * Random Number * (Global Historical Best Position - Current Position). The calculated new velocity is directly used to update the particle's position in that dimension (Current Position += New Velocity).
[0083] For example, such as Figure 23 The diagram illustrates a complete PSO function framework named pso_with_history. This function accepts parameters such as a fixed point, a list of candidate points, particle swarm size, and number of iterations. It encapsulates the complete process of particle swarm initialization, iteration loop (including fitness evaluation, optimal solution update, velocity and position updates), progress reporting, and finally returning the global optimal index and optimal volume value.
[0084] For example, such as Figure 24 As shown, the differences between the PSO algorithm's optimization results and the theoretical optimal solution in terms of base station geometric layout are visually compared using a three-dimensional coordinate system. The left figure, "PSO Solution (95th Generation)," shows the solution found after 95 iterations, where the convex hull volume formed by the three candidate base stations (red dots) and two fixed points is 33.7395. The right figure, "Optimal Solution," shows the theoretical optimal solution found through exhaustive search, where the layout of the three candidate base stations (green dots) is better, resulting in a larger convex hull volume of 35.9075. Both figures indicate the primary serving cell (blue square) and the terminal's initial positioning point (gray triangle). This figure vividly demonstrates that the PSO algorithm can effectively approximate the optimal solution, finding a base station combination that significantly increases the spatial volume (i.e., geometric configuration), although it may be slightly inferior to the theoretical optimal solution, it greatly improves search efficiency.
[0085] Through the above process, the terminal determines the target base station combination for final positioning. Finally, the terminal uses precise pseudorange observations from four base stations in the target base station combination. High-precision geolocation and clock correction information Then, the pseudorange observation equations are reconstructed:
[0086] Where j = 1, 2, 3, 4.
[0087] Since 5G base stations are located at low altitudes, typically below 60 meters, the signal propagation path is short. Therefore, error terms such as ionospheric and tropospheric delays can be ignored, i.e., in the equation... The terminal uses a linearized iterative method similar to that used in the coarse localization stage, such as the least squares method, to solve for the coordinates of the terminal. and clock difference The system of four nonlinear equations was solved. Through multiple iterations until the solution converged, the high-precision three-dimensional position coordinates of the terminal were finally obtained. At this point, the terminal completed fully autonomous positioning using signals from the sensing base station.
[0088] For example, such as Figure 25 The diagram illustrates the end-to-end working mechanism of terminal autonomous positioning, clearly defining the division of labor and collaboration among the three functional domains: core network, radio network (access network), and terminal. On the core network side, the process begins with Unified Data Management (UDM) establishing a location service identifier for new subscribers. When a user registers, the Access and Mobility Management Function (AMF) queries the subscription information. If the user is already subscribed, a ranging code decoding key is generated and sent in the registration acceptance message. The validity of this key is limited to a specific Tracking Area (TA) and updated when the user moves across TAs, thus ensuring service security and regional management. On the radio network side, each sensing base station (cell) encrypts the original ranging code using its own cell ID and an encryption key coordinated with the core network within a predetermined sensing time slot and broadcasts it periodically. Simultaneously, the serving base station sends precise antenna location information and clock offset information of its own cell and neighboring cells to the subscribed user terminal in the connected state via RRC connection reconfiguration signaling. On the terminal side, after the positioning process is initiated, the terminal first performs a coarse positioning using pseudorange, location, and clock bias data from the serving cell and three non-serving cells with the strongest signals. Based on this coarse location, the terminal calculates the volume of the geometric polyhedron formed by itself and these base stations. Next, it enters an optimization iteration process: from all cells with known pseudorange, location, and clock bias information, a new set of base stations is selected as the positioning source. The goal is to find a combination that maximizes the polyhedron volume, corresponding to the minimum positioning accuracy attenuation factor (PDOP). The iteration stops after a fixed number of iterations or when the PDOP threshold is met. Finally, the terminal uses the selected optimal base station combination to calculate the precise final location. Figure 25 It provides a high-level summary of the entire closed-loop process, from network-side service configuration, key and data distribution, to terminal-side signal reception, data processing, optimization selection, and even final solution.
[0089] In this embodiment of the invention, firstly, the terminal can receive a ranging code decoding key issued by the core network after the user subscribes to the autonomous positioning service. This key corresponds to the encryption key used by the base station to encrypt the original ranging code. Then, the terminal can receive encrypted ranging codes broadcast by at least four base stations. These encrypted ranging codes are signals formed by each base station encrypting the generated original ranging code based on its own cell identifier and encryption key. The terminal can use the decoding key to decrypt the encrypted ranging code, recover the original ranging code corresponding to each base station, and determine the propagation time of the signal from each base station to the terminal by aligning the locally generated, structurally identical, copied ranging code with the original ranging code in phase. This allows the terminal to calculate the pseudorange with each base station. Simultaneously, the terminal can obtain the high-precision geographical location and clock correction information of the at least four base stations. Based on the pseudorange, high-precision geographical location, and clock correction information of all base stations, the terminal autonomously constructs a system of equations with its own three-dimensional coordinates and clock deviation as unknowns. By solving this system of equations, the terminal determines its own position coordinates.
[0090] This invention enables terminals to directly receive and decrypt encrypted ranging codes broadcast by multiple base stations via authorization and decryption keys issued by the core network, thereby autonomously completing signal propagation time measurement and pseudorange calculation. Combined with high-precision base station location and clock information autonomously acquired by the terminal, the terminal independently completes location calculation. This solution eliminates the need for centralized control and calculation on the network side, achieving terminal autonomy in the positioning process and effectively solving the technical defects of existing network-side positioning technologies, such as poor positioning flexibility and insufficient real-time performance due to reliance on centralized network processing. Furthermore, since the entire positioning calculation process is completed on the terminal side, uploading raw measurement data or intermediate results to the network side is avoided, thus overcoming the privacy leakage risks that may arise from existing distance positioning methods. By combining high-precision base station information with autonomous measurement and calculation on the terminal side, this invention empowers the terminal with positioning autonomy while improving positioning accuracy and protecting user privacy, solving the problem that existing technologies cannot simultaneously achieve positioning autonomy, real-time performance, high accuracy, and privacy security.
[0091] Figure 26 The terminal positioning device 2600 shown can achieve Figure 1 The method described in the embodiment achieves the same technical effect, and can be specifically referred to in the above description. Figure 1 The terminal positioning method of the illustrated embodiment will not be described in detail here. The terminal positioning device 2600 includes: The first receiving module 2601 is used to receive the ranging code decoding key issued by the core network; the ranging code decoding key is generated and issued by the core network after the terminal user has signed up for the autonomous positioning service, and corresponds to the encryption key used by the base station to encrypt the original ranging code. The second receiving module 2602 is used to receive encrypted ranging codes broadcast by at least four base stations; wherein, the encrypted ranging code is a signal generated by each base station encrypting the original ranging code generated by each base station based on its own cell identifier and the encryption key; The decryption module 2603 is used to decrypt the received encrypted ranging code using the ranging code decoding key to obtain the original ranging code corresponding to each base station. Based on the original ranging code, it performs code phase alignment processing with the original ranging code by using a locally generated copy ranging code with the same structure as the original ranging code to obtain the propagation time of the encrypted ranging code signal from each base station to the terminal. The pseudorange between the terminal and each base station is calculated based on the propagation time. The positioning module 2604 is used to acquire the high-precision geographical location and clock correction information of the at least four base stations, and based on the pseudorange, the high-precision geographical location and the clock correction information corresponding to the at least four base stations respectively, to construct a system of equations with the three-dimensional coordinates of the terminal and the clock deviation as unknowns, and to determine the position coordinates of the terminal by solving the system of equations; the clock correction information is used to represent the deviation of the local clock of each base station relative to the standard time reference.
[0092] Optionally, the first receiving module 2601 is used for: During the network registration process, a registration acceptance message is received from the core network; the registration acceptance message carries the ranging code decoding key; wherein, the core network generates and distributes the ranging code decoding key based on the query results of the terminal user's subscription data; a specified field in the subscription data is used to identify whether the terminal user has subscribed to the autonomous positioning service.
[0093] Optionally, the positioning module 2604 is used for: The system receives Radio Resource Control (RRC) connection reconfiguration signaling sent by the serving base station. The RRC connection reconfiguration signaling carries auxiliary data for positioning. The auxiliary data includes cell identifiers of the serving cell and at least one neighboring cell, and for each cell identifier, it is configured with corresponding high-precision geographic location and clock correction information of the base station antenna. The serving base station is the currently connected base station. The serving cell is the currently connected cell. The RRC connection reconfiguration signaling is parsed to obtain the auxiliary data, and the high-precision geographical location and clock correction information corresponding to the at least four base stations are obtained based on the cell identifier in the auxiliary data.
[0094] Optionally, the decryption module 2603 is used for: Slide the phase of the copied ranging code on the time axis, and calculate the correlation coefficient between the copied ranging code and the decrypted original ranging code for each phase point; wherein, the correlation coefficient is used to quantify the degree of similarity in waveform between the sequences of the copied ranging code and the original ranging code. When the correlation coefficient reaches its maximum value, it is determined that the code elements of the copied ranging code are aligned with those of the original ranging code, and the sliding phase of the copied ranging code is determined as the propagation time of the encrypted ranging code signal from each base station to the terminal.
[0095] Optionally, the device further includes ( Figure 26 (not shown in the image) The measurement module 2605 is used to perform signal measurements on surrounding base stations before receiving the encrypted ranging code broadcast by at least four base stations, in order to identify available base stations with signal strength higher than a preset threshold. The filtering module 2606 is used to filter candidate base stations that meet preset filtering conditions from the available base stations; the preset filtering conditions are: the encrypted ranging code broadcast by the candidate base station can be successfully decrypted by the terminal using the ranging code decoding key, and the high-precision geographical location and clock correction information of the candidate base station are included in the signaling issued by the serving base station; the serving base station is the currently connected base station; The second receiving module 2602 is used for: Receive encrypted ranging codes broadcast by at least four of the candidate base stations.
[0096] Optionally, the device further includes ( Figure 26 (not shown in the image) Selection module 2607 is used to select the serving base station and the three strongest non-co-located neighboring cell base stations from the candidate base stations for positioning calculation based on the received signal strength before constructing the equation system based on the pseudorange, the high-precision geographical location and the clock correction information corresponding to the at least four base stations respectively, so as to obtain the approximate location coordinates of the terminal. Evaluation module 2608 is used to iteratively select different base station combinations from the candidate base stations based on the coarse location coordinates, and determine the base station combination that minimizes or nearly minimizes the positioning accuracy attenuation factor PDOP as the target base station combination for positioning. The positioning module 2604 is used for: Based on the pseudorange, high-precision geographical location, and clock correction information of each base station in the target base station combination, a system of equations is constructed with the three-dimensional coordinates and clock deviation of the terminal as unknowns. Optionally, the resource node includes at least one of a computing node, a storage node, and a network node; the resource usage data includes at least one of CPU utilization, memory utilization, disk I / O rate, and network bandwidth utilization; and the preprocessing includes at least one of denoising, normalization, and feature extraction.
[0097] In this embodiment of the invention, firstly, the terminal can receive a ranging code decoding key issued by the core network after the user subscribes to the autonomous positioning service. This key corresponds to the encryption key used by the base station to encrypt the original ranging code. Then, the terminal can receive encrypted ranging codes broadcast by at least four base stations. These encrypted ranging codes are signals formed by each base station encrypting the generated original ranging code based on its own cell identifier and encryption key. The terminal can use the decoding key to decrypt the encrypted ranging code, recover the original ranging code corresponding to each base station, and determine the propagation time of the signal from each base station to the terminal by aligning the locally generated, structurally identical, copied ranging code with the original ranging code in phase. This allows the terminal to calculate the pseudorange with each base station. Simultaneously, the terminal can obtain the high-precision geographical location and clock correction information of the at least four base stations. Based on the pseudorange, high-precision geographical location, and clock correction information of all base stations, the terminal autonomously constructs a system of equations with its own three-dimensional coordinates and clock deviation as unknowns. By solving this system of equations, the terminal determines its own position coordinates.
[0098] This invention enables terminals to directly receive and decrypt encrypted ranging codes broadcast by multiple base stations via authorization and decryption keys issued by the core network, thereby autonomously completing signal propagation time measurement and pseudorange calculation. Combined with high-precision base station location and clock information autonomously acquired by the terminal, the terminal independently completes location calculation. This solution eliminates the need for centralized control and calculation on the network side, achieving terminal autonomy in the positioning process and effectively solving the technical defects of existing network-side positioning technologies, such as poor positioning flexibility and insufficient real-time performance due to reliance on centralized network processing. Furthermore, since the entire positioning calculation process is completed on the terminal side, uploading raw measurement data or intermediate results to the network side is avoided, thus overcoming the privacy leakage risks that may arise from existing distance positioning methods. By combining high-precision base station information with autonomous measurement and calculation on the terminal side, this invention empowers the terminal with positioning autonomy while improving positioning accuracy and protecting user privacy, solving the problem that existing technologies cannot simultaneously achieve positioning autonomy, real-time performance, high accuracy, and privacy security.
[0099] Figure 27 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Please refer to it. Figure 27 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.
[0100] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0101] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.
[0102] The processor reads the corresponding computer program from non-volatile memory into main memory and then executes it, forming a non-contiguous transfer configuration at the logical level. The processor executes the program stored in memory and specifically performs the following operations: Receive the ranging code decoding key issued by the core network; the ranging code decoding key is generated and issued by the core network after the terminal user has signed up for the autonomous positioning service, and corresponds to the encryption key used by the base station to encrypt the original ranging code; Receive encrypted ranging codes broadcast by at least four base stations; wherein, the encrypted ranging code is a signal generated by each base station encrypting the original ranging code generated by each base station based on its own cell identifier and the encryption key; Using the ranging code decoding key, the received encrypted ranging code is decrypted to obtain the original ranging code corresponding to each base station. Based on the original ranging code, a locally generated copy ranging code with the same structure as the original ranging code is aligned with the original ranging code to obtain the propagation time of the encrypted ranging code signal from each base station to the terminal. The pseudorange with each base station is calculated based on the propagation time. The high-precision geographic location and clock correction information of the at least four base stations are obtained. Based on the pseudorange, the high-precision geographic location and the clock correction information corresponding to the at least four base stations respectively, a system of equations is constructed with the three-dimensional coordinates of the terminal and the clock deviation as unknowns. The location coordinates of the terminal are determined by solving the system of equations. The clock correction information is used to represent the deviation of the local clock of each base station from the standard time reference.
[0103] The above is as described in the present invention. Figure 1 The terminal positioning method disclosed in the embodiments described above can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in one or more embodiments of the present invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in one or more embodiments of the present invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0104] The electronic device can also perform Figure 1 The terminal positioning method described herein will not be elaborated further here.
[0105] This invention also provides a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device including multiple applications, enable the portable electronic device to perform... Figure 1 The method of the illustrated embodiment will not be described in detail here.
[0106] This invention also provides a computer program product stored in a storage medium and executed by at least one processor to implement... Figure 1 The method of the illustrated embodiment will not be described in detail here.
[0107] Of course, in addition to the software implementation, the electronic device of the present invention does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0108] In summary, the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of the present invention should be included within the scope of protection of one or more embodiments of the present invention.
[0109] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0110] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined in this embodiment of the invention, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0111] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0112] The various embodiments in this invention 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, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.< / apiversion>
Claims
1. A terminal positioning method, characterized in that, Applied to a terminal, the method includes: Receive the ranging code decoding key issued by the core network; the ranging code decoding key is generated and issued by the core network after the terminal user has signed up for the autonomous positioning service, and corresponds to the encryption key used by the base station to encrypt the original ranging code; Receive encrypted ranging codes broadcast by at least four base stations; wherein, the encrypted ranging code is a signal generated by each base station encrypting the original ranging code generated by each base station based on its own cell identifier and the encryption key; Using the ranging code decoding key, the received encrypted ranging code is decrypted to obtain the original ranging code corresponding to each base station. Based on the original ranging code, a locally generated copy ranging code with the same structure as the original ranging code is aligned with the original ranging code to obtain the propagation time of the encrypted ranging code signal from each base station to the terminal. The pseudorange with each base station is calculated based on the propagation time. The high-precision geographic location and clock correction information of the at least four base stations are obtained. Based on the pseudorange, the high-precision geographic location and the clock correction information corresponding to the at least four base stations respectively, a system of equations is constructed with the three-dimensional coordinates of the terminal and the clock deviation as unknowns. The location coordinates of the terminal are determined by solving the system of equations. The clock correction information is used to represent the deviation of the local clock of each base station from the standard time reference.
2. The method according to claim 1, characterized in that, The ranging code decoding key sent by the receiving core network includes: During the network registration process, a registration acceptance message is received from the core network; the registration acceptance message carries the ranging code decoding key; wherein, the core network generates and distributes the ranging code decoding key based on the query results of the terminal user's subscription data; a specified field in the subscription data is used to identify whether the terminal user has subscribed to the autonomous positioning service.
3. The method according to claim 1, characterized in that, The acquisition of high-precision geographical location and clock correction information of the at least four base stations includes: The system receives Radio Resource Control (RRC) connection reconfiguration signaling sent by the serving base station. The RRC connection reconfiguration signaling carries auxiliary data for positioning. The auxiliary data includes cell identifiers of the serving cell and at least one neighboring cell, and for each cell identifier, it is configured with corresponding high-precision geographic location and clock correction information of the base station antenna. The serving base station is the currently connected base station. The serving cell is the currently connected cell. The RRC connection reconfiguration signaling is parsed to obtain the auxiliary data, and the high-precision geographical location and clock correction information corresponding to the at least four base stations are obtained based on the cell identifier in the auxiliary data.
4. The method according to claim 1, characterized in that, The step of aligning the locally generated, identically structured, copying ranging code with the original ranging code and performing code phase alignment with the original ranging code to obtain the propagation time of the encrypted ranging code signal from each base station to the terminal includes: Slide the phase of the copied ranging code on the time axis, and calculate the correlation coefficient between the copied ranging code and the decrypted original ranging code for each phase point; wherein, the correlation coefficient is used to quantify the degree of similarity in waveform between the sequences of the copied ranging code and the original ranging code. When the correlation coefficient reaches its maximum value, it is determined that the code elements of the copied ranging code are aligned with those of the original ranging code, and the sliding phase of the copied ranging code is determined as the propagation time of the encrypted ranging code signal from each base station to the terminal.
5. The method according to claim 1, characterized in that, Before receiving the encrypted ranging code broadcast by at least four base stations, the method further includes: Signal measurements are taken from surrounding base stations to identify available base stations with signal strengths higher than a preset threshold; From the available base stations, candidate base stations that meet preset screening conditions are selected; the preset screening conditions are: the encrypted ranging code broadcast by the candidate base station can be successfully decrypted by the terminal using the ranging code decoding key, and the high-precision geographical location and clock correction information of the candidate base station are included in the signaling issued by the serving base station; the serving base station is the currently connected base station; The receiving of encrypted ranging codes broadcast by at least four base stations includes: Receive encrypted ranging codes broadcast by at least four of the candidate base stations.
6. The method according to claim 5, characterized in that, Before constructing the equation set based on the pseudorange, the high-precision geographic location, and the clock correction information corresponding to the at least four base stations, the method further includes: Based on the received signal strength, the serving base station and the three strongest non-co-located neighboring cell base stations are selected from the candidate base stations for positioning calculation to obtain the approximate location coordinates of the terminal. Based on the rough location coordinates, different combinations of base stations are iteratively selected from the candidate base stations for evaluation, and the combination of base stations that minimizes or nearly minimizes the positioning accuracy attenuation factor PDOP is determined as the target base station combination for positioning. The construction of the system of equations with the three-dimensional coordinates of the terminal and the clock deviation as unknowns includes: Based on the pseudorange, high-precision geographical location and clock correction information of each base station in the target base station combination, a system of equations is constructed with the three-dimensional coordinates and clock deviation of the terminal as unknowns.
7. A terminal positioning device, characterized in that, Applied to a terminal, the device includes: The first receiving module is used to receive the ranging code decoding key issued by the core network; the ranging code decoding key is generated and issued by the core network after the terminal user has signed up for the autonomous positioning service, and corresponds to the encryption key used by the base station to encrypt the original ranging code. The second receiving module is used to receive encrypted ranging codes broadcast by at least four base stations; wherein the encrypted ranging code is a signal generated by each base station encrypting the original ranging code generated by each base station based on its own cell identifier and the encryption key; The decryption module is used to decrypt the received encrypted ranging code using the ranging code decoding key to obtain the original ranging code corresponding to each base station. Based on the original ranging code, a locally generated copy ranging code with the same structure as the original ranging code is performed with the original ranging code for code phase alignment to obtain the propagation time of the encrypted ranging code signal from each base station to the terminal. The pseudorange with each base station is calculated based on the propagation time. The positioning module is used to acquire the high-precision geographical location and clock correction information of the at least four base stations, and based on the pseudorange, the high-precision geographical location and the clock correction information corresponding to the at least four base stations respectively, to construct a system of equations with the three-dimensional coordinates of the terminal and the clock deviation as unknowns, and to determine the position coordinates of the terminal by solving the system of equations; the clock correction information is used to represent the deviation of the local clock of each base station from the standard time reference.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store computer-executable instructions that, when executed by a processor, implement the steps of the method described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1 to 6.