Zero-lens indoor positioning method and system based on personalized federated learning
By preprocessing local CSI data and model training on the client, only uploading model parameters, the problems of large calculation volume and poor security of traditional passive fingerprint positioning method are solved, the positioning accuracy and adaptability are improved, and personalized indoor positioning is achieved Serve.
Patent Information
- Application Number
- CN202411152005.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The traditional passive fingerprint positioning method requires collecting a large number of signal samples and uploading them to the server, resulting in large amounts of calculations and poor security. In a multipath propagation environment, fluctuations in WiFi signal strength will lead to reduced positioning accuracy.
Using a method based on personalized federated learning, local CSI data is collected and preprocessed on the client, amplitude and phase information are extracted as features, local model training is carried out, model parameter update is uploaded, and the central server coordinates the synchronization of model parameters and Aggregate to form a global model to adapt to different environments.
It improves the robustness of the positioning results, avoids privacy leakage problems in data upload, allows the model to quickly adapt to environmental changes, and provides personalized positioning services.
Smart Images

Figure CN118890595A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of WiFi positioning and federated learning, and in particular to a zero-shot indoor positioning method and system based on personalized federated learning. Background Art
[0002] With the rapid development of wireless signal technology, indoor positioning of people using WiFi has become a popular technology, with huge application space in human detection, security protection, smart home applications, etc. Classic methods of Wi-Fi indoor positioning include estimating distance by measuring signal strength or signal propagation time, such as RSSI, TOA, TDOA, and positioning by measuring the angle of signal arrival, such as AOA. However, these methods have certain limitations in practical applications, especially in multipath propagation environments, where fluctuations in signal strength may lead to reduced positioning accuracy.
[0003] The article Research on Passive Indoor Person Detection and Positioning Technology Based on CSI (Xun Wenjing. Jiangsu: Nanjing University of Posts and Telecommunications, 2021.) proposes to combine local CSI data and BP neural network to realize passive fingerprint positioning. The person being tested does not need to wear any equipment. In the offline stage, local CSI data of three situations, namely, no target, static target and dynamic target, are collected indoors, and the collected data is preprocessed. Then, the CSI features of the three situations are extracted as fingerprints, and the data in the offline fingerprint library is used to train the neural network. In the online stage, the collected local CSI data is processed and input into the neural network, and the neural network participates in outputting the prediction results. Although this method has a high accuracy rate, changes in the indoor environment will affect the Wi-Fi signal, which in turn affects the accuracy of detection, and when training the model, the uploaded data will involve privacy issues.
[0004] Therefore, it is necessary to develop a technology that can both enhance the adaptability of the system and protect user privacy. Summary of the invention
[0005] The purpose of the present invention is to provide a zero-shot indoor positioning method and system based on personalized federated learning in order to solve the problems that the traditional passive fingerprint positioning method needs to collect a large number of signal samples and upload them to the server, which leads to large calculation amount and poor security, and the fluctuation of WiFi signal strength in a multipath propagation environment leads to reduced positioning accuracy.
[0006] The above-mentioned purpose of the present application is achieved through the following technical solutions: S1: Initialize the federated learning training environment and generate the initial global model; S2: Obtain local CSI data and perform preprocessing; S3: Build a fingerprint library based on the preprocessed local CSI data; S4: Based on the fingerprint library and the initial global model, personalized federated learning training is performed to obtain the trained global model; S5: Obtain the CSI data to be detected and input it into the trained global model, output the indoor positioning results and perform visualization.
[0007] This application uses the above technical solution to collect local CSI data on the client. The collected local CSI data is preprocessed to extract amplitude and phase information as features. The client performs model training locally and uses the extracted CSI feature data for training. There is no need to upload the original data to the central server, only the update of the model parameters is uploaded. The central server coordinates the synchronization of model parameters between the clients and adjusts the aggregation weight of the model parameters according to the data volume and historical contribution of the client. The central server integrates the model parameter updates uploaded by the client to form a global model, which can better adapt to the positioning requirements in different environments.
[0008] Optionally, step S1 includes: the initial global model adopts an RNN model, including: an input layer, a hidden layer and an output layer; the hidden layer uses a long short-term memory unit.
[0009] Optionally, step S2 includes: preprocessing including: Hampel outlier removal, wavelet denoising, and phase error elimination.
[0010] Optionally, step S3 includes: The amplitude information and phase information in the preprocessed local CSI data are added with position tags as fingerprints, which can be expressed as
[0011] in represents the amplitude at the receiving point, represents the phase of the receiving point, is the location tag; Indicates the number of data packets, M in total; Indicates the number of subcarriers, , Represents the N positions selected indoors; The first All the positions corresponding to The data of the packets are combined into a sequence ; Each sequence consists of 𝑀 time steps, each of which contains The feature vector of ,Right now Amplitude and phases;
[0012] in Representation sequence The data packet of the Mth time step; Concatenate the sequences at all positions to form a large input matrix
[0013]
[0014] Place the location tag Append to each sequence At the end of
[0015]
[0016] The sequence with labels Concatenate to form a large input matrix with labels , complete the construction of the fingerprint library: .
[0017] Optionally, step S4 includes: S41: The client divides the data in the local fingerprint database into a training set and a test set according to a preset ratio; S42: The central server constructs a weight vector according to the data in the local fingerprint library; S43: The central server extracts K clients to participate in personalized federated learning training according to the weight vector; Select K clients to participate in personalized federated learning; S43a: Calculate the weight of the client based on the linear combination of data volume and historical contribution. The formula is as follows:
[0018] in, Is the client The weight of Is the client The amount of data, Is the client The historical contribution of is a parameter between 0 and 1, which is used to balance the relative importance of data volume and historical contribution; N is the total number of clients connected to the central server; S43b: extracting clients according to their weights; Compute Client The cumulative weight distribution of :
[0019] Generates a value between 0 and Parameters between , Indicates the cumulative weight of the last client; Traversing the cumulative weight distribution , find the first one that satisfies Index , Client That is the extracted client; S43c: Repeat steps S43a to S43b until K clients are extracted; S44: K clients receive the global model parameters sent by the central server , and conduct personalized training; The trained local personalized parameters , input the initial global model for training, and obtain the trained global model; S44a: For each client , through the global model parameters , update the client's local model parameters;
[0020] in, are the global model parameters of the initial global model, Local personalized parameters; represents local model parameters; S44b: Update local personalized parameters using gradient descent and regularization algorithms :
[0021] in, is the learning rate, is the local CSI data of the kth client extracted, is the loss function; Indicates about The gradient of ; x represents the input sample, and y represents the label corresponding to the input sample; represents the regularization coefficient; is the square of the L2 norm, which is used to measure the vector The square root of the sum of the squares of all elements in ; S44c: The client uploads the updated local personalized parameters to the central server; The central server updates the global model parameters using the updated local personalized parameters :
[0022] in, is the learning rate on the server side; S44d: Repeat steps S44a to S44c until the objective function converges or reaches the specified number of training times, and output the trained global model; the objective function is as follows:
[0023] The global model after training is as follows:
[0024] .
[0025] Optionally, step S44 further includes: training the initial global model through an adaptive learning rate strategy; S441: The adaptive learning rate strategy updates the learning rate of the parameter by maintaining two sliding averages; the two sliding averages are: a first-order moment estimate and a second-order moment estimate; the first-order moment estimate is the mean of the gradient; the second-order moment estimate is the mean of the square of the gradient; Initialize global model parameters and local personalization parameters ; Initialize the first-order moment vector , and the second-order moment vector , ; Set the learning rate and hyperparameters =0.9, =0.999; S442: Get each client Local model parameters and local personalization parameters ; Using local datasets Perform forward propagation and calculate the predicted value; Specifically, the gradient calculation is based on the client local data set Therefore, each client will independently calculate the gradient based on its own dataset.
[0026] Calculate the loss function by combining the predicted value with the actual value obtained ; Calculating the loss function About Local Model Parameters and local personalization parameters The gradient of
[0027]
[0028] in, is the gradient of the local model parameters, The gradient of the local personalization parameter; Update the first-order and second-order moment vectors of local model parameters:
[0029]
[0030] Update the first-order moment vector and second-order moment vector of local personalized parameters:
[0031]
[0032] in is the first-order moment vector of the local model parameters, is the second-order moment vector of the local model parameters; is the first-order moment vector of the local personalized parameters, is the second-order moment vector of the local personalized parameters; Represents the first-order moment vector of the local model parameters at the previous iteration in the first-order moment vector update formula; represents the second-order moment vector of the local model parameters at the previous iteration in the second-order moment vector update formula; is the first-order moment vector of the local personalized parameter at the previous iteration in the first-order moment vector update formula; is the second-order moment vector of the local personalized parameter at the previous iteration in the second-order moment vector update formula; Correct the deviation between the first-order moment vector and the second-order moment vector:
[0033]
[0034]
[0035]
[0036] in, is the current time step; Use the corrected gradient to update the local model parameters and local personalization parameters :
[0037] The above formula is transformed as follows:
[0038] in, is a positive constant; S443: The server collects all updated local model parameters of the clients , use the FedProx algorithm to update the global model parameters ; Specifically, FedProx (Federalized Proximal Algorithm) is an optimization algorithm designed in the Federated Learning (FL) environment. The goal of FedProx is to maximize the performance of the global model while minimizing the distance between clients.
[0039] The objective function of FedProx is expressed as:
[0040] in Is the client The weight of Is the client The loss function is is the number of clients; The goal of FedProx is to find the optimal global model parameters such that:
[0041] in Is the client The distance between the data distribution and the global data distribution, is a hyperparameter that controls the balance between these two terms; is the optimal global model parameter; S444: Repeat step S442 and step S443 until the initial global model converges or reaches a predetermined training round.
[0042] A zero-shot indoor positioning system based on personalized federated learning, the system comprising: a display, a preset number of wifi devices and a central server; the preset number of wifi devices and the display are connected to the central server; The preset number of wifi devices are used to obtain the local CSI data of the client and the CSI data to be detected and transmit them to the central server; The central server is used to initialize the federated learning training environment and generate an initial global model; The central server is also used to pre-process the local CSI data; The central server is also used to perform personalized federated learning training based on the fingerprint library and the initial global model to obtain a trained global model; The central server is also used to obtain the CSI data to be detected and input it into the trained global model, and output the indoor positioning result; The display is used to visualize the indoor positioning results.
[0043] A computer-readable storage medium stores instructions, and when the instructions are executed, a zero-shot indoor positioning method based on personalized federated learning is performed.
[0044] The beneficial effects of the technical solution provided by this application are: In a multipath environment, relying solely on amplitude information may not be stable enough because signal reflections can cause amplitude fluctuations. In addition to amplitude, CSI phase information is added to the fingerprint library built around one receiving point to improve the robustness of the positioning result. Because only one receiving point is used instead of two or more, the system architecture can be simplified and computing resource requirements can be reduced.
[0045] The present invention uses a personalized federated learning method for indoor positioning. Compared with traditional methods, it does not require the client to upload private local CSI data to the central server, thus overcoming the privacy leakage problem that may occur during data upload. The client is allowed to adjust the model according to its own environment, which means that even if the environment changes (such as the addition of new Wi-Fi access points or the appearance of obstacles), the model can quickly adapt to these changes. Different users may have different positioning requirements, and personalized federated learning can provide more personalized positioning services based on the user's specific scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The present application will be further described below with reference to the accompanying drawings and embodiments, in which: Figure 1 is a step diagram in an embodiment of the present application; Figure 2 is a schematic diagram of sampling points in an embodiment of the present application; Figure 3 This is a block diagram of personalized federated learning with an adaptive strategy added in an embodiment of the present application; Figure 4 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to have a clearer understanding of the technical features, purposes and effects of the present application, the specific implementation methods of the present application are now described in detail with reference to the accompanying drawings.
[0048] An embodiment of the present application provides a zero-shot indoor positioning method based on personalized federated learning.
[0049] Please refer to Figure 1 , Figure 1 This is a step diagram of a zero-shot indoor positioning method based on personalized federated learning in an embodiment of the present application, including: S1: Initialize the federated learning training environment and generate the initial global model; Step S1 includes: the initial global model adopts an RNN model, including: an input layer, a hidden layer and an output layer; the hidden layer uses a long short-term memory unit.
[0050] Specifically, the initial global model of the central server used in this example is an RNN model, which includes an input layer, a hidden layer, and an output layer. The number of nodes in the input layer should be equal to the number of features in each time step, that is, , is the number of subcarriers, 2 because each subcarrier has two features (amplitude and phase). The hidden layer uses long short-term memory units to capture long-term dependencies. This application uses one LSTM layer with the number of units set to H. The number of nodes in the output layer should be equal to the number of positions, i.e. N.
[0051] S2: Obtain local CSI data and perform preprocessing; Step S2 includes: pre-processing including: Hampel outlier removal, wavelet denoising, and phase error elimination.
[0052] S3: Build a fingerprint library based on the preprocessed local CSI data; Step S3 includes: The amplitude information and phase information in the preprocessed local CSI data are added with position tags as fingerprints, which can be expressed as
[0053] in represents the amplitude at the receiving point, represents the phase of the receiving point, is the location tag; Indicates the number of data packets, M in total; Indicates the number of subcarriers, , Represents the N positions selected indoors; The first All the positions corresponding to The data of the packets are combined into a sequence ; Each sequence consists of 𝑀 time steps, each of which contains The feature vector of ,Right now Amplitude and phases;
[0054] in Representation sequence The data packet of the Mth time step; Concatenate the sequences at all positions to form a large input matrix
[0055]
[0056] Place the location tag Append to each sequence At the end of
[0057]
[0058] The sequence with labels Concatenate to form a large input matrix with labels , complete the construction of the fingerprint library: .
[0059] S4: Based on the fingerprint library and the initial global model, personalized federated learning training is performed to obtain the trained global model; Step S4 includes: S41: The client divides the data in the local fingerprint database into a training set and a test set according to a preset ratio; S42: The central server constructs a weight vector according to the data in the local fingerprint library; S43: The central server extracts K clients to participate in personalized federated learning training according to the weight vector; Select K clients to participate in personalized federated learning; S43a: Calculate the weight of the client based on the linear combination of data volume and historical contribution. The formula is as follows:
[0060] in, Is the client The weight of Is the client The amount of data, Is the client The historical contribution of is a parameter between 0 and 1, which is used to balance the relative importance of data volume and historical contribution; N is the total number of clients connected to the central server; S43b: extracting clients according to their weights; Compute Client The cumulative weight distribution of :
[0061] Generates a value between 0 and Parameters between , Indicates the cumulative weight of the last client; Traversing the cumulative weight distribution , find the first one that satisfies Index , Client That is the extracted client; S43c: Repeat steps S43a to S43b until K clients are extracted; S44: K clients receive the global model parameters sent by the central server , and conduct personalized training; The trained local personalized parameters , input the initial global model for training, and obtain the trained global model; S44a: For each client , through the global model parameters , update the client's local model parameters;
[0062] in, are the global model parameters of the initial global model, Local personalized parameters; represents local model parameters; S44b: Update local personalized parameters using gradient descent and regularization algorithms :
[0063] in, is the learning rate, is the local CSI data of the kth client extracted, is the loss function; Indicates about The gradient of ; x represents the input sample, and y represents the label corresponding to the input sample; represents the regularization coefficient; is the square of the L2 norm, which is used to measure the vector The square root of the sum of the squares of all elements in ; Specifically, Is the client Personalized parameters for adjusting global model parameters To adapt to local CSI data, is a regularization coefficient used to control the personalization parameter size.
[0064] S44c: The client uploads the updated local personalized parameters to the central server; The central server updates the global model parameters using the updated local personalized parameters :
[0065] in, is the learning rate on the server side; S44d: Repeat steps S44a to S44c until the objective function converges or reaches the specified number of training times, and output the trained global model; the objective function is as follows:
[0066] The global model after training is as follows:
[0067] .
[0068] Step S44 also includes: training the initial global model through an adaptive learning rate strategy; S441: The adaptive learning rate strategy updates the learning rate of the parameter by maintaining two sliding averages; the two sliding averages are: a first-order moment estimate and a second-order moment estimate; the first-order moment estimate is the mean of the gradient; the second-order moment estimate is the mean of the square of the gradient; Initialize global model parameters and local personalization parameters ; Initialize the first-order moment vector , and the second-order moment vector , ; Set the learning rate and hyperparameters =0.9, =0.999; S442: Get each client Local model parameters and local personalization parameters ; Using local datasets Perform forward propagation and calculate the predicted value; Specifically, the gradient calculation is based on the client local data set Therefore, each client will independently calculate the gradient based on its own dataset.
[0069] Calculate the loss function by combining the predicted value with the actual value obtained ; Calculating the loss function About Local Model Parameters and local personalization parameters The gradient of
[0070]
[0071] in, is the gradient of the local model parameters, The gradient of the local personalization parameter; Update the first-order and second-order moment vectors of local model parameters:
[0072]
[0073] Update the first-order moment vector and second-order moment vector of local personalized parameters:
[0074]
[0075] in is the first-order moment vector of the local model parameters, is the second-order moment vector of the local model parameters; is the first-order moment vector of the local personalized parameters, is the second-order moment vector of the local personalized parameters; Represents the first-order moment vector of the local model parameters at the previous iteration in the first-order moment vector update formula; represents the second-order moment vector of the local model parameters at the previous iteration in the second-order moment vector update formula; is the first-order moment vector of the local personalized parameter at the previous iteration in the first-order moment vector update formula; is the second-order moment vector of the local personalized parameter at the previous iteration in the second-order moment vector update formula; Correct the deviation between the first-order moment vector and the second-order moment vector:
[0076]
[0077]
[0078]
[0079] in, is the current time step; Use the corrected gradient to update the local model parameters and local personalization parameters :
[0080] The above formula is transformed as follows:
[0081] in, is a positive constant; S443: The server collects all updated local model parameters of the clients , use the FedProx algorithm to update the global model parameters ; Specifically, FedProx (Federalized Proximal Algorithm) is an optimization algorithm designed in the Federated Learning (FL) environment. The goal of FedProx is to maximize the performance of the global model while minimizing the distance between clients.
[0082] The objective function of FedProx is expressed as:
[0083] in Is the client The weight of Is the client The loss function is is the number of clients; The goal of FedProx is to find the optimal global model parameters such that:
[0084] in Is the client The distance between the data distribution and the global data distribution, is a hyperparameter that controls the balance between these two terms; is the optimal global model parameter; S444: Repeat step S442 and step S443 until the initial global model converges or reaches a predetermined training round.
[0085] Specifically, an adaptive learning rate strategy is used to make local personalized parameters converge to the optimal value faster, thereby improving the efficiency and effect of model training. Figure 3As shown. The processor includes a data acquisition module; the data acquisition module includes an Intel 5300 network card and an antenna. The antenna is connected to the corresponding interface NIC of the Intel 5300 network card. Since this version of the network card has at most 3 interfaces for connecting antennas, the number of antennas is at most 3. The antenna is placed vertically on the desktop.
[0086] S5: Obtain the CSI data to be detected and input it into the trained global model, output the indoor positioning results and perform visualization.
[0087] For details, see Figure 2 , is a schematic diagram of the sampling points of a client.,A central server and multiple clients, which can be dedicated Wi-Fi access points or Internet of Things (IoT) devices such as smart refrigerators, smart air conditioners, and smart robots, can collect local CSI data of the device's surrounding environment and output positioning information to users.
[0088] Reference Figure 4 , Figure 4 It is a module diagram of a system disclosed in an embodiment of the present application, the system includes: a display, a preset number of wifi devices and a central server; the preset number of wifi devices and the display are connected to the central server; The preset number of wifi devices are used to obtain the local CSI data of the client and the CSI data to be detected and transmit them to the central server; The central server is used to initialize the federated learning training environment and generate an initial global model; The central server is also used to pre-process the local CSI data; The central server is also used to perform personalized federated learning training based on the fingerprint library and the initial global model to obtain a trained global model; The central server is also used to obtain the CSI data to be detected and input it into the trained global model, and output the indoor positioning result; The display is used to visualize the indoor positioning results.
[0089] The present application also discloses a computer-readable storage medium storing a plurality of instructions, which are suitable for a processor to load to execute the above-mentioned zero-shot indoor positioning method based on personalized federated learning.
[0090] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0091] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A zero-shot indoor positioning method based on personalized federated learning, characterized in that: The method comprises the following steps: S1: Initialize the federated learning training environment and generate the initial global model; S2: Obtain local CSI data and perform preprocessing; S3: Build a fingerprint library based on the preprocessed local CSI data; S4: Based on the fingerprint library and the initial global model, personalized federated learning training is performed to obtain the trained global model; S5: Obtain the CSI data to be detected and input it into the trained global model, output the indoor positioning results and perform visualization.
2. A zero-shot indoor positioning method based on personalized federated learning as claimed in claim 1, characterized in that: Step S1 includes: the initial global model adopts an RNN model, including: an input layer, a hidden layer and an output layer; the hidden layer uses a long short-term memory unit.
3. A zero-shot indoor positioning method based on personalized federated learning as claimed in claim 1, characterized in that: Step S2 includes: pre-processing including: Hampel outlier removal, wavelet denoising, and phase error elimination.
4. The zero-shot indoor positioning method based on personalized federated learning as claimed in claim 1, characterized in that: Step S3 includes: The amplitude information and phase information in the preprocessed local CSI data are added with position tags as fingerprints, which can be expressed as in represents the amplitude at the receiving point, represents the phase of the receiving point, is the location tag; Indicates the number of data packets, a total of M; Indicates the number of subcarriers, , Represents the N positions selected indoors; The first All the positions corresponding to The data of the packets are combined into a sequence ; Each sequence consists of 𝑀 time steps, each of which contains The feature vector of ,Right now Amplitude and phases; in Representation sequence The data packet of the Mth time step; Concatenate the sequences at all positions to form a large input matrix Place the location tag Append to each sequence At the end of The sequence with labels Concatenate to form a large input matrix with labels , complete the construction of the fingerprint library: 。 5. The zero-shot indoor positioning method based on personalized federated learning as claimed in claim 1, characterized in that: Step S4 includes: S41: The client divides the data in the local fingerprint database into a training set and a test set according to a preset ratio; S42: The central server constructs a weight vector according to the data in the local fingerprint library; S43: The central server extracts K clients to participate in personalized federated learning training according to the weight vector; Select K clients to participate in personalized federated learning; S43a: Calculate the weight of the client based on the linear combination of data volume and historical contribution. The formula is as follows: in, Is the client The weight of Is the client The amount of data, Is the client The historical contribution of is a parameter between 0 and 1, which is used to balance the relative importance of data volume and historical contribution; N is the total number of clients connected to the central server; S43b: extracting clients according to their weights; Compute Client The cumulative weight distribution of : Generates a value between 0 and Parameters between , Indicates the cumulative weight of the last client; Traversing the cumulative weight distribution , find the first one that satisfies Index , Client That is the extracted client; S43c: Repeat steps S43a to S43b until K clients are extracted; S44: K clients receive the global model parameters sent by the central server , and conduct personalized training; The trained local personalized parameters , input the initial global model for training, and obtain the trained global model; S44a: For each client , through the global model parameters , update the client's local model parameters; in, are the global model parameters of the initial global model, Local personalized parameters; represents local model parameters; S44b: Update local personalized parameters using gradient descent and regularization algorithms : in, is the learning rate, is the local CSI data of the kth client extracted, is the loss function; Indicates about The gradient of ; x represents the input sample, and y represents the label corresponding to the input sample; represents the regularization coefficient; is the square of the L2 norm, which is used to measure the vector The square root of the sum of the squares of all elements in ; S44c: The client uploads the updated local personalized parameters to the central server; The central server updates the global model parameters using the updated local personalized parameters : in, is the learning rate on the server side; S44d: Repeat steps S44a to S44c until the objective function converges or reaches the specified number of training times, and output the trained global model; the objective function is as follows: The global model after training is as follows: 。 6. A zero-shot indoor positioning method based on personalized federated learning as claimed in claim 5, characterized in that: Step S44 also includes: training the initial global model through an adaptive learning rate strategy; S441: The adaptive learning rate strategy updates the learning rate of the parameter by maintaining two sliding averages; the two sliding averages are: a first-order moment estimate and a second-order moment estimate; the first-order moment estimate is the mean of the gradient; the second-order moment estimate is the mean of the square of the gradient; Initialize global model parameters and local personalization parameters ; Initialize the first-order moment vector , and the second-order moment vector , ; Set the learning rate and hyperparameters =0.9, =0.999; S442: Get each client Local model parameters and local personalization parameters ; Using local datasets Perform forward propagation and calculate the predicted value; Calculate the loss function by combining the predicted value with the actual value obtained ; Calculating the loss function About Local Model Parameters and local personalization parameters The gradient of in, is the gradient of the local model parameters, The gradient of the local personalization parameter; Update the first-order and second-order moment vectors of local model parameters: Update the first-order moment vector and second-order moment vector of local personalized parameters: in is the first-order moment vector of the local model parameters, is the second-order moment vector of the local model parameters; is the first-order moment vector of the local personalized parameters, is the second-order moment vector of the local personalized parameters; Represents the first-order moment vector of the local model parameters at the previous iteration in the first-order moment vector update formula; represents the second-order moment vector of the local model parameters at the previous iteration in the second-order moment vector update formula; is the first-order moment vector of the local personalized parameter at the previous iteration in the first-order moment vector update formula; is the second-order moment vector of the local personalized parameter at the previous iteration in the second-order moment vector update formula; Correct the deviation between the first-order moment vector and the second-order moment vector: in, is the current time step; Use the corrected gradient to update the local model parameters and local personalization parameters : The above formula is transformed as follows: in, is a positive constant; S443: The server collects all updated local model parameters of the clients , use the FedProx algorithm to update the global model parameters ; The objective function of FedProx is expressed as: in Is the client The weight of Is the client The loss function is is the number of clients; The goal of FedProx is to find the optimal global model parameters such that: in Is the client The distance between the data distribution and the global data distribution, is a hyperparameter that controls the balance between these two terms; is the optimal global model parameter; S444: Repeat step S442 and step S443 until the initial global model converges or reaches a predetermined training round.
7. A zero-shot indoor positioning system based on personalized federated learning, used for a zero-shot indoor positioning method based on personalized federated learning as claimed in claims 1-6, characterized in that: The system includes: a display, a preset number of wifi devices and a central server; the preset number of wifi devices and the display are connected to the central server; The preset number of wifi devices are used to obtain the local CSI data of the client and the CSI data to be detected and transmit them to the central server; The central server is used to initialize the federated learning training environment and generate an initial global model; The central server is also used for the device to pre-process the local CSI data; The central server is also used to perform personalized federated learning training based on the fingerprint library and the initial global model to obtain a trained global model; The central server is also used to obtain the CSI data to be detected and input it into the trained global model, and output the indoor positioning result; The display is used to visualize the indoor positioning results.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed by a computer, the method according to any one of claims 1 to 6 is executed.
Citation Information
Patent Citations
CSI indoor positioning method based on stacked self-encoding network and SVM
CN111428819A
Indoor positioning method based on online pseudo label semi-supervised learning and personalized federated learning
CN114897063A
Lightweight weighted ensemble learning indoor CSI positioning method
CN116980824A
Indoor positioning fingerprint database construction method of federal generative adversarial network based on CycleGAN
CN117119395A
Fair federated learning method based on contribution and income collaborative balance
CN117933422A
