Positioning network model training method and user equipment positioning method
By training a localization network model for a feature encoder using pre-trained and fine-tuned datasets, the problems of low localization accuracy and high cost in existing technologies are solved, achieving high-precision and low-cost localization results.
Patent Information
- Application Number
- CN202511748575.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-03
AI Technical Summary
Existing CSI-based AI/ML localization methods suffer from low localization accuracy and high cost, especially when the environment changes, the localization accuracy deteriorates and the data acquisition cost increases sharply.
By acquiring pre-trained and fine-tuned datasets, the network is trained using the feature encoder in the pre-trained network model, and then fine-tuned using the fine-tuned dataset to build an initial localization network model. This reduces the need for coordinate information, improves localization accuracy, and lowers costs.
It achieves high-precision positioning at low cost by combining pre-training and fine-tuning, which reduces data acquisition costs and improves positioning accuracy.
Smart Images

Figure CN121603868A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of positioning technology, and in particular to a positioning network model training method and a user equipment positioning method. Background Technology
[0002] High-precision location services are a key foundational service for emerging industries such as the Internet of Things (IoT) and the Industrial Internet. In recent years, with the widespread deployment of wireless communication systems such as UWB, 5G, and Wi-Fi, positioning technologies utilizing wireless communication systems have become a research hotspot.
[0003] In recent years, with the continuous development of artificial intelligence (AI) and machine learning (ML) technologies, leveraging the powerful feature extraction capabilities of AI / ML to extract more stable and refined location-related features from signals such as channel state information (CSI), received signal strength indicator (RSSI), and reference signal receiving power (RSRP) to achieve more robust and high-precision positioning has become a research hotspot.
[0004] However, RSSI and RSRP are coarse-grained information and are easily affected by the environment, resulting in low positioning accuracy and poor robustness. AI / ML positioning methods based on CSI typically require collecting CSI data and corresponding coordinates to form a training set, and then using an end-to-end training strategy to train the positioning network model. The coordinates are usually obtained using precision instruments such as total stations and LiDAR, which is complex, time-consuming, and expensive. The positioning accuracy of such methods is related to the data acquisition density during training set construction; as the required positioning accuracy increases, the data acquisition cost increases dramatically. Furthermore, dynamic changes in the actual environment, such as the demolition and reconstruction of shopping mall booths or partial renovations of parking lots, can alter the distribution of the collected CSI data compared to the original training dataset, leading to deterioration in positioning accuracy or even failure. Additionally, the high dimensionality of CSI data means that large training datasets can result in slow training and low efficiency. Therefore, achieving high-precision positioning at low cost remains a problem to be solved. Summary of the Invention
[0005] This application provides a method for training a positioning network model and a method for locating user equipment, in order to solve the problems of low positioning accuracy and high cost.
[0006] According to one aspect of this application, a method for training a localization network model is provided, comprising:
[0007] Obtain a pre-training dataset and a fine-tuning dataset, wherein the pre-training dataset includes at least first channel state information, and the fine-tuning dataset includes second channel state information and coordinate information;
[0008] The pre-trained network model is trained based on the pre-trained dataset, and the pre-trained network model includes a feature encoder;
[0009] An initial localization network model is constructed based on the pre-trained feature encoder, and the initial localization network model is fine-tuned and trained based on the fine-tuning dataset to obtain the target localization network model.
[0010] According to another aspect of this application, a user equipment positioning method is provided, comprising:
[0011] Obtain the current channel status information of the user equipment;
[0012] The target positioning network model is used to perform positioning based on the current channel state information and the target positioning network model, which is trained according to the positioning network model training method described in any embodiment of this application.
[0013] The location information of the user equipment is determined based on the output of the target positioning network model.
[0014] According to another aspect of this application, an electronic device is provided, the electronic device comprising:
[0015] At least one processor, and a memory communicatively connected to said at least one processor;
[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the positioning network model training method or user equipment positioning method described in any embodiment of this application.
[0017] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the positioning network model training method or user equipment positioning method described in any embodiment of this application.
[0018] According to another aspect of this application, a computer program product is provided, the computer program product including a computer program that, when executed by a processor, implements the positioning network model training method or user equipment positioning method described in any embodiment of this application.
[0019] The technical solution of this application embodiment obtains a pre-training dataset and a fine-tuning dataset. The pre-training dataset includes at least first channel state information, and the fine-tuning dataset includes second channel state information and coordinate information. A pre-trained network model is trained based on the pre-training dataset, and the pre-trained network model includes a feature encoder. An initial localization network model is constructed based on the pre-trained feature encoder. The initial localization network model is then fine-tuned based on the fine-tuning dataset to obtain a target localization network model. This solves the problems of low localization accuracy and high cost. The pre-training network model is trained using the first channel state information in the pre-training dataset. No coordinate information needs to be collected, effectively reducing data acquisition costs. The pre-trained network model includes a feature encoder. An initial localization network model is built based on the feature encoder obtained after pre-training. The initial localization network model is then fine-tuned using a fine-tuning dataset, which includes second channel state information and coordinate information. This results in an initial localization network model with high positioning accuracy. Although the fine-tuning dataset includes coordinate information, only a small amount of data is needed, greatly reducing the amount of coordinate information required and effectively reducing data acquisition costs. By combining pre-training and fine-tuning, a high-precision target localization network model is obtained, improving positioning accuracy at a lower cost.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of a localization network model training method according to Embodiment 1 of this application;
[0023] Figure 2 This is a flowchart of a localization network model training method according to Embodiment 2 of this application;
[0024] Figure 3 This is an example diagram illustrating the implementation of data operations in a feature queue according to Embodiment 2 of this application;
[0025] Figure 4 This is an example diagram illustrating the implementation of data operations in another feature queue according to Embodiment 2 of this application;
[0026] Figure 5 This is an architecture diagram of a pre-trained network model provided according to Embodiment 2 of this application;
[0027] Figure 6 This is an example diagram of an initial localization network model provided according to Embodiment 2 of this application;
[0028] Figure 7 This is a flowchart of a localization network model training method according to Embodiment 3 of this application;
[0029] Figure 8 This is a structural example diagram of a pre-trained network model provided in Embodiment 3 of this application;
[0030] Figure 9 This is a structural example diagram of an initial localization network model provided in Embodiment 3 of this application;
[0031] Figure 10 This is a flowchart of a user equipment positioning method according to Embodiment 4 of this application;
[0032] Figure 11 This is a schematic diagram of a localization network model training device according to Embodiment 5 of this application;
[0033] Figure 12 This is a schematic diagram of a user equipment positioning device according to Embodiment Six of this application;
[0034] Figure 13 This is a schematic diagram of the structure of an electronic device according to Embodiment 7 of this application. Detailed Implementation
[0035] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0036] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0037] Example 1
[0038] Figure 1 This is a flowchart illustrating a localization network model training method provided in Embodiment 1 of this application. This embodiment is applicable to high-precision localization. The method can be executed by a localization network model training device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0039] S101. Obtain the pre-training dataset and the fine-tuning dataset. The pre-training dataset includes at least the first channel state information, and the fine-tuning dataset includes the second channel state information and coordinate information.
[0040] In this embodiment, the pre-training dataset can be understood as the set of data used during model pre-training; the fine-tuning dataset can be understood as the set of data used to fine-tune the model. The first channel state information and the second channel state information can both be understood as a type of channel state information. The first channel state information and the second channel state information can be the same information, i.e., information collected by the same device at the same time and location. The first channel state information and the second channel state information can also be different information, for example, information collected by the same device at different locations, or information collected by different devices at the same location, etc. Coordinate information can be understood as information used to describe coordinates, such as coordinate values. Coordinate information can be two-dimensional coordinates, three-dimensional coordinates, etc.
[0041] A region is selected as the target area, and data is collected within this region to form a pre-training dataset and a fine-tuning dataset. Multiple locations are selected as points within the target area, and a user equipment (UE) is set up at each point. Channel state information is collected through the UE and recorded as first channel state information. The pre-training dataset is formed based on the collected first channel state information. These multiple locations can be the same as, different from, or partially the same as, and partially different from the points selected in the pre-training dataset; this embodiment does not limit this. A UE is set up at each point, and channel state information is collected through the UE and recorded as second channel state information. The coordinate information of the UE is also recorded. The fine-tuning dataset is formed based on the collected second channel state information.
[0042] S102. Train the pre-trained network model based on the pre-trained dataset. The pre-trained network model includes a feature encoder.
[0043] In this embodiment, the pre-trained network model can be understood as a pre-built network model, which can be a neural network model; the pre-trained network model includes a feature encoder, which is used to perform feature encoding.
[0044] The architecture of a pre-trained network model is pre-constructed. The pre-trained network model is trained based on the first channel state information in the pre-training dataset. The first channel state information can be directly used as the input to the pre-trained network model, or it can be processed to obtain the input data. Training the pre-trained network model using the pre-training dataset yields a trained pre-trained network model, which in turn yields a trained feature encoder. In this embodiment, when training the pre-trained network model using the pre-training dataset, training data and its corresponding positive and negative samples can be constructed based on the pre-training dataset. Positive samples have higher similarity or smaller distance to the training data, while negative samples have smaller similarity or larger distance. Training the model using training data and its corresponding positive and negative samples constructed in this way results in a more accurate feature encoder, thereby achieving high-precision localization.
[0045] S103. Construct an initial localization network model based on the pre-trained feature encoder, and fine-tune the initial localization network model based on the fine-tuning dataset to obtain the target localization network model.
[0046] In this embodiment, the initial localization network model can be understood as the initial state of the network model used for localization; the target localization network model can be understood as the final network model obtained after fine-tuning training. The target localization network model and the initial localization network model have the same structure, but the parameters of the models are not completely the same.
[0047] Once the pre-trained feature encoder is determined, an initial localization network model is constructed based on the feature encoder obtained at this time. For example, the feature encoder can be concatenated with other data processing modules to form an initial localization network model. For instance, the feature encoder can be connected with a module with coordinate transformation function to form an initial localization network model so as to convert feature data into coordinate data and realize the localization function. After constructing the initial localization network model, its parameters still need adjustment. Fine-tuning training is performed on the initial localization network model based on the second channel state information and coordinate information in the fine-tuning dataset. The input to the initial localization network model is determined based on the second channel state information. This input can be used directly or processed to form the input. The input data is then fed into the initial localization network model for coordinate transformation to obtain the corresponding localization coordinates. The localization coordinates output by the initial localization network model are then compared with the coordinate information corresponding to the second channel state information. The loss function is calculated, and the model parameters are updated based on the loss function. It is then determined whether further training is needed. If so, training samples are constructed, and the currently updated initial localization network model is updated again until it is determined that further training is no longer necessary. The initial localization network model obtained at this point is then used as the target localization network model.
[0048] This application provides a method for training a localization network model, which solves the problems of low localization accuracy and high cost. The method trains the pre-trained network model using the first channel state information in the pre-training dataset. During pre-training, coordinate information does not need to be collected, effectively reducing data acquisition costs. The pre-trained network model includes a feature encoder. An initial localization network model is constructed based on the feature encoder obtained after pre-training. The initial localization network model is then fine-tuned using a fine-tuning dataset, which includes second channel state information and coordinate information. This results in an initial localization network model with high localization accuracy. Although the fine-tuning dataset includes coordinate information, only a small amount of data is needed, significantly reducing the amount of coordinate information required and effectively lowering data acquisition costs. By combining pre-training and fine-tuning steps, a high-precision target localization network model is obtained, improving localization accuracy while maintaining low cost.
[0049] Example 2
[0050] Figure 2 This is a flowchart illustrating a localization network model training method provided in Embodiment 2 of this application. This embodiment is a refinement based on the above embodiments. Figure 2 As shown, the method includes:
[0051] S201. Obtain the pre-training dataset and the fine-tuning dataset. The pre-training dataset includes first channel state information and signal strength information, and the fine-tuning dataset includes second channel state information and coordinate information.
[0052] In this embodiment, the signal strength information may be information such as Received Signal Strength Indication (RSSI) and Reference Received Power (RSRP). Signal strength information is collected during the acquisition of the first channel state information to form a pre-training dataset.
[0053] S202. Divide the first channel state information in the pre-training dataset according to the location of the first user equipment, and concatenate the first channel state information collected by the first user equipment at the same location with the anchor node into a first channel state information vector.
[0054] In this embodiment, the first channel state information vector can be understood as a vector obtained by concatenating the first channel state information. The first user equipment can be understood as a type of user equipment (UE). Each piece of first channel state information in the pre-training dataset represents the channel state information between the first user equipment and anchor points. The first user equipment can be placed at different locations, and channel state information between the first user equipment and anchor points can be collected at different locations. The first user equipment can also collect channel state information between the first user equipment and different anchor points at the same location. The first channel state information in the pre-training dataset is divided according to the location of the first user equipment. For each location set by the first user equipment, the first channel state information collected by the first user equipment at that location and its connections with all anchor points is concatenated to obtain the first channel state information vector. Since there are different locations, at least one first channel state information vector is obtained.
[0055] S203. Divide the signal strength information in the pre-training dataset according to the location of the first user equipment, and concatenate the signal strength information collected by the first user equipment at the same location with the anchor node into a signal strength information vector. The signal strength information vector corresponds one-to-one with the first channel state information vector.
[0056] In this embodiment, the signal strength information vector can be understood as a vector formed by concatenating channel strength information. Similarly to the first channel state information vector, the first channel state information in the pre-training dataset is divided according to the location of the first user equipment. For each location set by the first user equipment, the signal strength information collected by the first user equipment at that location and its connections with all anchor nodes is concatenated to obtain the signal strength information vector. Each signal strength information vector obtained in this embodiment corresponds one-to-one with the first channel state information vector; the signal strength information vector formed by data collection by the same first user equipment at the same location has a corresponding relationship with the first channel state information vector.
[0057] For example, this application provides a method for generating a first channel state information vector and a channel strength information vector: A pre-training dataset is collected, which only includes signal strength information and CSI data for each location. Assume the number of anchor nodes in the communication network is R, and M different locations are selected in the area to be located. The first user equipment (UE) is placed at the m-th location, and R RSSI or any signal strength information such as RSRP or RSRQ between the UE and each anchor node is collected (RSSI is used as an example below). Simultaneously, R CSIs are collected. The R RSSIs are concatenated row-wise into a one-dimensional column vector, denoted as RSSI. m Concatenate the R CSIs row by row into a two-dimensional vector, denoted as CSI. m Data was collected at M locations to construct... m = 1, 2, 3, ..., M, and m = 1, 2, 3, ..., M.
[0058] S204. Cluster the signal strength information vectors, divide the first channel state information vectors according to the clustering results, and generate a set of channel state information corresponding to each category label.
[0059] In this embodiment, category labels can be understood as labels used to distinguish information from different categories. These can be specific categories or information such as ID identifiers, used only to distinguish different categories and not containing any specific category meaning. For example, category labels can be L1, L2, etc. The channel state information set can be understood as a dataset formed by first channel state information vectors of the same category.
[0060] The channel strength information vectors are clustered using a clustering algorithm, grouping channel strength information vectors of the same category into a single cluster. The number of clusters can be preset. Based on the clustering results, signal strength information vectors belonging to the same category are identified. Following the one-to-one correspondence between signal strength information vectors and first channel state information vectors, each first channel state information vector is further divided to determine the first channel state information vector corresponding to each category label, thus forming a channel state information set corresponding to each category label.
[0061] Optionally, based on the clustering results, each first channel state information vector is partitioned to generate a channel state information set corresponding to each category label, including steps A1-A3:
[0062] A1. Determine the category label corresponding to each signal strength information vector based on the clustering results.
[0063] By clustering, signal strength information vectors of the same category are grouped into a cluster, and a category label is assigned to all signal strength information vectors in each cluster, thus obtaining the category label corresponding to each signal strength information vector.
[0064] A2. Determine the category label of the first channel state information vector corresponding to the signal strength information vector based on the category label corresponding to the signal strength information vector.
[0065] Based on the category label corresponding to the signal strength information vector and the correspondence between the channel strength information vector and the first channel state information vector, the category label of the first channel state information vector is determined, that is, the category label of the channel strength information vector corresponding to the first channel state information vector is used as the category label of the first channel state information vector.
[0066] A3. For each category label, determine the first channel state information vector corresponding to the category label and form a channel state information set.
[0067] For each category label, determine the first channel state information vector corresponding to this category label, and form the channel state information set corresponding to this category label based on this part of the first channel state information vector.
[0068] For example, this application provides a clustering method:
[0069] Step a: Let the number of categories be K, and randomly select... Select K data points, denoted as RSSI. k Let k = 1, 2, ..., K, and let them be the initial cluster centers of the k-th class, denoted as C. k .
[0070] Step b: Concatenate the K cluster centers column-wise to form a cluster center matrix, denoted as C;
[0071] C = [C1, ..., C] k C K ]
[0072] According to RSSI m The distance from the cluster center is used to determine the cluster to which a node belongs.
[0073] ;
[0074] ;
[0075] Where D(a, b) is used to measure the distance between a and b, and can be selected as Manhattan distance or Euclidean distance, etc., depending on the specific application. II k y represents a K-dimensional column vector whose elements are all 1s. m This is a K-dimensional column vector representing the category label, where row k containing element 1 represents the RSSI. m It belongs to category k. Based on the above classification criteria, we can obtain K categories, where the elements in the k-th category are denoted as... N k This indicates the number of RSSIs in this class.
[0076] Step c: Update the cluster centers using the following formula:
[0077] ;
[0078] Re-check according to step b The data is categorized.
[0079] Repeat steps b and c until the distance to the center no longer changes. Final dataset Each RSSI m Each corresponds to a category label L m .
[0080] Due to RSSI m and CSI m All data belong to the m-th UE location and have a one-to-one correspondence. They can be classified according to category label L. m For CSI m Classification. Those with the same L m CSI of the label m The CSI dataset is divided into one class, and the k-th class is denoted as . .
[0081] S205. Construct positive and negative samples based on the set of channel state information and the vector of each first channel state information, and train the pre-trained network model.
[0082] In this embodiment, positive and negative samples include positive and negative samples, and the number of positive and negative samples can be one or more. Based on each channel state information set, a vector with the highest similarity to the first channel state information vector is constructed as a positive sample, and a vector with the lowest similarity to the first channel state information vector is constructed as a negative sample, thus forming positive and negative samples. For example, a data point is randomly selected from the channel state information set containing the first channel state information vector, or selected according to certain rules, as a positive sample, and a data point is selected from each of the remaining channel state information sets as a negative sample. The pre-trained network model is trained based on the constructed positive and negative samples. The parameters of the pre-trained network model are adjusted according to the processing results of the positive and negative samples until a pre-trained network model that meets the requirements is obtained, thus completing the training of the pre-trained network model.
[0083] Optionally, pre-trained network models include: feature encoders, multilayer perceptrons, momentum feature encoders, and momentum multilayer perceptrons.
[0084] A pre-trained network model is constructed, consisting of four parts: an encoder, a momentum encoder, a multilayer perceptron (MLP), and a momentum MLP. The encoder is used to encode features from the CSI data in the training dataset, denoted as E. θ1 (.), θ1 refers to the parameters of the Encoder model, whose network structure can be any type of network model such as CNN or Transformer, depending on the specific application. MLP is used to reduce the dimensionality of features, denoted as G. r1 (.), r1 refers to the model parameters of the momentum MLP, whose network structure parameters can be flexibly configured according to specific applications. The Encoder and MLP constitute a branch of the pre-trained network model, denoted as F(.) = G r1 (E) θ1 (.)). The momentum encoder has the same structure as the encoder and is used to encode features of the corresponding positive CSI data in the training dataset, denoted as E. θ2 (.), θ2 refers to the model parameters of the momentum encoder. The structure of the momentum MLP is consistent with that of the MLP, and it is used to reduce the dimensionality of the features of the corresponding positive samples in the training dataset, denoted as G. r2 (.), r2 refers to the model parameters of the momentum MLP.
[0085] Before training the model, the Encoder, MLP, Momentum Encoder, and Momentum MLP need to be initialized. For example, after initializing the Encoder and MLP, their model parameters can be copied to the Momentum Encoder and Momentum MLP as initialization parameters for the Momentum Encoder and Momentum MLP.
[0086] Optionally, positive and negative samples are constructed based on the sets of channel state information and the vectors of the first channel state information, and the pre-trained network model is trained, including steps B1-B6:
[0087] B1. For each set of channel state information, the first channel state information vector in the set of channel state information is sequentially input into the momentum feature encoder for feature encoding to obtain the first feature space code. Each first feature space code is input into the momentum multilayer perceptron for dimensionality reduction to obtain the first low-dimensional feature. A feature queue is generated based on each first low-dimensional feature.
[0088] For example, the first feature space encoding can be understood as the data obtained after feature encoding. The first low-dimensional feature can be understood as the data obtained by feature dimensionality reduction. The feature queue can be understood as a queue formed by the first low-dimensional features.
[0089] For each set of channel state information, a feature queue corresponding to this set is formed as follows: Each first channel state information vector in the set is sequentially input into a momentum feature encoder, which sequentially encodes each first channel state information vector to obtain a first feature space code corresponding to each first channel state information vector; each first feature space code is sequentially input into a momentum multilayer perceptron, which sequentially performs dimensionality reduction processing on each first feature space code to obtain a first low-dimensional feature corresponding to each first feature space code; and the first low-dimensional features are sorted to generate a feature queue. Each feature queue corresponds to a category label.
[0090] For example, D k The data in the sequence are used as input, and the corresponding feature space encoding is obtained through the momentum encoder network. This is denoted as the first spatial feature code; then, the first feature code is dimensionality reduced based on momentum MLP to obtain low-dimensional features. The first low-dimensional features are denoted as the first low-dimensional features. The first low-dimensional features are randomly sorted and stored in a queue according to the sorting to obtain the feature queue. The feature queue has the following properties: 1) The data in the queue are arranged in order and have the first-in-first-out characteristic. That is, if n data are added to the queue, the first n data in the original queue are deleted and the new n data are placed at the tail of the queue. 2) The queue can delete any element without changing the original sorting. Figure 3 An example diagram illustrating data manipulation in a feature queue is provided. Figure 3 Take deleting data as an example; Figure 4 Another example diagram illustrating data manipulation in a feature queue is provided. Figure 4Taking newly added data as an example, the same operation is performed on all K channel state information sets to obtain K feature queues, denoted as... k=1,2,…,K.
[0091] B2. Select a first preset number of first channel state information vectors from each first channel state information vector and denote them as the first target channel state information vector.
[0092] In this embodiment, the first target channel state information vector can be understood as the first channel state information vector selected from multiple first channel state information vectors for model training. In this embodiment, the first preset number is denoted as T1. The size of T1 can be preset, set empirically, or based on the total number of first channel state information vectors and the number of mini-batch training iterations. For example, T1 = the total number of first channel state information vectors divided by the number of mini-batch training iterations. After determining the size of T1, T1 first channel state information vectors are selected from the first channel state information vectors and denoted as the first target channel state information vector CSI. t .
[0093] B3. For each first target channel state information vector, determine the target label category corresponding to the first target channel state information vector, take the first channel state information vector corresponding to the first low-dimensional feature in the feature queue corresponding to the target label category as a positive sample, and extract the first low-dimensional feature from the remaining feature queue to form a negative sample set.
[0094] In this embodiment, the target label category can be understood as the category label to which the first target channel state information vector belongs. For each first target channel state information vector, the category label of the first target channel state information vector is determined based on the above classification results, and this category label is recorded as the target label category. Since each feature queue corresponds to a category label, the feature queue corresponding to the target label category can be determined; the first first low-dimensional feature in the feature queue corresponding to the target label category is determined, and the first channel state information vector corresponding to this first first low-dimensional feature is taken as a positive sample. First low-dimensional features are extracted from the remaining feature queues as negative samples to form a negative sample set. The number of negative samples can be preset. For example, if the number of negative samples is P, P first low-dimensional features are extracted from the remaining feature queues as negative samples. The method of extracting negative samples can be random extraction or extraction according to certain rules. First low-dimensional features can be extracted from each of the remaining feature queues as negative samples, or first low-dimensional features can be extracted from a portion of the remaining feature queues as negative samples. For example, P / (K-1) first low-dimensional features can be extracted from each of the remaining feature queues as negative samples.
[0095] For example, embodiments of this application can employ a mini-batch learning method for network training, selecting T1 first channel state information vectors for each mini-batch training. Each mini-batch data includes data from... T1 data points are randomly selected without repetition and used as anchor points. Let the t-th data point in a minibatch belong to the k-th class, denoted as CSI. t From the feature queue Take the first data Correspondingly As a positive sample, it is denoted as Take P / (K-1) data points from each of the remaining K-1 queues, or select the number of samples to be drawn from each queue according to the proportion of the total number of samples in each queue, and collect a total of P data points to form a negative sample set. This set includes P negative samples, and the p-th data point is denoted as P. , where p = 1, 2, ..., P.
[0096] B4. Update the parameters of the feature encoder, multilayer perceptron, momentum feature encoder, and momentum multilayer perceptron in the pre-trained network model based on the first target channel state information vector and its corresponding positive and negative sample sets.
[0097] Based on the first target channel state information vectors and their corresponding positive samples, the output difference with the highest similarity is determined. Based on the first target channel state information vectors and the negative samples in the negative sample set, the output difference with the lowest similarity is determined. A loss function is calculated by combining the two types of output differences, and the parameters of the feature encoder, multilayer perceptron, momentum feature encoder, and momentum multilayer perceptron are updated according to the loss function. For example, the first target channel state information vectors are used as input and processed sequentially by the feature encoder and multilayer perceptron; positive samples are used as input and processed sequentially by the momentum feature encoder and momentum multilayer perceptron; the outputs of the multilayer perceptron and momentum multilayer perceptron are compared; the multilayer perceptron is compared with the negative samples in the negative sample set; the loss function is calculated, and the parameters are updated. This embodiment of the application can update the parameters of the feature encoder, multilayer perceptron, momentum feature encoder, and momentum multilayer perceptron.
[0098] B5. Update the feature queues corresponding to each first target channel state information vector.
[0099] The feature queue corresponding to each first target channel state information vector is updated by updating one or more first low-dimensional features in the feature queue. For example, the feature queue is updated by updating the low-dimensional features obtained by feature encoding and dimensionality reduction of the first target channel state information vector according to the pre-trained network model.
[0100] B6. Determine whether the first training stop condition is met. If yes, determine that the training of the pre-trained network model is complete; otherwise, return to execute B2.
[0101] In this embodiment, the first training stopping condition can be understood as the condition for the pre-trained network model to stop training. The first training stopping condition can be preset, for example, it could be reaching a preset number of iterations, or the loss function converging, etc. It is determined whether the first training stopping condition is met. If yes, the training of the pre-trained network model is considered complete, and the latest parameters of the pre-trained network model are used as the final model parameters to obtain the feature encoder that has completed training. If not, the process returns to step B2, and T1 first channel state information vectors are selected again and recorded as the first target channel state information vector. When selecting T1 first channel state information vectors again, it is possible to select T1 non-repeating first channel state information vectors. For example, assuming the total number of first channel state information vectors is 100 and T1=10, firstly, select 10 non-repeating first channel state information vectors from the 100 first channel state information vectors. If the first training stopping condition is not met, then select 10 non-repeating first channel state information vectors again from the remaining 90 first channel state information vectors, until all 100 first channel state information vectors have been selected once. This can be considered as one iteration. If the first training stopping condition is still not met, then in the next iteration, select 10 non-repeating first channel state information vectors from the 100 first channel state information vectors again. The 10 first channel state information vectors selected this time may not be exactly the same as the 10 first channel state information vectors selected in the previous iteration rounds, until the first training stopping condition is met, and the model training stops.
[0102] Optionally, the parameters of the feature encoder, multilayer perceptron, momentum feature encoder, and momentum multilayer perceptron in the pre-trained network model are updated based on the first target channel state information vector and its corresponding positive and negative sample sets, including steps C1-C4:
[0103] C1. For each first target channel state information vector, the first target channel state information vector is input into the feature encoder for feature encoding to obtain the second feature space code. The second feature space code is input into the multilayer perceptron for dimensionality reduction to obtain the second low-dimensional feature.
[0104] In this embodiment, the second feature space encoding can be understood as information obtained through feature encoding. The second low-dimensional feature can be understood as information obtained through dimensionality reduction processing.
[0105] Each first target channel state information vector can be processed in the following way: the first target channel state information vector is input into the feature encoder, the feature encoder performs feature encoding on the first target channel state information to obtain the second feature space encoding; the second feature space encoding is input into the multilayer perceptron, the multilayer perceptron performs dimensionality reduction processing on the second feature space encoding to obtain the second low-dimensional feature.
[0106] C2. Input the positive sample corresponding to the first target channel state information vector into the momentum feature encoder for feature encoding to obtain the third feature space code. Input the third feature space code into the momentum multilayer perceptron for dimensionality reduction to obtain the third low-dimensional feature.
[0107] In this embodiment, the third feature space encoding can be understood as information obtained through feature encoding. The third low-dimensional feature can be understood as information obtained through dimensionality reduction processing.
[0108] For each first target channel state information vector, the first target channel state information is input into the corresponding positive sample into the momentum feature encoder. The momentum feature encoder performs feature encoding on the positive sample to obtain the third feature space encoding. The third feature space encoding is input into the momentum multilayer perceptron. The momentum multilayer perceptron performs dimensionality reduction processing on the third feature space encoding to obtain the third low-dimensional feature.
[0109] C3. Calculate the first loss function based on the second low-dimensional features, the third low-dimensional features, and the negative sample set corresponding to each first target channel state information vector.
[0110] In this embodiment, the first loss function can be of the type of mean squared error (MSE), mean absolute error (MAE), etc.
[0111] For each first target channel state information vector, the difference between samples with the highest possible similarity is determined based on its corresponding second and third low-dimensional features, and the difference between samples with the lowest possible similarity is determined based on its corresponding second low-dimensional features and negative samples in the negative sample set. The first loss function is determined by comprehensively considering these two types of differences for each first target channel state information vector. For example, for each first target channel state information vector, the distance between its corresponding second and third low-dimensional features is calculated and denoted as d1, and the distance between its corresponding second low-dimensional features and each negative sample is calculated and denoted as d2. There are P d2 values. The sum of the P d2 and d1 values is calculated, and the loss L of the first target channel state information vector is determined based on the ratio of d1 divided by the sum. t The loss L based on each first target channel state information vector t Determine the first loss function.
[0112] For example, Figure 5 An architecture diagram of a pre-trained network model is provided, which includes a feature encoder 11, a multilayer perceptron 12, a momentum feature encoder 13, and a momentum multilayer perceptron 14. CSI... t , The input is fed into a pre-trained network model, where it passes through an Encoder network and a Momentum Encoder network to obtain the corresponding second and third feature space codes, respectively. Then, based on MLP and Momentum MLP, the feature codes are dimensionality-reduced to obtain the second low-dimensional feature z. t and third low-dimensional features A momentum feature encoder 13 and a momentum multilayer perceptron 14, along with negative samples, are set as surrogate tasks to pre-train the feature encoder in place of the ground truth coordinate labels; in this embodiment, the surrogate task is set as z. t and Maximize the similarity between z t With negative samples To minimize the similarity between elements, the following optimization objective function is set based on this principle:
[0113] Min θ1,r1 L(θ1, r1);
[0114] Where L(θ1, r1) represents the loss function, which is calculated for a minibatch using the following formula:
[0115] ;
[0116] ;
[0117] in, The similarity between a and b can be represented by Euclidean distance or cosine similarity, etc. for τ is a pre-set parameter.
[0118] C4. Update the parameters of the feature encoder, multilayer perceptron, momentum feature encoder, and momentum multilayer perceptron according to the first loss function.
[0119] Updating the model parameters of the feature encoder, multilayer perceptron, momentum feature encoder, and momentum multilayer perceptron based on the first loss function can be done by updating one or more of them. For example, the parameters of the feature encoder and multilayer perceptron can be updated based on the first loss function, and then the parameters of the momentum feature encoder and momentum multilayer perceptron can be updated based on the updated parameters of the feature encoder and multilayer perceptron.
[0120] For example, deep learning optimization algorithms such as Adam and SGD can be selected to update and optimize the parameters θ1 and r1 of the network model. Then, θ2 and r2 are updated according to the following formula:
[0121] θ2=ρ×θ1+(1-ρ)×θ1;
[0122] r2 = ρ × r1 + (1 - ρ) × r1.
[0123] Among them, ρ must satisfy 0 < ρ < 1, and the specific value needs to be set according to experience.
[0124] Optionally, the feature queue corresponding to each first target channel state information vector is updated, including: for each feature queue corresponding to the first target channel state information vector, deleting the first first low-dimensional feature and the first low-dimensional feature corresponding to the first target channel state information vector in the feature queue, and adding the second low-dimensional feature and the third low-dimensional feature corresponding to the first target channel state information vector to the feature queue.
[0125] For each first target channel state information vector, after one batch training, the feature queue corresponding to this first target channel state information vector is updated: the first low-dimensional feature in the feature queue is updated. and the first target channel state information vector CSI t The corresponding first low-dimensional feature is deleted, and the second and third low-dimensional features corresponding to the first target channel state information vector are added to the feature queue; the second and third low-dimensional features can be added to the end of the queue.
[0126] S206. Construct an initial localization network model based on the pre-trained feature encoder.
[0127] Optionally, the initial localization network model includes a feature encoder and a feature mapping layer.
[0128] In this embodiment, the feature mapping layer is used to perform coordinate mapping on the features, converting the encoded features into coordinate data.
[0129] S207. Divide the second channel state information in the fine-tuning dataset according to the location of the second user equipment, and concatenate the second channel state information collected by the second user equipment at the same location with the anchor node into a second channel state information vector.
[0130] In this embodiment, the second channel state information vector can be understood as a vector obtained by concatenating the second channel state information. The second user equipment (UE) is a type of UE; it can be the same as the first UE or different from it. Each piece of second channel state information in the fine-tuning dataset represents the channel state information between the second UE and the anchor points. The second UE can be placed at different locations, and channel state information between the second UE and the anchor points can be collected at each location. Even at the same location, the second UE can collect channel state information between the second UE and different anchor points. The second channel state information in the fine-tuning dataset is divided according to the locations of the UE. For each location set by the second UE, the second channel state information collected by the second UE at that location and its connections with all anchor points is concatenated to obtain the second channel state information vector.
[0131] S208. For each second channel state information vector, the second channel state information vector is input into the feature encoder for feature encoding to obtain the fourth feature space code; the fourth feature space code is input into the feature mapping layer for feature mapping to obtain the first coordinate prediction value.
[0132] In this embodiment, the fourth feature space encoding can be understood as the information obtained through feature encoding. The first coordinate prediction value can be understood as the coordinates predicted by the feature mapping layer. For each second channel state information vector, the second channel state information vector is input into the trained feature encoder, which performs feature encoding to obtain the fourth feature space encoding; the fourth feature space encoding is then input into the feature mapping layer for feature mapping to determine the first coordinate prediction value corresponding to the fourth feature space encoding.
[0133] S209. Calculate the second loss function based on the first coordinate prediction value and coordinate information corresponding to each second channel state information vector.
[0134] In this embodiment, the calculation formula for the second loss function can be preset. The predicted first coordinates and coordinate information corresponding to each second channel state information vector are substituted into the calculation formula for the second loss function to obtain the second loss function.
[0135] S210. Update the parameters of the feature mapping layer according to the second loss function.
[0136] The parameters of the feature mapping layer are optimized and updated based on the second loss function; for example, common deep learning optimization algorithms, such as Adam and SGD, are used to update and optimize the parameters of the network model.
[0137] The embodiments of this application can update the parameters of the feature mapping layer based on the second loss function, or update the parameters of both the feature encoder and the feature mapping layer simultaneously based on the second loss function.
[0138] S211. If the first fine-tuning stop condition is not met, then based on the updated feature mapping layer, return to execute S208.
[0139] In this embodiment, the first fine-tuning stopping condition can be understood as a condition used to determine whether model fine-tuning has stopped. The first fine-tuning stopping condition can be preset, for example, the first fine-tuning stopping condition is model convergence, the number of model iterations reaching the required number, etc. It is determined whether the first fine-tuning stopping condition is met. If not, fine-tuning needs to continue, and the process returns to step S208 to continue feature mapping based on the updated feature mapping layer.
[0140] S212. If the first fine-tuning stopping condition is met, then a target localization network model is formed based on the parameters of the current feature mapping layer.
[0141] If the first fine-tuning stopping condition is met, the target localization network model is formed based on the parameters of the currently obtained feature mapping layer. That is, the final feature mapping layer is obtained based on the parameters of the currently obtained feature mapping layer, and the target localization network model is formed by combining the final feature encoder.
[0142] For example, Figure 6 An example diagram of an initial localization network model is provided, which includes a feature encoder (Encoder) 21 and a feature mapping layer (Head) 22. The Encoder directly adopts the Encoder structure and parameters obtained during training as described above. The Head is used to project the encoded features output by the Encoder onto coordinates. Its network structure can be any type of network model, such as MLP, depending on the specific application, and is denoted as H. φ (.), where φ refers to the parameters to be optimized in the Head model. After being processed by the feature encoder 21 and the feature mapping layer 22, the CSI outputs the first coordinate prediction value. Based on the distance minimization principle, the first coordinate prediction value and the coordinate information are calculated to determine the second loss function.
[0143] The initial localization network model can be fine-tuned using either fine-tuning or linear probing. Fine-tuning optimizes both φ and θ or θ's components simultaneously, with the objective function as follows:
[0144] Min θ,φ L(θ, φ);
[0145] in, ;P nThis represents the actual coordinates of the nth point.
[0146] The linear probing fine-tuning method fixes θ and optimizes only φ, with the objective function as follows:
[0147] Minφ L(φ|θ);
[0148] in, .
[0149] Common deep learning optimization algorithms, such as Adam and SGD, can be used to update and optimize the parameters of the network model until convergence.
[0150] Fine-tuning can yield a localization network model with high accuracy, but it requires optimizing both φ and θ simultaneously, resulting in a large number of parameters and thus time-consuming training. Linear probing typically produces a network model with lower localization accuracy than fine-tuning, but it optimizes only parameter φ, making it more efficient. In practical applications, the fine-tuning method can be chosen based on the required accuracy and training time. The final target localization network model consists of a trained Encoder and Head.
[0151] This application provides a method for training a localization network model, which solves the problems of low localization accuracy and high cost. A first channel state information vector is constructed based on first channel state information. Signal strength information is clustered, and positive and negative samples are divided into corresponding first channel state information vectors according to the clustering results. A feature encoder is pre-trained based on the positive and negative samples. An initial localization network model is constructed based on the pre-trained feature encoder. The clustering results of signal strength information are used as auxiliary information, and a proxy task is set to replace the coordinate ground truth label for pre-training the feature encoder. This fully utilizes the coarse-grained information related to coordinates to obtain location-related encoding features, effectively reducing the cost of collecting coordinate ground truth. Finally, the initial localization network model is fine-tuned using a small dataset containing coordinate ground truth. This effectively utilizes the high sensitivity characteristics of channel state information and location correlation, improving the model's localization accuracy while considering data acquisition and training costs.
[0152] Example 3
[0153] Figure 7 This is a flowchart of a localization network model training method provided in Embodiment 3 of this application. This embodiment is a refinement based on the above embodiments. Figure 7 As shown, the method includes:
[0154] S301. Obtain the pre-training dataset and the fine-tuning dataset. The pre-training dataset includes at least the first channel state information, and the fine-tuning dataset includes the second channel state information and coordinate information.
[0155] Optionally, obtaining a pre-training dataset includes: obtaining first points in the area to be located, with at least one first user device set at each first point; for each first user device set at each first point, obtaining first channel state information between the first user device and at least one anchor node, and concatenating them into a first channel state information vector; for each first point, forming a training subset based on the first channel state information vectors corresponding to all first user devices at the first point; and forming a pre-training dataset based on each training subset.
[0156] In this embodiment, the region to be located can be understood as a pre-determined area where data is collected to form a pre-training dataset and a fine-tuning dataset. The first point can be understood as a location within the region to be located, used to collect data from the pre-training dataset. The training subset can be understood as the dataset formed by data collected at a single point.
[0157] First locations within the target area are pre-defined. During data acquisition, at least one first user device (user device) is positioned at each first location. For each user device at each first location, the first channel state information between this user device and at least one anchor node is acquired. Multiple first channel state information vectors corresponding to this user device are concatenated into a first channel state information vector. For each first location, the first channel state information vectors corresponding to all user devices positioned at this location are determined. Based on this first arrival state information vector, a training subset corresponding to the first location is formed. A pre-training dataset is constructed based on these training subsets.
[0158] For example, a pre-training dataset can be constructed as follows. The pre-training dataset can consist of multiple channel state information entries and may also include timestamps corresponding to the channel state information. The timestamps are primarily used to align data from different user equipment (UEs) at the same location. Assume there are R anchor nodes in the communication network, and M different locations (i.e., the first locations) are selected in the area to be located. K heterogeneous UEs (i.e., the first UEs) are stacked on each location. At the m-th location, the k-th UE collects a total of R CSI data points between itself and each anchor node. These R CSI data points are then concatenated row-wise into a two-dimensional vector, denoted as [vector name missing]. All K at the m-th point This constitutes the m-th training subset, denoted as k=1, 2, ..., K. Data is collected at all M locations to construct pre-training data. m = 1, 2, ..., M.
[0159] Optionally, the fine-tuning dataset is obtained, including: obtaining second points in the area to be located, with at least one second user device set at each second point; for each second point, obtaining the coordinate information of one second user device at the second point and the second channel state information between the second user device and at least one anchor node, and concatenating the second channel state information between the second user device and at least one anchor node into a second channel state information vector; forming a fine-tuning sub-dataset corresponding to each second point based on the coordinate information and the second channel state information vector; and forming a fine-tuning dataset based on each fine-tuning sub-dataset.
[0160] In this embodiment, the second point can be understood as a location within the area to be located, used to collect data from the fine-tuning dataset. The fine-tuning subset can be understood as a dataset formed by data collected at a single point.
[0161] Second points are pre-set in the area to be located. During data acquisition, at least one second user device is set at each second point. In this embodiment, only one second user device at each point is needed to form the fine-tuning dataset. Therefore, to save resources, only one second user device can be set at each second point. For each second user device set at a second point, the second channel state information between this second user device and at least one anchor node is obtained. Multiple second channel state information corresponding to this second user device are concatenated into a second channel state information vector. Based on the coordinate information corresponding to each second point and the second channel state information vector, a fine-tuning sub-dataset corresponding to the second point is formed. A fine-tuning dataset is formed based on the fine-tuning sub-datasets corresponding to each second point.
[0162] For example, a fine-tuning dataset can be constructed as follows, which includes CSI data and corresponding coordinate information for each location. N different points are selected in the area to be located. One of the K heterogeneous UEs is randomly selected for data collection in the fine-tuning dataset. The data volume of the fine-tuning dataset is much smaller than that of the pre-training dataset. The user equipment (i.e., the second user equipment) is placed at the nth point (i.e., the second point), and the coordinates of this point are measured and recorded. Depending on different application requirements, these coordinates can be one-dimensional, two-dimensional, or three-dimensional. Taking two-dimensional coordinates as an example, denoted as P... n = (x n y n The system collects R CSIs between the UE and each anchor node, and concatenates these R CSIs row by row into a two-dimensional vector, denoted as CSI. n P n and CSI n This constitutes a set of data, denoted as the fine-tuning subset. Data was collected at N locations to construct a fine-tuning dataset. n = 1, 2, 3, ..., N.
[0163] Optionally, the pre-trained network model includes a feature encoder and a feature flattening layer.
[0164] In this embodiment, the feature flattening layer can be understood as a feature data processing module, which is used to flatten the feature map into a vector sequence.
[0165] S302. Extract a second preset number of first channel state information vectors from the pre-trained dataset and denot them as the second target channel state information vectors. The first channel state information vectors are obtained by concatenating the first channel state information.
[0166] In this embodiment, the second preset number can be pre-set, and in this application embodiment, the second preset number is denoted as T2; the second target channel state information vector can be understood as the first channel state information vector selected from multiple first channel state information vectors for model training. The pre-training dataset includes multiple first channel state information vectors. The first channel state information vector is obtained by concatenating the first channel state information vectors, and T2 first channel state information vectors are extracted and denoted as the second target channel state information vector.
[0167] Optionally, extracting a second preset number of first channel state information vectors from the pre-training dataset includes: extracting a second preset number of training subsets from the pre-training dataset; and extracting one first channel state information vector from each training subset.
[0168] The pre-training dataset consists of training subsets. When extracting the first channel state information vector, T2 training subsets can be extracted from the pre-training dataset. One first channel state information vector is extracted from each training subset, resulting in a total of T2 first channel state information vectors.
[0169] S303. For each second target channel state information vector, construct positive and negative samples of the second target channel state information vector.
[0170] Based on each second target channel state information vector, select the data with the greatest similarity to the second target channel state information vector as positive samples, and select the vector with the least similarity to the second target channel state information vector as negative samples, thus completing the construction of positive and negative samples.
[0171] Optionally, construct positive and negative samples of the target channel state information vector, including steps D1-D2:
[0172] D1. For each second target channel state information vector, extract a first channel state information vector as a positive sample from the training subset corresponding to the second target channel state information vector. The positive sample is different from the second target channel state information vector.
[0173] For each second target channel state information vector, a training subset corresponding to the second target channel state information vector is determined. From this training subset, a first channel state information vector is randomly selected as a positive sample. The positive sample is different from the second target channel state information vector.
[0174] D2. Take the remaining first channel state information vectors in the second preset number of first channel state information vectors as candidate vectors; for each candidate vector, extract a first channel state information vector from the training subset corresponding to the candidate vector as a negative sample, and take each candidate vector as a negative sample.
[0175] In this embodiment, the candidate vector can be understood as the first channel state information vector of the candidate data that serves as a negative sample. The remaining T2-1 first channel state information vectors out of the T2 first channel state information vectors are used as candidate vectors, and each candidate sample is used as a negative sample, resulting in T2-1 negative samples. For each candidate vector, the corresponding training subset is determined, and a first channel state information vector is extracted from the corresponding training subset as a negative sample. The extracted first channel state information vector is a positive sample of the candidate vector. When extracting a first channel state information vector as a negative sample from the training subset, the extracted vector is different from the candidate vector. That is, in this embodiment, when forming negative samples, the remaining T2-1 first channel state information vectors out of the T2 first channel state information vectors are directly used as negative samples, and simultaneously, the positive samples of the T2-1 first channel state information vectors are extracted as negative samples of the second target channel state information vector, resulting in 2×(T2-1) negative samples.
[0176] S304. Input the second target channel state information vector and its corresponding positive and negative samples into the feature encoder for feature encoding to obtain the fifth feature space code. Input each fifth feature space code into the feature flattening layer for feature flattening processing to obtain the feature sequence.
[0177] In this embodiment, the fifth feature space encoding can be understood as data obtained through feature encoding; the feature sequence can be understood as feature encoding described by a vector sequence.
[0178] The second target channel state information vector and its corresponding positive and negative samples are input into the feature encoder, which encodes the input data to obtain each fifth feature space code. Each fifth feature space code is then input into the feature flattening layer, which flattens the input data features and converts the feature space code into a vector sequence to obtain the feature sequence.
[0179] S305. Determine the third loss function based on the feature sequence corresponding to each second target channel state information vector.
[0180] In this embodiment, the type of the third loss function can be mean squared error, mean absolute error, etc. The calculation formula for the third loss function can be predetermined. For each second target channel state information vector, the feature sequence obtained after processing the second target channel state information, the corresponding positive samples, and the negative samples can all be considered as the feature sequence corresponding to the second target channel state information vector; for example, the feature sequence obtained after processing the second target channel state information vector is denoted as q. j The feature sequence obtained after processing positive samples is: The feature sequence obtained after processing the negative samples is q. i (Feature sequence obtained after processing candidate vectors) (The feature sequence obtained by processing the positive samples corresponding to the candidate vector); q j , q i and Substitute the values into the formula to calculate the loss corresponding to the second target channel state information, and calculate the third loss function based on the loss corresponding to each second target channel state information.
[0181] S306. Update the model parameters of the pre-trained network model according to the third loss function.
[0182] The parameters of the feature encoder are optimized and updated based on a third loss function; for example, common deep learning optimization algorithms, such as Adam and SGD, are used to update and optimize the model parameters of the pre-trained network model. Embodiments of this application can update the parameters of the feature encoder in the pre-trained network model, or they can update the parameters of both the feature encoder and the feature flattening layer.
[0183] S307. Determine whether the second training stop condition is met. If yes, execute S308; otherwise, return to execute S303.
[0184] In this embodiment, the second training stopping condition can be understood as the condition for the pre-trained network model to stop training. The second training stopping condition can be preset, for example, it could be reaching a preset number of iterations, or the loss function converging, etc. It is determined whether the second training stopping condition is met. If yes, the training of the pre-trained network model is considered complete, and the latest parameters of the pre-trained network model are used as the final model parameters to obtain the feature encoder that has completed training. If not, the process returns to step S308, and T2 first channel state information vectors are selected again and recorded as the second target channel state information vectors. Similarly, when selecting T2 first channel state information vectors again, it is possible to select T2 non-repeating first channel state information vectors. For example, assuming the total number of first channel state information vectors is 100 and T2=10, firstly, select 10 non-repeating first channel state information vectors from the 100 first channel state information vectors. If the second training stopping condition is not met, then select 10 non-repeating first channel state information vectors again from the remaining 90 first channel state information vectors, until all 100 first channel state information vectors have been selected once. This can be considered as one iteration. If the second training stopping condition is still not met, then in the next iteration, select 10 non-repeating first channel state information vectors from the 100 first channel state information vectors again. The 10 first channel state information vectors selected this time can be different from the 10 first channel state information vectors selected in the previous iteration rounds, until the second training stopping condition is met, and the model training stops.
[0185] Based on a pre-trained dataset, this application trains a robust feature encoder with the objective function of aligning fingerprint features of heterogeneous terminals. The feature encoder in this application can also be called a fingerprint feature extractor or a feature extractor.
[0186] For example, Figure 8 An example diagram of a pre-trained network model is provided. The pre-trained network model includes a feature encoder (Encoder) 31 and a feature flattening layer (Flatten) 32. The feature encoder is denoted as IE. θ (.), where θ refers to the parameters to be optimized in the Encoder, and its structure can be any type such as CNN or Transformer depending on the actual application. Flatten flattens the feature map output by the Encoder into a vector sequence, denoted as f(.). After CSI is processed by the feature encoder 31 and the feature flattening layer 32, the feature sequence is obtained.
[0187] The network is trained using a mini-batch learning method, assuming that each minibatch includes data from D. pre The T2 data points extracted without duplication are denoted as anchor points. The extraction rules for these T2 data points are as follows: First, from D...pre T2 training subsets are randomly selected from the dataset. , t=1, 2, ..., T2; then, randomly select one data point from each subset to form a minibatch dataset. For any data point CSI in the minibatch dataset j Assuming it comes from the t-th training subset, then a different CSI is randomly selected from the t-th training subset. j The data is used as a positive sample, denoted as... The other data in this minibatch are used as its negative samples. All data in this minibatch are CSI. j j=1, 2, ..., T2, and the corresponding CSI j Input the encoder to obtain fingerprint features, for CSI j and The corresponding feature sequences are denoted as q. j , The feature sequences corresponding to the other negative samples are denoted as q. i and .
[0188] q j =f(IE θ (CSI j ));
[0189] .
[0190] For sample CSI j Set the following loss function:
[0191] ;
[0192] in,
[0193] ;
[0194] Where sim(a, b) represents the similarity between a and b, such as cosine similarity;
[0195] ;
[0196] Depending on the specific application, Euclidean distance or other methods can also be selected.
[0197] The third loss function corresponding to the above minibatch is as follows:
[0198] ;
[0199] The third loss function shown above uses commonly used deep learning optimization algorithms, such as Adam and SGD, to update and optimize the model parameters of the pre-trained network model until convergence.
[0200] S308. Confirm that the training of the pre-trained network model is complete.
[0201] S309. Construct an initial localization network model based on the pre-trained feature encoder.
[0202] Optionally, the initial localization network model includes a feature encoder, a feature location extraction layer, and a feature dimensionality reduction layer.
[0203] In this embodiment, the feature location extraction layer can be understood as a data processing module that extracts location-related feature information from the feature encoding; the feature dimensionality reduction layer can be understood as a data processing module that projects location-related features onto a coordinate space. The feature encoder, feature location extraction layer, and feature dimensionality reduction layer are connected sequentially.
[0204] S310. Extract at least one fine-tuning subset from the fine-tuning dataset as the target fine-tuning subset.
[0205] In this embodiment, the target fine-tuning subset can be understood as a selected fine-tuning subset from the fine-tuning dataset, used to fine-tune the initial localization network model. One or more fine-tuning subsets are extracted from the fine-tuning dataset as the target fine-tuning subset.
[0206] S311. For each target fine-tuning sub-dataset, input the second channel state information vector in the target fine-tuning sub-dataset into the sequentially connected feature encoder, feature location extraction layer and feature dimensionality reduction layer to obtain the second coordinate prediction value.
[0207] In this embodiment, the second coordinate prediction value can be understood as the coordinate value obtained by coordinate prediction based on the second channel state information vector.
[0208] For each target fine-tuning sub-dataset, the second channel state information vector in the target fine-tuning sub-dataset is input into the sequentially connected feature encoder, feature location extraction layer and feature dimensionality reduction layer. The second channel state information vector is sequentially passed through the feature encoder for feature encoding. The encoded spatial features are then input into the feature location extraction layer for feature extraction to obtain location-related information. Finally, the location-related information is processed by the feature dimensionality reduction layer to output the second coordinate prediction value.
[0209] S312. Determine the fourth loss function based on the second coordinate prediction value and coordinate information corresponding to each target fine-tuning sub-dataset.
[0210] In this embodiment, the calculation formula for the fourth loss function can be preset. The predicted second coordinates and coordinate information corresponding to each target fine-tuning subset are substituted into the calculation formula of the second loss function to obtain the fourth loss function.
[0211] S313. Update the parameters of the feature location extraction layer and the feature dimensionality reduction layer based on the fourth loss function.
[0212] The parameters of the feature location extraction layer and the feature dimensionality reduction layer are optimized and updated based on the fourth loss function; for example, common deep learning optimization algorithms, such as Adam and SGD, are used to update and optimize the parameters of the feature location extraction layer and the feature dimensionality reduction layer.
[0213] The embodiments of this application can also update the parameters of the feature encoder based on the fourth loss function.
[0214] S314. If the second fine-tuning stop condition is not met, then based on the updated feature location extraction layer and feature dimensionality reduction layer, return to execute S310.
[0215] In this embodiment, the second fine-tuning stopping condition can be understood as a condition used to determine whether model fine-tuning has stopped. The second fine-tuning stopping condition can be preset, for example, the second fine-tuning stopping condition is model convergence, the number of model iterations reaching the required number, etc. It is determined whether the second fine-tuning stopping condition is met. If not, fine-tuning needs to continue, and the process returns to step S310, where at least one fine-tuning subset is re-extracted as the target fine-tuning subset. Based on the updated feature location extraction layer and feature dimensionality reduction layer, position feature extraction and coordinate projection are continued. In this embodiment, a single model parameter update can be referred to as a mini-batch training. For example, the fine-tuning dataset includes 100 fine-tuning sub-datasets. In one batch training, 10 are extracted as target fine-tuning sub-datasets. If the second fine-tuning stopping condition is not met, 10 more are extracted from the remaining 90 fine-tuning sub-datasets as target fine-tuning sub-datasets, until all 100 are extracted in one round. If the second fine-tuning stopping condition is still not met, 10 more are extracted from the 100 fine-tuning sub-datasets as target fine-tuning sub-datasets, until the second fine-tuning stopping condition is met.
[0216] S315. If the second fine-tuning stopping condition is met, a target localization network model is formed based on the parameters of the current feature location extraction layer and feature dimensionality reduction layer.
[0217] If the second fine-tuning stopping condition is met, the target localization network model is formed based on the parameters of the currently obtained feature location extraction layer and feature dimensionality reduction layer. That is, the final feature location extraction layer and feature dimensionality reduction layer are obtained based on the parameters of the currently obtained feature location extraction layer and feature dimensionality reduction layer, and the final feature encoder is combined to form the target localization network model.
[0218] For example, Figure 9 An example diagram of the structure of an initial localization network model is provided. The initial localization network model includes a feature encoder (Encoder) 41, a feature location extraction layer (BottelNeck) 42, and a feature dimensionality reduction layer (Head) 43. The Encoder directly uses the Encoder structure and parameters obtained from the above training steps. The BottelNeck is used to further refine the coarse fingerprint features output by the Encoder, extracting location-related features. Its network structure can be any type of network model, such as CNN or Transformer, depending on the specific application, and is denoted as B. α (.), where α refers to the parameter to be optimized in the BottelNeck model. The Head is used to project the location-related features output by BottelNeck onto the coordinate space. Its network structure can be any type of network model, such as MLP, depending on the specific application, and is denoted as H. φ (.), where φ refers to the parameters to be optimized in the Head model. After CSI is processed by feature encoder 41, feature location extraction layer 42 and feature dimensionality reduction layer 43, the second coordinate prediction value is obtained.
[0219] The initial localization network model is trained using a mini-batch learning method based on the fine-tuned dataset. Assume each minibatch contains data from D... tuning The T3 group of data has no duplicate samples. For sample t, where t=1, ..., T3, the following loss function is set:
[0220] ;
[0221] Where D(a, b) represents the distance between a and b, which can be calculated using Euclidean distance, according to the following formula:
[0222] D(a, b) = ||ab|| 2 ;
[0223] Depending on the specific application, Manhattan distance, Mahalanobis distance, etc., can also be selected. The fourth loss function corresponding to the above minibatch is as follows:
[0224] ;
[0225] Freeze the Encoder parameters and do not update them; only update the parameters α and φ. That is, the objective function for the initial localization network model training is as follows:
[0226] Min α,φ L(α, φ|θ);
[0227] For the fourth loss function mentioned above, commonly used deep learning optimization algorithms, such as Adam and SGD, are selected to update and optimize the parameters of the network model until convergence.
[0228] The positioning network model training method provided in this application, in the pre-training stage, uses CSI data collected from multiple heterogeneous devices, without requiring ground truth coordinates, to form a pre-training dataset. Using this pre-training dataset, a robust feature encoder is trained through comparative learning, with fingerprint feature alignment as the objective, and an initial positioning network model is constructed based on the feature encoder. In the fine-tuning stage, a fine-tuning dataset is formed based on CSI data collected from any user device and its corresponding location coordinates. The initial positioning network model is trained on this fine-tuning dataset with the objective of minimizing positioning error, resulting in the final target positioning network model. The pre-training strategy can effectively align features under heterogeneous terminal conditions, thereby effectively improving the accuracy of AI positioning under such conditions. It only requires collecting ground truth coordinate data from a single terminal, significantly reducing the high costs caused by the difficulty of collecting ground truth coordinates.
[0229] Example 4
[0230] Figure 10 This is a flowchart of a user equipment positioning method provided in Embodiment 4 of this application. This embodiment is applicable to situations requiring high-precision positioning of user equipment. The method can be executed by a user equipment positioning device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 10 As shown, the method includes:
[0231] S401. Obtain the current channel status information of the user equipment to be located.
[0232] In this embodiment, the user equipment to be located can be understood as a user equipment with a positioning requirement. The current channel state information can be understood as the channel state information currently collected by the user equipment to be located.
[0233] When a user equipment (UE) is located in any area, its channel state information can be collected in real time. When it is necessary to locate the UE, the UE is designated as the UE to be located, and its current channel state information is obtained and recorded as the current channel state information. To ensure real-time positioning, the latest collected channel state information of the UE to be located can be used as the current channel state information.
[0234] S402. Locate the target based on the current channel state information and the target positioning network model.
[0235] A target localization network model is pre-trained. The target localization network model in this embodiment can be trained according to the localization network model training method of any embodiment of this application. Input data is determined based on the current channel state information and input into the target localization network model for localization. The target localization network model analyzes the current channel state information based on the knowledge learned during training. For example, the current channel state information is the channel state information between the user equipment and multiple anchor nodes. The current channel state information is concatenated to obtain a current channel state information vector, which is then input into the target localization network model for localization. Alternatively, in this embodiment, the current channel state information obtained is data that has already been concatenated into a vector, and this current channel state information is directly input into the target localization network model for localization.
[0236] The target localization network model can consist of a feature encoder and a feature mapping layer, or it can consist of a feature encoder, a feature location extraction layer, and a feature dimensionality reduction layer. If the target localization network model consists of a feature encoder and a feature mapping layer, the current channel state information is encoded by the feature encoder, and the encoded spatial features are then input to the feature mapping layer for feature mapping to obtain coordinate data, which is then output. If the target localization network model consists of a feature encoder, a feature location extraction layer, and a feature dimensionality reduction layer, the current channel state information is encoded by the feature encoder, and the encoded spatial features are then input to the feature location extraction layer for location-related feature extraction. The extracted location-related features are then input to the feature dimensionality reduction layer for coordinate projection to obtain coordinate data, which is then output.
[0237] S403. Determine the location information of the user equipment to be located based on the output of the target positioning network model.
[0238] The location information of the user equipment to be located is determined based on the coordinate data output by the target localization network model. For example, the coordinate data output by the target localization network model can be used as the location information of the user equipment to be located. The location information can be coordinate values or other information describing the location.
[0239] This application provides a user equipment positioning method. The method uses a pre-trained target positioning network model to locate the user equipment to be located based on the current channel state information. The location information of the user equipment to be located is determined based on the output of the target positioning network model, thereby achieving accurate positioning of the user equipment to be located. The target positioning network model used for positioning in this application has high precision and high positioning accuracy, and low training cost, which can achieve low-cost and high-precision positioning.
[0240] Example 5
[0241] Figure 11This is a schematic diagram of the structure of a localization network model training device provided in Embodiment 5 of this application. Figure 11 As shown, the device includes: a dataset acquisition module 51, a model pre-training module 52, and a model fine-tuning module 53.
[0242] The dataset acquisition module 51 is used to acquire a pre-training dataset and a fine-tuning dataset. The pre-training dataset includes at least first channel state information, and the fine-tuning dataset includes second channel state information and coordinate information.
[0243] The model pre-training module 52 is used to train a pre-trained network model based on the pre-training dataset, wherein the pre-trained network model includes a feature encoder.
[0244] The model fine-tuning module 53 is used to construct an initial localization network model based on the pre-trained feature encoder, and to fine-tune and train the initial localization network model based on the fine-tuning dataset to obtain the target localization network model.
[0245] This application provides a localization network model training device that solves the problems of low localization accuracy and high cost. The device trains the pre-trained network model using the first channel state information in the pre-training dataset. During pre-training, coordinate information does not need to be collected, effectively reducing data acquisition costs. The pre-trained network model includes a feature encoder. An initial localization network model is constructed based on the feature encoder obtained after pre-training. The initial localization network model is then fine-tuned using a fine-tuning dataset, which includes second channel state information and coordinate information. This results in an initial localization network model with high localization accuracy. Although the fine-tuning dataset includes coordinate information, only a small amount of data is needed, significantly reducing the amount of coordinate information required and effectively lowering data acquisition costs. By combining pre-training and fine-tuning steps, a high-precision target localization network model is obtained, improving localization accuracy while maintaining low cost.
[0246] The localization network model training device provided in this application embodiment can execute the localization network model training method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of the execution method.
[0247] Example 6
[0248] Figure 12 This is a schematic diagram of a user equipment positioning device provided in Embodiment Six of this application. Figure 12 As shown, the device includes: a current channel information acquisition module 61, a model input module 62, and a location information determination module 63.
[0249] Current channel information acquisition module 61 is used to acquire the current channel status information of the user equipment to be located;
[0250] The model input module 62 is used to perform positioning based on the current channel state information and the target positioning network model, wherein the target positioning network model is trained according to the positioning network model training method described in any embodiment of this application.
[0251] The location information determination module 63 is used to determine the location information of the user equipment to be located based on the output of the target positioning network model.
[0252] This application provides a user equipment positioning device, which uses a pre-trained target positioning network model to locate the user equipment to be located based on the current channel state information. The location information of the user equipment to be located is determined based on the output of the target positioning network model, thereby achieving accurate positioning of the user equipment to be located. The target positioning network model used for positioning in this application has high precision and high positioning accuracy, and low training cost, which can achieve low-cost and high-precision positioning.
[0253] The user equipment positioning device provided in this application embodiment can execute the user equipment positioning method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of executing the method.
[0254] Example 7
[0255] Figure 13 A schematic diagram of an electronic device is provided, which can be used to implement the methods provided in the embodiments of this application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.
[0256] like Figure 13As shown, the electronic device 70 includes at least one processor 71 and a memory, such as a read-only memory (ROM) 72 and a random access memory (RAM) 73, communicatively connected to the at least one processor 71. The memory stores computer programs executable by the at least one processor. The processor 71 can perform various appropriate actions and processes based on the computer program stored in the ROM 72 or loaded into the RAM 73 from storage unit 78. The RAM 73 can also store various programs and data required for the operation of the electronic device 70. The processor 71, ROM 72, and RAM 73 are interconnected via a bus 74. An input / output (I / O) interface 75 is also connected to the bus 74.
[0257] Multiple components in electronic device 70 are connected to I / O interface 75, including: input unit 76, such as keyboard, mouse, etc.; output unit 77, such as various types of monitors, speakers, etc.; storage unit 78, such as disk, optical disk, etc.; and communication unit 79, such as network card, modem, wireless transceiver, etc. Communication unit 79 allows electronic device 70 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0258] Processor 71 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 71 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 71 performs the various methods and processes described above, such as localization network model training or user device localization methods.
[0259] In some embodiments, the location network model training or user equipment localization method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 78. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 70 via ROM 72 and / or communication unit 79. When the computer program is loaded into RAM 73 and executed by processor 71, one or more steps of the location network model training or user equipment localization method described above may be performed. Alternatively, in other embodiments, processor 71 may be configured to perform the location network model training or user equipment localization method by any other suitable means (e.g., by means of firmware).
[0260] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0261] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0262] This application provides a computer program product, which includes a computer program that, when executed by a processor, implements the positioning network model training or user equipment positioning method described in any embodiment of this application.
[0263] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0264] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0265] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0266] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0267] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.
[0268] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for training a localization network model, characterized in that, include: Obtain a pre-training dataset and a fine-tuning dataset, wherein the pre-training dataset includes at least first channel state information, and the fine-tuning dataset includes second channel state information and coordinate information; The pre-trained network model is trained based on the pre-trained dataset, and the pre-trained network model includes a feature encoder; An initial localization network model is constructed based on the pre-trained feature encoder, and the initial localization network model is fine-tuned and trained based on the fine-tuning dataset to obtain the target localization network model.
2. The method according to claim 1, characterized in that, The pre-training dataset also includes signal strength information; training the pre-trained network model based on the pre-training dataset includes: The first channel state information in the pre-trained dataset is divided according to the location of the first user equipment. The first channel state information collected by the first user equipment at the same location and the anchor node are concatenated into a first channel state information vector. The signal strength information in the pre-training dataset is divided according to the location of the first user equipment. The signal strength information collected by the first user equipment at the same location and between the anchor node is concatenated into a signal strength information vector. The signal strength information vector corresponds one-to-one with the first channel state information vector. Cluster the signal strength information vectors and divide the first channel state information vectors according to the clustering results to generate a channel state information set corresponding to each category label; Positive and negative samples are constructed based on each set of channel state information and each first channel state information vector, and the pre-trained network model is trained.
3. The method according to claim 2, characterized in that, The step involves partitioning each first channel state information vector based on the clustering results to generate a channel state information set corresponding to each category label, including: Based on the clustering results, determine the category label corresponding to each signal strength information vector; Based on the category label corresponding to the signal strength information vector, determine the category label of the first channel state information vector corresponding to the signal strength information vector; For each category label, determine the first channel state information vector corresponding to the category label and form a channel state information set.
4. The method according to claim 2, characterized in that, The pre-trained network model also includes: a multilayer perceptron, a momentum feature encoder, and a momentum multilayer perceptron; The step of constructing positive and negative samples based on each set of channel state information and each vector of the first channel state information, and training the pre-trained network model, includes: For each set of channel state information, the first channel state information vector in the set of channel state information is sequentially input into the momentum feature encoder for feature encoding to obtain the first feature space code. Each first feature space code is input into the momentum multilayer perceptron for dimensionality reduction to obtain the first low-dimensional feature. A feature queue is generated based on each first low-dimensional feature. Select a first preset number of first channel state information vectors from each of the first channel state information vectors and denote them as the first target channel state information vectors; For each first target channel state information vector, determine the target label category corresponding to the first target channel state information vector, take the first channel state information vector corresponding to the first first low-dimensional feature in the feature queue corresponding to the target label category as a positive sample, and extract the first low-dimensional feature from the remaining feature queue to form a negative sample set; The parameters of the feature encoder, multilayer perceptron, momentum feature encoder and momentum multilayer perceptron in the pre-trained network model are updated according to each first target channel state information vector and its corresponding positive and negative sample sets. Update the feature queues corresponding to each of the first target channel state information vectors; Determine whether the first training stop condition is met. If yes, determine that the training of the pre-trained network model is complete. If not, return to the step of selecting a first preset number of first channel state information vectors from each of the first channel state information vectors and recording them as the first target channel state information vector.
5. The method according to claim 4, characterized in that, The step of updating the parameters of the feature encoder, multilayer perceptron, momentum feature encoder, and momentum multilayer perceptron in the pre-trained network model based on each of the first target channel state information vectors and their corresponding positive and negative sample sets includes: For each first target channel state information vector, the first target channel state information vector is input into the feature encoder for feature encoding to obtain a second feature space code. The second feature space code is then input into the multilayer perceptron for dimensionality reduction to obtain a second low-dimensional feature. The positive sample corresponding to the first target channel state information vector is input into the momentum feature encoder for feature encoding to obtain the third feature space code. The third feature space code is input into the momentum multilayer perceptron for dimensionality reduction to obtain the third low-dimensional feature. The first loss function is calculated based on the second low-dimensional feature, the third low-dimensional feature, and the negative sample set corresponding to each of the first target channel state information vectors; The parameters of the feature encoder, the multilayer perceptron, the momentum feature encoder, and the momentum multilayer perceptron are updated according to the first loss function.
6. The method according to claim 5, characterized in that, The step of updating the feature queues corresponding to each of the first target channel state information vectors includes: For each feature queue corresponding to the first target channel state information vector, delete the first low-dimensional feature and the first low-dimensional feature corresponding to the first target channel state information vector in the feature queue, and add the second low-dimensional feature and the third low-dimensional feature corresponding to the first target channel state information vector to the feature queue.
7. The method according to claim 1, characterized in that, The initial localization network model includes a feature encoder and a feature mapping layer. The step of fine-tuning and training the initial localization network model based on the fine-tuning dataset to obtain the target localization network model includes: The second channel state information in the fine-tuning dataset is divided according to the location of the second user equipment. The second channel state information collected by the second user equipment at the same location and the anchor node are concatenated into a second channel state information vector. For each second channel state information vector, the second channel state information vector is input into the feature encoder for feature encoding to obtain a fourth feature space code; the fourth feature space code is input into the feature mapping layer for feature mapping to obtain a first coordinate prediction value; The second loss function is calculated based on the first coordinate prediction value and the coordinate information corresponding to each second channel state information vector; The feature mapping layer is updated according to the second loss function; If the first fine-tuning stop condition is not met, then based on the updated feature mapping layer, return to the steps of: for each second channel state information vector, inputting the second channel state information vector into the feature encoder for feature encoding to obtain the fourth feature space encoding; inputting the fourth feature space encoding into the feature mapping layer for feature mapping to obtain the first coordinate prediction value; If the first fine-tuning stopping condition is met, a target localization network model is formed based on the parameters of the current feature mapping layer.
8. The method according to claim 1, characterized in that, The acquisition of the pre-trained dataset includes: Obtain the first location of the area to be located, and set at least one first user device at each of the first locations; For each first user equipment set at each first point, the first channel state information between the first user equipment and at least one anchor node is obtained and concatenated into a first channel state information vector. For each first location, a training subset dataset corresponding to the first location is formed based on the first channel state information vectors corresponding to all first user equipment at the first location. A pre-training dataset is formed based on each of the aforementioned training subsets.
9. The method according to claim 1, characterized in that, Obtain the fine-tuning dataset, including: Obtain the second location of the area to be located, and set at least one second user device at each of the second locations; For each second point, obtain the coordinate information of a second user equipment in the second point and the second channel status information between the second user equipment and at least one anchor node, and concatenate the second channel status information between the second user equipment and at least one anchor node into a second channel status information vector. Based on the coordinate information corresponding to each second point and the second channel state information vector, a fine-tuning sub-dataset corresponding to the second point is formed; A fine-tuning dataset is formed based on each of the aforementioned fine-tuning sub-datasets.
10. The method according to claim 1, characterized in that, The pre-trained network model further includes: a feature flattening layer; the step of training the pre-trained network model based on the pre-trained dataset includes: Extract a second preset number of first channel state information vectors from the pre-trained dataset and denot them as the second target channel state information vectors. The first channel state information vectors are obtained by concatenating the first channel state information. For each second target channel state information vector, construct positive and negative samples of the second target channel state information vector; The second target channel state information vector and its corresponding positive and negative samples are input into the feature encoder for feature encoding to obtain the fifth feature space code. Each of the fifth feature space codes is input into the feature flattening layer for feature flattening processing to obtain the feature sequence. The third loss function is determined based on the feature sequence corresponding to each of the second target channel state information vectors; The model parameters of the pre-trained network model are updated according to the third loss function; Determine whether the second training stop condition is met. If yes, determine that the training of the pre-trained network model is complete. If not, return to the step of extracting a second preset number of first channel state information vectors from the pre-trained dataset and recording them as the second target channel state information vectors.
11. The method according to claim 10, characterized in that, The construction of the positive and negative samples of the target channel state information vector includes: For each second target channel state information vector, a first channel state information vector is extracted from the training subset corresponding to the second target channel state information vector as a positive sample, and the positive sample is different from the second target channel state information vector; The remaining first channel state information vectors in the second preset number of first channel state information vectors are taken as candidate vectors; for each candidate vector, a first channel state information vector is extracted from the training subset corresponding to the candidate vector as a negative sample, and each candidate vector is taken as a negative sample.
12. The method according to claim 1, characterized in that, The initial localization network model includes a feature encoder, a feature location extraction layer, and a feature dimensionality reduction layer; The step of fine-tuning and training the initial localization network model based on the fine-tuned dataset to obtain the target localization network model includes: Extract at least one fine-tuning subset from the fine-tuning dataset as the target fine-tuning subset; For each target fine-tuning sub-dataset, the second channel state information vector in the target fine-tuning sub-dataset is input into the sequentially connected feature encoder, feature position extraction layer and feature dimensionality reduction layer to obtain the second coordinate prediction value; The fourth loss function is determined based on the second coordinate prediction value and coordinate information corresponding to each of the target fine-tuning sub-data sets; The parameters of the feature location extraction layer and the feature dimensionality reduction layer are updated based on the fourth loss function. If the second fine-tuning stopping condition is not met, then based on the updated feature location extraction layer and the feature dimensionality reduction layer, return to the step of extracting at least one fine-tuning subset from the fine-tuning dataset as the target fine-tuning subset; If the second fine-tuning stopping condition is met, a target localization network model is formed based on the parameters of the current feature location extraction layer and feature dimensionality reduction layer.
13. A user equipment positioning method, characterized in that, include: Obtain the current channel status information of the user equipment to be located; The target positioning network model is used to perform positioning based on the current channel state information and the target positioning network model, which is trained by the positioning network model training method according to any one of claims 1-12. The location information of the user equipment to be located is determined based on the output of the target positioning network model.
14. An electronic device, characterized in that, The electronic device includes: At least one processor, and a memory communicatively connected to said at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the localization network model training method according to any one of claims 1-12 or the user equipment localization method according to claim 13.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the positioning network model training method of any one of claims 1-12 or the user equipment positioning method of claim 13.
16. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the positioning network model training method according to any one of claims 1-12 or the user equipment positioning method according to claim 13.