Mobile terminal positioning method and system, server and electronic equipment
By using K-means clustering and KNN model through multi-feature machine learning, and dynamically adjusting the grid cells, the problems of low positioning accuracy and high complexity in existing technologies are solved, achieving efficient and accurate mobile terminal positioning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-04-10
Smart Images

Figure CN121842820A_ABST
Abstract
Description
Technical Field
[0001] This application relates to mobile terminal positioning methods, systems, servers, and electronic devices, and belongs to the field of communication technology. Background Technology
[0002] Location services have always been an important research direction in mobile communications. By obtaining terminal location data through mobile networks and analyzing and processing the terminal's location feature parameters, various related information services can be provided to users. Commonly used mobile communication positioning methods include the following: One approach utilizes GNSS, which offers high positioning accuracy; however, signal weakness in heavily obstructed areas leads to decreased accuracy. Another approach is based on wireless mobile networks, primarily falling into two categories: ranging model positioning and fingerprint positioning. Ranging model positioning includes schemes based on TOA, TDOA, and AOA.
[0003] Definitions: 1) TOA: The base station estimates the location of the target by calculating the time of arrival of the signal, converts the time into distance, forms a circle with the base station as the center and the measured distance as the radius, and uses at least 3 base stations to obtain an overlapping area for positioning.
[0004] 2) TDOA: When it is difficult for the base station and the terminal to maintain strict time synchronization, the location can also be determined by calculating the time difference of the signal arriving at multiple base stations. TDOA requires at least 3 base stations. By measuring the time of the signal arriving at any two base stations, a hyperbola is formed with the base station as the focus and the distance difference as the major axis. The intersection of the hyperbola is the terminal location.
[0005] 3) AOA: The base station is equipped with a directional antenna. Multiple base stations measure the direction of the reference signal transmitted by the terminal to the base station. Each direction is from the terminal to the base station. By measuring with multiple base stations, multiple straight lines can be obtained. The intersection of multiple straight lines is the estimated position of the terminal to be located. The terminal position is obtained by solving a system of equations.
[0006] 4) Fingerprint localization: Terminal localization is achieved by matching the received signal fingerprint information with a pre-constructed location fingerprint database. The main process consists of two parts: an offline training phase and an online fingerprint matching and localization phase. In the offline phase, the base station captures signal fingerprints and collects fingerprints at various locations within the monitoring area. In the online localization phase, the terminal fingerprint is matched with the location fingerprint database to obtain the final location estimate.
[0007] The main technical defects of the aforementioned existing technology are: TOA and TDOA require location information from at least three base stations to estimate the location of the terminal under test, and have high time synchronization requirements. AOA-based positioning schemes have high requirements for signal angles, necessitating large antenna arrays at the base station, significantly increasing computational complexity and hardware costs. Ranging-based positioning schemes have slightly lower positioning accuracy and are difficult to meet the accuracy requirements of specific application scenarios.
[0008] Fingerprint localization methods cannot simultaneously minimize server fingerprint database storage space and improve online matching speed while maintaining fingerprint localization accuracy. They also struggle to effectively build a fingerprint database during offline training. Consequently, the signal strength received by the mobile terminal from the base station varies over time. This time-varying characteristic of signal strength makes the matching between fingerprint and localization information non-unique and uncertain, leading to localization errors. Therefore, considering signal strength as the primary localization feature results in insufficient accuracy. Furthermore, fingerprint localization accuracy does not improve with an excessive number of associated base stations. As the number of base stations increases, the number of fingerprint features also increases. The localization algorithm needs to traverse each reference point to calculate the distance between its corresponding fingerprint sample and the test sample, measuring their similarity, increasing algorithm complexity and terminal power consumption.
[0009] In conclusion, existing technologies can no longer meet people's needs and urgently need to be improved. Summary of the Invention
[0010] This application addresses some of the shortcomings mentioned in the background technology by providing a mobile terminal positioning method, system, server, and electronic device, thus solving technical problems such as unreliable positioning data and low efficiency of online algorithm queries in the prior art.
[0011] The embodiments of this application are implemented using the following technical solutions: According to one aspect of the embodiments of this application, a mobile terminal positioning method based on multi-feature machine learning is provided, applied to a server, comprising: acquiring multi-dimensional data information from base stations, the multi-dimensional data information being derived from multiple reference points within the positioning area collected by the mobile terminal; preprocessing the multi-dimensional data information; classifying the preprocessed data for use as a training set and a test set; selecting reference points from the training set as initial cluster centers; clustering the centralized data training set using a K-means clustering algorithm to generate a first assigned cluster; sorting the reference points according to the signal strength of associated base stations to generate a base station signal strength sequence; iterating the first assigned cluster repeatedly according to the base station signal strength sequence until the cluster center remains unchanged, and outputting a second assigned cluster; dividing the positioning area using the second cluster center of the second assigned cluster as a grid center, and assigning reference points to corresponding grids; constructing fingerprint database information; calculating the distance between the mobile terminal fingerprint information and the fingerprint database information using a KNN model to obtain the mobile terminal positioning result.
[0012] According to at least one specific embodiment of the present application, the acquisition of multidimensional data information from the base station further includes: the multidimensional data information is collected by the mobile terminal using multiple reference points randomly selected by the mobile terminal in the positioning area, and the parameters collected at the reference points include reference signal received power, horizontal angle of arrival, vertical angle of arrival, and time advance, and the parameters include relevant information from multiple associated base stations.
[0013] According to at least one specific embodiment of the present application, the data preprocessing of the multidimensional data information further includes: calculating the mean of the multidimensional data information collected from multiple reference points and obtaining the corresponding mean; subtracting the mean from the original data to obtain centered data; calculating the standard deviation of each parameter; dividing the centered data by the standard deviation; and randomly classifying the calculation results for use as a test set and a training set.
[0014] According to at least one specific embodiment of the present application, the step of selecting reference points from the training set as initial cluster centers, and performing clustering processing on the training set of the centered data based on the K-means clustering algorithm to generate a first assigned cluster further includes: selecting reference points from the training set as the first cluster centers, calculating the Euclidean distance from the remaining reference points in the training set to the first cluster center, obtaining the cluster with the closest distance to the reference points, and classifying the reference points to the first cluster centers to generate a first assigned cluster; repeating the iterative process of generating the first assigned cluster until the cluster centers have not changed, ending the iteration process, and outputting a second assigned cluster.
[0015] According to at least one specific embodiment of the present application, the step of dividing the positioning area by taking the second cluster center of the second belonging cluster as the grid center and assigning the reference points to the corresponding grids specifically involves: taking the area composed of the reference points of each cluster center as a grid unit, and numbering each grid unit according to the K-means clustering results.
[0016] According to at least one specific embodiment of the present application, the step of sorting the signal strength of the reference point and the associated base station to generate a base station signal strength sequence further includes: sorting the signal strength values of the reference point and the associated base station in descending order of strength, retaining the top N base stations with the strongest signal strength according to the signal strength magnitude; calculating the ratio of the top N base stations to the base station signal strength sequence to obtain the base station loss rate; if the base station loss rate is greater than a preset loss rate threshold, then the corresponding base station is discarded in the reference point.
[0017] According to at least one specific embodiment of the present application, the step of constructing fingerprint database information and calculating the distance between the mobile terminal fingerprint information and the fingerprint database information through the KNN model to obtain the mobile terminal positioning result is specifically as follows: the distance between the mobile terminal fingerprint and the fingerprint database information is calculated through the KNN model, the distance between the reference point signal feature vector to be measured and all grid signal feature vectors is calculated, the feature vector with the smallest distance is selected, and the average value is taken to obtain the mobile terminal positioning result.
[0018] According to another aspect of the embodiments of this application, a mobile terminal positioning system based on multi-feature machine learning is provided to implement the mobile terminal positioning method based on multi-feature machine learning, comprising: a multi-dimensional data information preprocessing module, which acquires multi-dimensional data information from a base station, wherein the multi-dimensional data information comes from multiple reference points within the positioning area collected by the mobile terminal, performs data preprocessing on the multi-dimensional data information, classifies the preprocessed data, and uses it as a training set and a test set; and a clustering algorithm first affiliation cluster generation module, which selects reference points from the training set as initial cluster centers, and performs clustering on the training set of the centered data based on the K-means clustering algorithm. The system performs several steps: First, it generates a first-category cluster. Second, it generates a second-category cluster by sorting the signal strength of reference points and associated base stations, generating a base station signal strength sequence, and iterating the first-category cluster repeatedly until the cluster center remains unchanged, then outputting the second-category cluster. Third, it uses the second cluster center of the second-category cluster as the grid center to divide the positioning area, assigning reference points to corresponding grids. Fourth, it constructs a fingerprint database and calculates the distance between the mobile terminal's fingerprint information and the fingerprint database data using a KNN model to obtain the mobile terminal's positioning result.
[0019] According to another aspect of the embodiments of this application, a server is provided, wherein the server is provided with the aforementioned mobile terminal positioning system based on multi-feature machine learning.
[0020] According to another aspect of the embodiments of this application, a mobile terminal positioning method based on multi-feature machine learning is provided, applied to a mobile terminal, comprising: the mobile terminal collecting multi-dimensional data information from multiple reference points in the positioning area, and sending the multi-dimensional data information to a base station; the mobile terminal obtaining fingerprint database data information or a trained model file from a server, calculating the distance between the mobile terminal fingerprint information and the fingerprint database data information locally on the mobile terminal using a KNN model, and obtaining the mobile terminal positioning result.
[0021] According to other aspects of the embodiments of this application, a mobile terminal is provided, wherein the mobile terminal is provided with a multi-dimensional data information preprocessing module, the multi-dimensional data information preprocessing module is used to collect multi-dimensional data information from multiple reference points in the positioning area and send the multi-dimensional data information to a base station, and a mobile terminal positioning module: the mobile terminal positioning module obtains preset fingerprint database data information or trained model file from a server, calculates the distance between the mobile terminal fingerprint information and the fingerprint database data information locally on the mobile terminal using a KNN model, and obtains the mobile terminal positioning result.
[0022] According to other aspects of the embodiments of this application, an electronic device is provided, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method.
[0023] The beneficial technical effects of the embodiments of this application are: This application embodiment is based on multi-feature machine learning. It preprocesses the multi-dimensional data information collected by the mobile terminal in the positioning area and sends the preprocessed data to the server through the base station. The server classifies the preprocessed data and uses it as a training set and a test set. The K-means clustering algorithm is used to cluster the data and simultaneously reduce the dimensionality of the data. Based on the dimensionality-reduced data, the grid cells are dynamically divided. The favorable positioning base station is selected by combining the average signal strength of the base station signal and the reference point association base station loss rate in the positioning area. The multi-dimensional data information features are fully utilized to characterize the grid cells, and an offline fingerprint database is constructed to match the fingerprint data of the mobile terminal to achieve the positioning of the mobile terminal.
[0024] This application utilizes the clustering function of the K-means algorithm to reduce the dimensionality of multidimensional data, thereby reducing the amount of fingerprint database data, avoiding increased algorithm complexity and mobile terminal power consumption, preventing excessive redundant and noisy data in a large number of fingerprint samples, avoiding interference with the accuracy of fingerprint location recognition, and improving the online query efficiency of the location recognition algorithm. While achieving dimensionality reduction through the K-means clustering algorithm, the grid cells are also dynamically divided. Based on the distribution changes of the actual collected data, the grid cells are divided into irregular grids, making the algorithm more flexible to adapt to different environments and application requirements. The K-means cluster centers, as grid nodes, can more accurately capture the distribution of reference points, improving the accuracy and reliability of positioning.
[0025] This application embodiment uses test data performance evaluation, with positioning error as the evaluation index of the system's positioning performance, to demonstrate that the multi-feature grid representation method of this application embodiment can effectively improve the positioning accuracy of mobile terminals compared to the traditional single-feature grid representation method. In particular, this application embodiment performs dimensionality reduction processing on fingerprint data for the multi-feature grid representation method, which improves the positioning accuracy of mobile terminals while reducing the computational overhead of the multi-feature grid representation method, and has significant progress compared to the prior art. Attached Figure Description
[0026] Figure 1 This is an architecture diagram of an embodiment of this application in a specific application scenario.
[0027] Figure 2 This is a flowchart of steps S1 to S5.
[0028] Figure 3 This is a system architecture diagram of an embodiment of this application.
[0029] Figure 4 This is a flowchart for evaluating data performance during the offline and online testing phases.
[0030] Figure 5 It is a coordinate map of the cumulative distribution of positioning errors for single-feature and multi-feature raster characterization methods.
[0031] Figure 6 This is a coordinate map showing the cumulative distribution of positioning errors before and after K-means dimensionality reduction.
[0032] Figure 7 This is a schematic diagram of the electronic device. Detailed Implementation
[0033] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application / disclosure and are not intended to limit the scope of the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present application are shown in the accompanying drawings, not the entire structure.
[0034] Glossary and English-Chinese translation:
[0035] like Figure 1 The main application scenarios shown in the embodiments of this application, and the main technical defects of the prior art are as follows: TOA and TDOA require location information from at least three base stations to estimate the location of the terminal under test, and have high time synchronization requirements. AOA-based positioning schemes have high requirements for signal angles, necessitating large antenna arrays at the base station, significantly increasing computational complexity and hardware costs. Ranging-based positioning schemes have slightly lower positioning accuracy and are difficult to meet the accuracy requirements of specific application scenarios.
[0036] Fingerprint localization methods cannot effectively build a fingerprint database during the offline training phase. To ensure fingerprint localization accuracy, it is necessary to minimize the storage space of the server fingerprint database and improve the online matching calculation speed.
[0037] The signal strength value received by the terminal from the base station will vary over time. The time-varying characteristics of the signal strength make the matching between fingerprint information and positioning information non-unique and uncertain, resulting in positioning errors. Therefore, considering signal strength as the main feature of positioning makes the positioning less accurate.
[0038] When the number of associated base stations is too large, the fingerprint positioning accuracy does not improve with the increase in the number of associated base stations. As the number of base stations increases, the number of fingerprint features also increases. The positioning algorithm needs to traverse each reference point to calculate the distance between its corresponding fingerprint sample and the test sample, and measure their similarity, which increases the complexity of the algorithm and the power consumption of the terminal.
[0039] The application scenario of this application mainly addresses the problem of how to reduce the amount of fingerprint database data while ensuring fingerprint positioning accuracy with multi-dimensional data information: Fingerprint localization based on a single signal feature not only has limitations in positioning accuracy but also suffers from poor noise resistance. A single signal feature is susceptible to noise interference, rendering the single feature relied upon for localization unreliable and leading to decreased accuracy. Large fingerprint databases contain redundant and noisy data, interfering with the accuracy of fingerprint localization and increasing the computational complexity and storage requirements of the algorithm, thus affecting the online query efficiency of the localization and recognition algorithm. Traditional rasterization divides the localization area into regular grids, and the positioning accuracy is limited by the grid size. Larger grid cells reduce positioning accuracy; smaller grid cells, while improving accuracy, increase computational complexity and system overhead. Therefore, fixed-size grid cells lack flexibility and cannot adapt to changing localization environments.
[0040] exist Figure 1 In this process, the mobile terminal establishes communication with base stations 1, 2, ..., N. The mobile terminal collects multiple reference points within the positioning area and obtains multidimensional data information from the base stations. The KNN model stores the fingerprint database data in the positioning server, either in memory or using other data structures, to facilitate the calculation of the distance between the test data and the fingerprint database data during the offline phase. For example: (x1,y1)RSRP1,hAOA1,vAOA1,TA1 (x2,y2)RSRP2,hAOA2,vAOA2,TA2 ... (xM,yM)RSRPM,hAOAM,vAOAM,TAM The server performs online matching based on fingerprint database information. Each database attribute includes base station number, grid number, filtered signal strength, signal angle, and timing advance characteristics, such as (?,?). RSRP i , hAOA i , vAOA i , TA i , The coordinates (x, y) of the mobile terminal are obtained by online matching using the KNN matching algorithm. i ,y i ).
[0041] Example 1: In this embodiment, the server acts as the main communication entity for communication interaction and data processing. The mobile terminal (user equipment, mobile phone, tablet computer, desktop computer, etc.) is responsible for data collection and location request. The server receives multidimensional data information from the mobile terminal, preprocesses the multidimensional data information, runs machine learning algorithms, constructs fingerprint database data information or trains models, and generates a database or model file that can be used for online location.
[0042] like Figure 2 The mobile terminal localization method based on multi-feature machine learning shown is applied to a server and includes: Step S1: Obtain multidimensional data information from the base station. The multidimensional data information comes from multiple reference points within the positioning area collected by the mobile terminal. Perform data preprocessing on the multidimensional data information, classify the preprocessed data, and use it as a training set and a test set.
[0043] Step S2: Select reference points from the training set as initial cluster centers, and perform clustering processing on the training set of the centered data based on the K-means clustering algorithm to generate the first assigned cluster.
[0044] Step S3: Sort the signal strength of the reference point and the associated base station to generate a base station signal strength sequence. Repeatedly iterate the first home cluster according to the base station signal strength sequence until the cluster center has not changed, and output the second home cluster.
[0045] Step S4: Divide the positioning area using the second cluster center of the second belonging cluster as the grid center, and assign the reference point to the corresponding grid.
[0046] Step S5: Construct fingerprint database information, calculate the distance between the mobile terminal fingerprint information and the fingerprint database information using the KNN model, and obtain the mobile terminal positioning result.
[0047] The technical solutions provided in steps S1 to S5 are based on a multi-feature grid representation method. By using the K-means clustering algorithm on the server for compression and dimensionality reduction, the storage space of the server and mobile terminal is reduced, improving the efficiency of online matching calculations. Dynamic grid distribution partitioning allows the communication algorithm to adapt more flexibly to different environments and application requirements. Using the K-means cluster centers as grid nodes can more accurately capture the reference distribution, improving the accuracy and reliability of positioning. Step S1 collects multi-dimensional data information from multiple reference points in the positioning area. This multi-dimensional data information includes... , , as well as Each parameter vector includes relevant information from multiple associated base stations, avoiding fluctuations caused by interference in positioning algorithms based on single information features, which would lead to reduced positioning accuracy. Step S1 preprocesses and classifies the multidimensional data information. The results of preprocessing and classification can be used as training and testing sets, laying a data foundation for subsequent steps to smoothly process multidimensional data information. Step S2 uses the K-means clustering algorithm on the server to cluster the preprocessed data, achieving data dimensionality reduction while clustering. Step S3 generates corresponding irregular grid regions based on the clustering results, ensuring that the grid division can flexibly adapt to environmental changes and achieving dynamic grid adaptation. In step S4, the distance between the mobile terminal fingerprint information and the fingerprint database information is calculated using the KNN model to obtain the mobile terminal positioning result, realizing accurate positioning of the mobile terminal through communication fingerprints. Traditional rasterization divides the positioning area into regular grids, and the positioning accuracy is limited by the grid size. If the grid cell is large, the positioning accuracy will decrease; if the grid cell is small, although the accuracy can be improved, the computational complexity and system overhead will increase. Steps S1 to S4 achieve dynamic adaptation of irregular grid sizes, avoiding the defects caused by regular network shapes.
[0048] Preferably, in step S1, acquiring multidimensional data information from the base station further includes: The multidimensional data information is collected by the mobile terminal using multiple reference points randomly selected by the mobile terminal in the positioning area. The parameters collected at the reference points include reference signal received power, horizontal angle of arrival, vertical angle of arrival, and time advance. The parameters include relevant information from multiple associated base stations.
[0049] In step S1, the server performs data preprocessing on the multidimensional data information, further including: Step S11: Calculate the mean of the multidimensional data information collected from multiple reference points and obtain the corresponding mean. Subtract the mean from the original data to obtain the centered data. Step S12: Calculate the standard deviation of each parameter, divide the centered data by the standard deviation, and randomly classify the calculation results to be used as the test set and training set.
[0050] For example, during steps S1 to S2, the range of sampling points is determined. The square area is the positioning area, which contains all sampling points. Within this area, the mobile terminal randomly selects... Multidimensional data information is collected from each reference point, and the set of reference points is denoted as . Mobile terminal at reference point The collected parameters include , , as well as Each parameter vector includes relevant information from multiple associated base stations, such as... , Indicates that the terminal is at the reference point Received from base station The reference signal received power. After the mobile terminal collects the parameters, it sends the collected data back to the corresponding base station via the uplink. The base station then reports the data to the positioning server via the aggregation link (fiber optic cable). The server then compiles statistics on the terminal's data collection points. The mean of each parameter , , as well as The original data was digitized by subtracting its corresponding mean, and then the standard deviation of each parameter was calculated. , , as well as Then, the centered data is divided by the corresponding standard deviation, and the processed data is randomly classified. 80% of the data can be used to train the fingerprint database, and the remaining 20% can be used to evaluate the test dataset.
[0051] In step S1, the server obtains multidimensional data information from the base station, further optimizes the multidimensional data information, performs preprocessing and random classification to meet the testing and training requirements of machine learning and clustering operations. The parameters collected by the mobile terminal at the reference point include various different parameters, and each parameter vector includes relevant information from multiple associated base stations. Therefore, further processing of the multidimensional data information is required on the server side. The purpose of data centralization is to eliminate the influence of different features due to their different dimensions and value ranges, enabling a fair assessment of the importance of each feature. Centralized data can accelerate the convergence speed of model training, making the training process more efficient and stable.
[0052] Preferably, in step S2, the step of selecting reference points from the training set as initial cluster centers and performing clustering processing on the centralized data training set based on the K-means clustering algorithm to generate the first assigned cluster further includes: Step S21: Select a reference point from the training set as the center of the first cluster, calculate the Euclidean distance from the remaining reference points in the training set to the center of the first cluster, obtain the cluster with the closest distance to the reference point, and classify the reference point to the center of the first cluster to generate the first assigned cluster.
[0053] Step S22: Repeat the iterative process of generating the first assigned cluster until the cluster center has not changed, then end the iterative process and output the second assigned cluster.
[0054] Step S2 performs clustering on the training set of centralized data and outputs multidimensional data information of multiple cluster centers as fingerprint database data information through repeated iterations, thereby reducing the amount of data of reference points in the fingerprint database. That is, step S2 uses the clustering method to achieve dimensionality reduction of data.
[0055] For example, random selection The data used to train the fingerprint database, namely: multidimensional data information of 80% of the reference points, from... Choose any of the reference points. A reference point is used as the center of the initial cluster, and the center of the initial cluster is denoted as .
[0056] Residual calculation based on multiple features Euclidean distance from the reference point to the initial cluster center:
[0057] in , , For the first The reference point to the first The signal strength, angle, and timing advance of each base station are used to determine the cluster closest to the reference point using the formula mentioned above, and the reference point is then assigned to that cluster. After assigning each reference point to its cluster, the cluster center is recalculated, and the iteration process is repeated. The algorithm checks if the cluster center has changed after the iteration. If it has, the iteration process from arbitrarily selected reference points to the cluster center is repeated. If the cluster center has not changed after the iteration, the iteration stops, and the algorithm terminates.
[0058] In this exemplary implementation, the output The multidimensional data information of each cluster center is used as fingerprint database data information, and the amount of fingerprint database data starts from... The reference point dropped to Using a reference point, dimensionality reduction of the data was achieved.
[0059] Preferably, in step S4, the positioning area is divided by taking the second cluster center of the second belonging cluster as the grid center and the reference points are assigned to the corresponding grids. Specifically, the area formed by the reference points of each cluster center is taken as a grid unit, and each grid unit is numbered according to the K-means clustering results.
[0060] In step S4, the step of sorting the signal strengths of the reference point and the associated base station to generate a base station signal strength sequence further includes: Step S41: Sort the signal strength values of the reference point and the associated base station in descending order of strength, and retain the top N base stations with the strongest signal strength according to the signal strength magnitude.
[0061] Step S42: Calculate the ratio of the first N base stations to the base station signal strength sequence to obtain the base station loss rate. If the base station loss rate is greater than a preset loss rate threshold, then discard the corresponding base station in the reference point.
[0062] Step S4, based on the clustering results of steps S2 and S3, uses the center of the second cluster of the second assigned cluster as the grid center to divide the positioning area and assign reference points to the applied grid, thus achieving dynamic grid division. Compared to the uniform grid division in existing technologies, the dynamic adaptive grid division provided by step S3 will... Each cluster center serves as a raster center, and the region surrounding each cluster center, representing each type of reference point, constitutes a raster cell. The total number of raster cells is [number missing]. Each grid cell is numbered based on the K-means clustering results. Set the position By dynamically dividing the grid, the K-means algorithm assigns reference points to corresponding grids, forming irregular grid regions. Dynamic grid division more closely matches the actual distribution of reference points, thus significantly improving the accuracy and reliability of positioning. In areas with dense reference points, setting denser, smaller grid cells provides more refined positioning services, while in areas with sparse reference points, setting larger grid cells effectively reduces resource consumption. When the base station layout or reference point environment changes, the K-means algorithm can be re-run to determine the new grid center location, and the grid structure can be adjusted accordingly. The dynamic grid division process ensures that grid division can flexibly adapt to environmental changes, achieving dynamic adaptability and thus guaranteeing the accuracy of the positioning system in new environments.
[0063] Steps S2 to S4, after dynamic grid partitioning, also provide a hybrid base station selection strategy for the dimensionality-reduced grid. A base station signal strength sequence is generated by sorting the signal strength values of each reference point and its associated base station in descending order of strength. , ,in The strongest signal strength value is used as the reference point, with other signal strength values decreasing sequentially. The strongest signal strength value in the base station signal strength sequence is retained. For each associated base station, calculate the loss rate of these associated base stations. The base station loss rate can be expressed as:
[0064] It is the total number of signal samples taken at the reference point. The reference point is the point at which the base station can be measured throughout the entire cycle. The number of signal strength values. Set the base station loss rate threshold as follows: If the base station loss rate is greater than the loss rate threshold, that is: If the base station and its related feature parameters are not found, the reference point discards the base station and its features; otherwise, the base station features are retained.
[0065] Preferably, in step S5, the construction of the fingerprint database information and the calculation of the distance between the mobile terminal fingerprint information and the fingerprint database information using the KNN model to obtain the mobile terminal positioning result are specifically as follows: the distance between the mobile terminal fingerprint and the fingerprint database information is calculated using the KNN model, the distance between the reference point signal feature vector to be measured and all grid signal feature vectors is calculated, the feature vector with the smallest distance is selected, and the average value is taken to obtain the mobile terminal positioning result.
[0066] Step S5 performs online matching based on the fingerprint database information constructed in the previous steps. Each database attribute includes base station number, grid number, filtered signal strength, signal angle, and timing advance features. The KNN model stores the fingerprint database information in the positioning server, either in memory or using other data structures, to facilitate the calculation of the distance between the test data and the fingerprint database data in the offline stage. The specific online matching process is as follows: The distance between the mobile terminal fingerprint and the database fingerprint is calculated using the KNN model. The distance between the mobile terminal fingerprint and the database fingerprint can be expressed as:
[0067] in The signal feature vector of the point to be measured. This refers to the processed raster signal feature vector in the database. Calculate the distances from the feature vector of the signal at the point to be measured to the feature vectors of all grid signals, and select the one with the smallest distance. Each feature vector corresponds to a grid position information of the following features: ,in Sort by distance for the th The position of each grid cell, the K value is usually 2 or 3, for The final positioning result is obtained by averaging the values of the grid positions:
[0068] It is readily understood that this embodiment can integrate the mobile terminal positioning method applied to the server into a software system or a hardware system to form a system, device, or equipment that combines software and hardware. For example, this embodiment can be integrated into a server in the prior art through a combination of software and hardware to form a positioning server for implementing the embodiments of this application.
[0069] Example 2: This embodiment discloses a positioning method in which the communication subject is a mobile terminal, and a mobile terminal implementing the method. The difference from Embodiment 1 is that the communication subject in this specific embodiment is a mobile terminal, and the method steps include: The mobile terminal collects multidimensional data information from multiple reference points in the positioning area and sends the multidimensional data information to the base station; The mobile terminal obtains fingerprint database data or trained model files from the server, and calculates the distance between the mobile terminal's fingerprint information and the fingerprint database data using a KNN model locally on the mobile terminal to obtain the mobile terminal's positioning result.
[0070] Embodiment 2 also discloses a mobile terminal, which includes a multi-dimensional data information preprocessing module. This module collects multi-dimensional data information from multiple reference points in the positioning area and sends the multi-dimensional data information to a base station. Additionally, a mobile terminal positioning module is also included. The mobile terminal positioning module obtains preset fingerprint database data information or trained model files from the server, and calculates the distance between the mobile terminal fingerprint information and the fingerprint database data information locally on the mobile terminal using the KNN model to obtain the mobile terminal positioning result.
[0071] This embodiment describes how a mobile terminal uses the calculation results from a server during the offline phase to determine its real-time location. The mobile terminal, as the communication subject, performs signal acquisition and fingerprint database or model file matching, matching the locally measured real-time fingerprint with the fingerprint database obtained from the server to calculate its location within the mobile terminal. Using the mobile terminal as the primary data processor has the advantages of fast positioning speed and privacy protection because the location information does not leave the mobile terminal's local storage. However, the disadvantages are also obvious: it accelerates the mobile terminal's power consumption and consumes computing resources. The local fingerprint database also needs to be updated regularly, increasing the difficulty of operation and maintenance. Therefore, this specific implementation is relatively rare. In practice, the establishment of the fingerprint database during the offline phase and the data analysis and calculation during the online phase are often performed on a server.
[0072] like Figure 3As shown, this application provides a mobile terminal positioning system based on multi-feature machine learning, used to implement the mobile terminal positioning method based on multi-feature machine learning described in any specific embodiment of this application, including: The multidimensional data information preprocessing module acquires multidimensional data information from the base station. The multidimensional data information is collected by the mobile terminal from multiple reference points in the positioning area. The module preprocesses the multidimensional data information and classifies the preprocessed data for use as a training set and a test set. The first clustering generation module of the clustering algorithm selects reference points from the training set as initial cluster centers, and performs clustering processing on the centralized data training set based on the K-means clustering algorithm to generate the first cluster. The second-home cluster generation module of the clustering algorithm sorts the signal strength of the reference point and the associated base station to generate a base station signal strength sequence. It then iterates the first-home cluster repeatedly based on the base station signal strength sequence until the cluster center remains unchanged, and outputs the second-home cluster. The grid unit generation module divides the positioning area by using the second cluster center of the second belonging cluster as the grid center, and assigns reference points to the corresponding grids. The mobile terminal positioning module constructs fingerprint database information and calculates the distance between the mobile terminal fingerprint information and the fingerprint database information using a KNN model to obtain the mobile terminal positioning result.
[0073] like Figure 4 The test data performance evaluation shown includes multidimensional signal features and the location information of test reference points. The multidimensional signal features of the test reference points are used to output a positioning result based on the KNN algorithm. This positioning result is then compared with the location information of the reference points to obtain the positioning error. In this embodiment, the positioning error is used as the positioning performance indicator for evaluating the system.
[0074] like Figure 5 As shown, due to the complex and variable signal environment, positioning algorithms based on single signal features are highly susceptible to interference and fluctuations, leading to reduced positioning accuracy. Through comparative positioning experiments using single-feature and multi-feature data, it is demonstrated that the multi-feature grid representation method can improve the system's positioning accuracy. The experimental comparison results are shown in the figure. The cumulative distribution map intuitively reflects the probability distribution of positioning data and can clearly indicate the magnitude of the error accuracy. Under the same conditions, the single-feature grid representation method only uses a single signal feature. Multi-feature raster representation methods utilize more signal features, including , and Both methods use the positioning method provided in the embodiments of this application. The experimental results show that the positioning accuracy of multi-feature is improved compared with that of single-feature: the average positioning accuracy of single-feature is 28m, and the positioning error of 92% of the test points is less than 50m, while the average positioning accuracy of multi-feature is 21m, and the positioning error of 95.5% of the test points is less than 50m.
[0075] like Figure 6 As shown, Figure 6 The cumulative error distribution before and after dimensionality reduction is shown. Clearly, the distribution plot reveals that KMeans-KNN outperforms the KNN algorithm. KMeans-KNN achieves a test point localization error of less than 50m for 95.5% of the test points, while KNN only achieves this for 78%. This indicates that K-means-based dimensionality reduction effectively compresses data, with the dynamically adaptive grid partitioning-based KMeans-KNN method showing the best performance, achieving a test point localization error of less than 50m for 95.2%. This is essentially the same as the uniform grid partitioning-based KMeans-KNN method, while the average localization accuracy is significantly improved to 13m.
[0076] As can be seen from the above specific implementation methods, compared with the traditional method of using only signal strength features, the embodiments of this application provide a multi-feature grid representation method, which can improve the positioning accuracy of the system. The K-means-based compression method for multi-dimensional data reduces server storage space and improves online matching calculation efficiency. The embodiments of this application can generate high-precision positioning data, which can be used for operator network planning optimization, complaint location processing, and can also support marketing, user location profiling, and other scenarios, showing a very broad market prospect.
[0077] Example 3: like Figure 7 As shown, this application embodiment, in addition to providing a terminal positioning method and system based on multi-feature machine learning, also provides a corresponding electronic device and storage medium: An electronic device includes: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described in any specific embodiment.
[0078] A computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the method described in any specific embodiment of the present application.
[0079] Explanation of reference numerals in the attached figures: Electronic device 500, External device 514, Processor 516, Bus 518, Network adapter 520, I / O interface 522, Display device 524, Memory 528, RAM 530, Cache 532, Storage system 534, Program / Utility 540, Program module 542.
[0080] Figure 7The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this application. Typically, this electronic device could be a device within an electronic product based on the call file transfer verification method described above. The electronic device 500 is represented as a general-purpose computing device. Components of the electronic device 500 may include, but are not limited to: one or more processing units or processors 516, a memory 528, and a bus 518 connecting different system components (including the memory 528 and the processor 516). The bus 518 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus. The electronic device 500 typically includes various computer system readable media. These media can be any available media accessible to the electronic device 500, including volatile and non-volatile media, removable and non-removable media. Memory 528 may include computer system readable media in the form of volatile memory, such as RAM 530 and / or cache 532. Electronic device 500 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 534 may be used to read and write non-removable, non-volatile magnetic media (not shown in the figure, commonly referred to as "hard disk drives"). Although not shown in the figure, storage system 534 may provide disk drives for reading and writing to removable non-volatile disks (e.g., floppy disks, portable hard disks, hot-swappable storage media) and optical disk drives for reading and writing to removable non-volatile optical disks (e.g., CD-ROMs, DVD-ROMs, or other optical media). In these cases, each drive may be connected to bus 518 via one or more data media interfaces. Memory 528 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various specific embodiments of the present application. A program / utility 540 having a set (at least one) of program modules 542 may be stored, for example, in memory 528. Such program modules 542 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 542 typically perform the functions and / or methods described in the embodiments of this application.Electronic device 500 can also communicate with one or more external devices 514 (e.g., keyboard, pointing device, display device 524, etc.), and with one or more devices that enable a user to interact with electronic device 500, and / or with any device that enables electronic device 500 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through I / O interface 522. Furthermore, electronic device 500 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 520. Network adapter 520 communicates with other modules of electronic device 500 via bus 518. It should be understood that, although not shown in the figures, those skilled in the art can use other hardware and / or software modules in conjunction with electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems. Processor 516 executes various functional applications and data processing by running programs stored in memory 528, such as implementing the methods provided in any one or more embodiments of this application.
[0081] In the description of the embodiments of this application, the reference to terms such as "an embodiment," "example," "specific example," etc., means that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the embodiments of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0082] Furthermore, the technical solutions of the various implementation methods in this application can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the embodiments of this application.
[0083] All features disclosed in the embodiments of this application, or all steps in the disclosed methods or processes, may be combined in any way, except for mutually exclusive features and / or steps. Any feature disclosed in the specification of the embodiments of this application, unless specifically stated otherwise, may be replaced by other equivalent or similar alternative features. That is, unless specifically stated otherwise, each feature is merely one example of a series of equivalent or similar features. Throughout the specification, the same reference numerals indicate the same elements.
[0084] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification of embodiments (including the corresponding claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification of embodiments (including the corresponding claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of this application, and are not intended to limit them. Although the embodiments of this application have been described in detail with reference to the foregoing specific embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing specific embodiments, or equivalent substitutions can be made to some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the specific embodiments of this application.
Claims
1. A mobile terminal localization method based on multi-feature machine learning, applied to a server, characterized in that, include: Acquire multidimensional data information from the base station. The multidimensional data information comes from multiple reference points within the positioning area collected by the mobile terminal. Perform data preprocessing on the multidimensional data information, classify the preprocessed data, and use it as a training set and a test set. Reference points are selected from the training set as initial cluster centers. The training set of the centered data is then clustered using the K-means clustering algorithm to generate the first assigned cluster. The signal strength of the reference point and the associated base station are sorted to generate a base station signal strength sequence. The first home cluster is repeatedly iterated according to the base station signal strength sequence until the cluster center has not changed, and then the second home cluster is output. The positioning area is divided by using the center of the second cluster of the second belonging cluster as the grid center, and the reference points are assigned to the corresponding grids. A fingerprint database is constructed, and the distance between the mobile terminal's fingerprint information and the fingerprint database is calculated using a KNN model to obtain the mobile terminal's positioning result.
2. The mobile terminal positioning method based on multi-feature machine learning according to claim 1, characterized in that, The acquisition of multidimensional data information from the base station further includes: The multidimensional data information is collected by the mobile terminal using multiple reference points randomly selected by the mobile terminal in the positioning area. The parameters collected at the reference points include reference signal received power, horizontal angle of arrival, vertical angle of arrival, and time advance. The parameters include relevant information from multiple associated base stations.
3. The mobile terminal positioning method based on multi-feature machine learning according to claim 1, characterized in that, The data preprocessing of the multidimensional data information further includes: The mean of the multidimensional data collected from multiple reference points is calculated and the corresponding mean is obtained. The mean is then subtracted from the original data to obtain the centered data. Calculate the standard deviation of each parameter, divide the centered data by the standard deviation, and then randomly classify the results to use as the test set and training set.
4. The mobile terminal positioning method based on multi-feature machine learning according to claim 1, characterized in that, The step of selecting reference points from the training set as initial cluster centers and performing clustering processing on the centered data training set based on the K-means clustering algorithm to generate the first assigned cluster further includes: Select a reference point from the training set as the center of the first cluster, calculate the Euclidean distance from the remaining reference points in the training set to the center of the first cluster, obtain the cluster with the closest distance to the reference point, and classify the reference point to the center of the first cluster to generate the first assigned cluster; Repeat the iterative process of generating the first assigned cluster until the cluster center remains unchanged, then end the iteration process and output the second assigned cluster.
5. The mobile terminal positioning method based on multi-feature machine learning according to claim 1, characterized in that, The step of dividing the positioning area by taking the second cluster center of the second belonging cluster as the grid center and assigning reference points to the corresponding grids is as follows: taking the area formed by the reference points of each cluster center as a grid unit, and numbering each grid unit according to the K-means clustering results.
6. The mobile terminal positioning method based on multi-feature machine learning according to claim 1, characterized in that, The step of sorting the signal strengths of the reference point and the associated base station to generate a base station signal strength sequence further includes: The signal strength values of the reference point and associated base stations are sorted from strongest to weakest, and the top N base stations with the strongest signal strength are retained. The ratio of the first N base stations to the base station signal strength sequence is calculated to obtain the base station loss rate. If the base station loss rate is greater than a preset loss rate threshold, the corresponding base station is discarded in the reference point.
7. The mobile terminal positioning method based on multi-feature machine learning according to claim 1, characterized in that, The process of constructing the fingerprint database involves calculating the distance between the mobile terminal's fingerprint information and the fingerprint database information using a KNN model to obtain the mobile terminal's positioning result. Specifically: The distance between the mobile terminal's fingerprint and the fingerprint database is calculated using the KNN model. The distance from the feature vector of the reference point signal to all grid signal feature vectors is calculated. The feature vector with the smallest distance is selected, and the average value is taken to obtain the mobile terminal's positioning result.
8. A mobile terminal positioning system based on multi-feature machine learning, used to implement the mobile terminal positioning method based on multi-feature machine learning as described in any one of claims 1 to 7, characterized in that, include: The multidimensional data information preprocessing module acquires multidimensional data information from the base station. The multidimensional data information comes from multiple reference points within the mobile terminal's collection and positioning area. The module preprocesses the multidimensional data information, classifies the preprocessed data, and uses it as a training set and a test set. The first clustering generation module of the clustering algorithm selects reference points from the training set as initial cluster centers, and performs clustering processing on the centralized data training set based on the K-means clustering algorithm to generate the first cluster. The second-home cluster generation module of the clustering algorithm sorts the signal strength of the reference point and the associated base station to generate a base station signal strength sequence. It then iterates the first-home cluster repeatedly based on the base station signal strength sequence until the cluster center remains unchanged, and outputs the second-home cluster. The grid unit generation module divides the positioning area by using the second cluster center of the second belonging cluster as the grid center, and assigns reference points to the corresponding grids. The mobile terminal positioning module constructs fingerprint database information and calculates the distance between the mobile terminal fingerprint information and the fingerprint database information using a KNN model to obtain the mobile terminal positioning result.
9. A server, characterized in that, The server is equipped with the mobile terminal positioning system based on multi-feature machine learning as described in claim 8.
10. A mobile terminal localization method based on multi-feature machine learning, applied to a mobile terminal, characterized in that, include: The mobile terminal collects multidimensional data information from multiple reference points in the positioning area and sends the multidimensional data information to the base station; The mobile terminal obtains fingerprint database data or trained model files from the server, and calculates the distance between the mobile terminal's fingerprint information and the fingerprint database data using a KNN model locally on the mobile terminal to obtain the mobile terminal's positioning result.
11. A mobile terminal, characterized in that, The mobile terminal includes a multi-dimensional data information preprocessing module, which collects multi-dimensional data information from multiple reference points in the positioning area and sends the multi-dimensional data information to the base station. The mobile terminal also includes a positioning module. The mobile terminal positioning module obtains preset fingerprint database data or trained model files from the server, and calculates the distance between the mobile terminal fingerprint information and the fingerprint database data information locally on the mobile terminal using the KNN model to obtain the mobile terminal positioning result.
12. An electronic device, characterized in that, include: The system includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.