A federated learning method for differential private indoor positioning based on Android

Through the federated learning method of local training and differential privacy processing on mobile terminal devices, the problems of data silos and privacy protection in mobile terminal devices are solved, real-time and secure indoor positioning services are realized, and the overhead of cloud servers is reduced. Provides efficient and accurate positioning performance.

CN114970833BActive Publication Date: 2024-11-19LANZHOU JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210709776.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-22
Publication Date
2024-11-19
Estimated Expiration
2042-06-22

AI Technical Summary

Technical Problem

In mobile terminal devices, how to effectively train and collaborate deep learning models while protecting user data privacy, solve data silos, and adapt to the rapid growth of mobile terminal devices in daily life.

Method used

Using the differential private indoor positioning federated learning method based on Android, the indoor positioning model is trained locally through mobile terminal devices, and the model parameters are protected using differential privacy technology to avoid data being uploaded directly to untrusted edge servers, and the model is iteratively updated and Aggregation provides real-time, safe and accurate indoor positioning services.

Benefits of technology

It realizes intelligent collaborative training between multiple mobile terminal devices while protecting user privacy, reduces the computing and storage overhead of cloud servers, provides efficient and accurate indoor positioning services, and provides privacy protection and model performance. Good trade-offs were achieved between the two countries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114970833B_ABST
    Figure CN114970833B_ABST
Patent Text Reader

Abstract

A differential private indoor positioning federated learning method based on Android includes three stages: data collection and preprocessing, offline training and online positioning. In the data collection and preprocessing stage, a mobile terminal device collects RSS fingerprint data and eliminates irrelevant location points by calculating the Pearson correlation coefficient between the location point and the RSS fingerprint data. In the offline training stage, the preprocessed RSS fingerprint data is used to train an indoor positioning sub-model on the mobile terminal device, and the model parameters are locally processed for differential privacy protection and then uploaded to an edge server. The edge server performs trusted aggregation on the received model parameters and sends the latest aggregated model parameters to each mobile terminal device for the next iterative training until the optimal indoor positioning model is obtained. In the online positioning stage, the user collects the indoor RSS fingerprint data near him in real time and inputs it into the trained indoor positioning model to obtain a safe and reliable indoor positioning service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of indoor positioning, and in particular to an Android-based differential private indoor positioning federated learning method for protecting user data privacy when the user obtains services using location. Background Art

[0002] In recent years, with the rapid development of Internet of Things technology and the explosive growth of smart mobile terminal devices, mobile devices have penetrated into every aspect of our daily lives. With the increasing popularity of mobile devices and smart applications, the demand for mobile applications with machine learning services is also growing. Inspired by the great success of deep learning in many machine learning tasks, it has become a natural trend to push deep learning to mobile applications. However, there are many challenges in implementing deep learning in mobile applications, including the contradiction between the miniaturization of mobile terminal devices and the resource requirements of deep neural networks, and the privacy and security issues of personal data. At present, mobile terminal devices can process a large amount of data (such as pictures, videos, location information, etc.), making data-driven deep learning possible. However, due to various limitations such as the hardware carrying capacity and privacy of mobile terminal devices, the data at this stage exists in an isolated form, lacking effective interoperability and privacy protection, which makes it difficult to push deep learning to mobile applications.

[0003] On the other hand, data privacy leaks are frequent, wide-ranging and influential, and many companies are therefore caught in a dual crisis of legal data protection and social pressure. Some major user data leaks will become the focus of attention. According to Bloomberg, Amazon faces the largest data privacy leak fine in the history of the European Union. The main supervisory agency has imposed a fine of 746 million euros on it for violating strict data protection regulations. At present, all countries are strengthening the protection of data security and privacy. On May 25, 2018, the European Union began to implement the General Data Protection Regulation (GDPR), which aims to protect users' personal privacy and data security, and also imposes clear constraints on operators. When formulating user agreements, operators must use clear and unambiguous language, and users have the right to require operators to delete their personal data and stop operators from using user data for modeling. Once the regulations are violated, the operator may face reputational losses and huge fines. The "Personal Information Protection Law of the People's Republic of China" will officially come into effect on November 1, 2021. This law is an important legislation in the field of information security this year and the first special law in my country for personal information protection. The law implements the three legislative goals of protecting personal information rights and interests, regulating personal information processing activities, and promoting the rational use of personal information. The promulgation of this law will have a far-reaching impact on both users and the industry.

[0004] Artificial intelligence needs to learn from a large amount of data to mine the knowledge behind the data and bring out its value. But in reality, on the one hand, the data quality is poor and lacks labels; on the other hand, the data is scattered and isolated, and it is impossible to connect them. The traditional data processing model is often that one party collects data, then transfers it to another party for processing, cleaning and modeling, and finally sells the model to a third party. However, with the improvement of regulations and stricter monitoring, if the data leaves the collector or the user is not clear about the specific purpose of the model, the operator may violate the law. At the same time, data exists in the form of isolated islands, and the direct solution to the problem is to integrate the data into one party for processing. However, the crude aggregation of data is currently prohibited by laws and regulations. Therefore, how to legally break the data island while protecting data privacy is the current problem.

[0005] To solve the above problems, academia and industry have explored and studied the currently feasible solutions. To solve the problem of data islands, patent CN110632554A adopts a federated learning method. This method does not consider that cloud servers and edge nodes are untrustworthy, and there is a problem of privacy leakage. The present invention uses differential privacy technology to differentially perturb the model parameters trained locally and then sends them to the edge server, thereby protecting user privacy. Patent CN111866869A proposes a federated learning indoor positioning privacy protection method for edge computing, which uses differential privacy technology to perturb the RSS data collected by users and the model parameters uploaded to the cloud server. This method achieves the purpose of protecting user privacy. However, this method is based on cloud servers and edge nodes, and it is difficult to adapt to the exponential growth of mobile terminal devices in daily life. The present invention performs indoor positioning model training locally on mobile terminal devices, and protects user privacy through differential privacy technology, providing users with real-time, secure and accurate indoor positioning services. Summary of the invention

[0006] The present invention provides an Android-based differential private indoor positioning federated learning method to provide users with real-time, safe and accurate indoor positioning services.

[0007] The technical solution adopted by the present invention is:

[0008] A differential private indoor positioning federated learning method based on Android, the federated learning method is implemented in a system consisting of a mobile terminal device and an edge server;

[0009] The mobile terminal device is an Android-based smart phone. The user first uses the mobile terminal device to load a rasterized indoor area plan map, and then collects RSS fingerprint data from multiple wireless sensor beacons; after collecting the RSS fingerprint data, the user obtains the initial model parameters from the edge server, and uses the RSS fingerprint data on the mobile terminal device to train the local sub-model of indoor positioning. After each round of training, the trained model parameters are processed with differential privacy protection and uploaded to the edge server; in this architecture, it is considered that the mobile terminal devices are independent and trustworthy, and the mobile terminal devices do not have the ability to communicate with each other and exist in a data island state, and cannot collude to obtain the user's privacy information;

[0010] The edge server is an intelligent gateway with data computing and storage functions, which provides users with a channel to enter the network and the function of communicating with other server devices; first, the edge server will create a training task and initialize the indoor positioning model; then, the edge server aggregates the indoor positioning model parameters uploaded by each mobile terminal device, obfuscates the actual contribution of the participating mobile terminal devices, and sends the aggregated model parameters to each mobile terminal device to enable it to perform the next round of iterative training. The edge server continuously interacts and iterates with the mobile terminal devices to update the model until the model reaches the optimal level; finally, the trained optimal indoor positioning model is sent to each mobile terminal device to provide users with real-time, secure and accurate indoor positioning services; in this architecture, the edge server is considered untrustworthy.

[0011] The federated learning method includes three stages: data collection and preprocessing, offline training, and online positioning. In the data collection and preprocessing stage, the user first uses the mobile terminal device to collect the RSS fingerprint data of WiFi and BLE, and eliminates irrelevant location points by calculating the Pearson correlation coefficient between the location point and the RSS fingerprint data. In the offline training stage, the indoor positioning sub-model is trained on the mobile terminal device using the preprocessed RSS fingerprint data. In order to protect the privacy of the user's RSS fingerprint data and the privacy of the model parameters, the model parameters need to be differentially privacy protected locally and then uploaded to the edge server. Finally, the edge server performs trustworthy aggregation on the received model parameters and sends the latest aggregated model parameters to each mobile terminal device for the next iterative training until the optimal indoor positioning model is obtained. In the online positioning stage, the user collects the RSS fingerprint data of the WiFi and BLE nearby in real time, and inputs the collected RSS fingerprint data into the trained model to obtain the corresponding indoor positioning service.

[0012] The specific method of data collection and preprocessing is: the mobile terminal device collects RSS fingerprint data of a given indoor area through a wireless sensor beacon (d i ,ci ), and the collected RSS fingerprint data (d i ,c i ) is saved in the local database to form the indoor positioning RSS fingerprint data set D = {(d i ,c i )|1≤i≤N}; where D is the RSS fingerprint data of multiple wireless access points, i.e. APs, collected by the user's mobile terminal device and their corresponding location tag sets, Contains the RSS fingerprints corresponding to K APs beacons, c i ={(x i ,y i )|1≤i≤N} is the RSS record d i The corresponding real indoor plane coordinates, where x i Record d for RSS fingerprint data i The corresponding horizontal coordinate, y i Record d for RSS fingerprint data i The corresponding vertical coordinate.

[0013] The data collection process is as follows: first, an indoor map is designed according to the real indoor plane distribution, a real indoor RSS fingerprint data collection sample space is constructed, and the indoor plane map is divided into m×n grids according to a custom ratio; then, the divided grids are matched with the real indoor plane positions according to the ratio relationship; finally, the user collects RSS fingerprint data in each cell, and the center point of the current cell is used as the label of the data record. Each collected RSS fingerprint data record is represented as (d i ,c i ).

[0014] The offline training process is specifically as follows:

[0015] Each mobile terminal device first uses the collected indoor RSS fingerprint dataset D to train the indoor positioning sub-model, and then adds random Laplace noise Laplace(Δf / ε) to the trained indoor positioning sub-model parameters Θ and sends them to the edge server to achieve differential perturbation of the model parameters Θ of each mobile terminal device; where Θ is the indoor positioning sub-model parameter trained by each mobile terminal device, ε is the privacy budget parameter, Δf is the data sensitivity parameter, and Laplace(·) is the random noise that obeys the Laplace distribution.

[0016] After receiving the local indoor positioning sub-model parameters Θ' after differential privacy perturbation sent by each mobile terminal device, the edge server first performs global aggregation on it to confuse the actual contribution of each mobile terminal device and obtain the latest model parameters Θ s ; Then, the edge server updates the model parameters Θs The edge server sends the trained optimal indoor positioning model parameters Θ to each mobile terminal device for the next iterative training. Through the continuous interaction between the edge server and each mobile terminal device, the model parameters are continuously iterated and updated until the indoor positioning model performance reaches the optimal level. Finally, the edge server sends the trained optimal indoor positioning model parameters Θ to each mobile terminal device for the next iterative training. s It is sent to each mobile terminal device to provide users with real-time, safe and accurate indoor positioning services.

[0017] For the indoor positioning sub-model training, the optimization goal of the model training on any mobile terminal device is:

[0018]

[0019] Among them, model u (·,·) represents the local sub-model to be learned, model u (d i ) means that the data d i The output result of the model after inputting the model training, l(·,·) represents the model in RSS fingerprint data (d i ,c i ) represents the loss of the model on each mobile terminal device on its own dataset. The classification task l(·,·) is a standard cross entropy loss. Θ represents all model parameters to be learned, including weights and bias terms.

[0020] The differential privacy perturbation process for the indoor positioning model parameter Θ includes two stages: data sensitivity calculation and noise generation:

[0021] The sensitivity is calculated as shown in formulas (1) and (2):

[0022] Θ′=reshape(Θ′, width, height) (1)

[0023] Δf=|max(mean(Θ′, axis=1))-min(mean(Θ′, axis=1))| (2)

[0024] Among them, reshape(,) means to rearrange the list without changing the content of the list; reshape(Θ′, width, height) means to convert the one-dimensional data Θ′ into a two-dimensional array of width*height; max(,) means to find the maximum value of the elements, min(,) means to find the minimum value of the elements, mean(,) means to find the mean of the elements, and axis=1 means to find the mean of each row of elements in the two-dimensional list.

[0025] Noise generation and addition are as shown in formula (3):

[0026] Θ′=Θ+Laplace(Δf / ε u ) (3)

[0027] Where Laplace(·) is the random noise that satisfies the Laplace distribution, and the amount of noise added is controlled by the sensitivity Δf, where ε u To allocate the privacy protection budget to the user for differential perturbation on the mobile terminal device, Δf is calculated as shown in formula (2).

[0028] The edge server receives the model parameters θ′ from each mobile terminal device. i Aggregate and use the aggregated global model parameters Θ s Sent to the mobile terminal device, the edge server update is formalized as follows:

[0029]

[0030] Among them, Θ s is the model parameter, Θ′ i The local sub-model parameters uploaded by N mobile terminal devices, i = 1, 2, ..., N; based on this principle, continuous iteration is carried out to achieve coordinated update of edge servers and mobile terminal devices.

[0031] The specific process of online positioning is as follows:

[0032] The user first uses his mobile terminal device to collect the RSS fingerprint data of WiFi and BLE in a given indoor area in real time, and removes irrelevant location points by calculating the Pearson correlation coefficient between the location points and the RSS fingerprint data to obtain the preprocessed RSS fingerprint data c data ; Then c data Input it into the trained indoor positioning sub-model model(·) to obtain the corresponding indoor positioning service. The specific process can be expressed as:

[0033] S type =model(c data )

[0034] Where model(.) represents the trained indoor positioning model, c data is the data preprocessed by the user, S type The indoor positioning model returns the indoor positioning result to the user.

[0035] The present invention mainly solves three problems: 1) studying the security issues of indoor positioning model training on mobile terminal devices and the legality and compliance of data use, solving the problem of data islands, and realizing intelligent collaborative training and common benefit of positioning models while multiple participating users do not share private data; 2) considering the attack background of the adversary, all operations in the model training process are performed locally, and the user's sensitive information will not be directly uploaded to the edge server. Differential privacy technology is used to blur the actual contribution of each participating user during model training, and multi-level ε-differential privacy protection is realized, achieving a better trade-off between privacy protection strength, positioning model performance and time overhead; 3) During the model training, storage and inference process, this method can migrate computing resources to local and edge servers, greatly reducing the computing, storage and network overhead of cloud servers, while realizing the trusted federated training of indoor positioning models for multiple users, and ensuring efficient and accurate indoor positioning performance while protecting user privacy. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is the model training accuracy on the Mall dataset of the present invention;

[0037] Figure 2 is the model training loss on the Mall dataset of the present invention;

[0038] Figure 3 It is the time statistics on the Mall data set of the present invention;

[0039] Figure 4 It is the model training accuracy on the UJIIndoorLoc dataset of the present invention;

[0040] Figure 5 is the model training loss on the UJIIndoorLoc dataset of the present invention;

[0041] Figure 6 It is the time statistics on the UJIIndoorLoc dataset of the present invention;

[0042] Figure 7 is a system architecture diagram of the present invention;

[0043] Figure 8 This is a flow chart of offline training of the present invention;

[0044] Fig. 9 It is the online positioning flow chart of the present invention. DETAILED DESCRIPTION

[0045] The present invention and its effects are further described below in conjunction with the accompanying drawings.

[0046] like Figure 7As shown, the implementation system of the present invention is composed of two entities: a mobile terminal device and an edge server. The system description is as follows:

[0047] (1) Mobile terminal devices: They are Android-based smartphones. Each mobile terminal device first loads a rasterized map of an indoor area (e.g., a large shopping mall, an underground parking lot, an exhibition hall, etc.), and then collects RSS fingerprint data from multiple wireless sensor beacons. After obtaining the data, the initial model parameters are obtained from the edge server, and the mobile terminal device performs indoor positioning local sub-model training on the RSS fingerprint data. After each round of training, the trained model parameters are uploaded to the edge server. In order to solve the problem of data and model parameter privacy leakage, the model parameters are differentially privacy protected before uploading the model parameters, and then each mobile terminal sends the processed model parameters to the edge server. In this architecture, mobile terminal devices are considered to be independent and trustworthy.

[0048] (2) Edge server: An intelligent gateway with data computing and storage functions, which provides users with a channel to enter the network and the function of communicating with other server devices. First, the edge server will create a training task and initialize the indoor positioning model; then, the edge server aggregates the indoor positioning sub-model parameters uploaded by each mobile terminal device, obfuscates the actual contribution of the participating mobile terminal devices, and sends the aggregated model parameters to each mobile terminal device for the next round of iterative training. The edge server continuously interacts and iterates with the mobile terminal device to update the model until the model reaches the optimal level; finally, the trained optimal indoor positioning model is sent to each mobile terminal device to provide users with real-time, secure, and accurate indoor positioning services. In this architecture, the edge server is considered untrustworthy, so the uploaded model parameters need to be privacy-protected.

[0049] In the above system, the specific content of the federated learning indoor positioning privacy protection model based on mobile terminal devices is: first, by collecting the RSS fingerprint data of the current indoor area, the indoor positioning sub-model is trained locally on the mobile terminal device, and the trained model parameters are differentially privacy processed and uploaded to the edge server; then, the edge server receives the model parameters of each terminal device and aggregates them to obfuscate the actual contribution of each mobile terminal device; finally, the model is updated through continuous interaction between the edge server and the mobile terminal device until the model reaches the optimal level, and the trained ideal model is sent to each mobile terminal device to provide users with real-time, secure and accurate indoor positioning services.

[0050] The specific steps for implementing the present invention are as follows:

[0051] Step A: The mobile terminal device collects RSS fingerprint data through wireless sensor beacons (d i ,c i ), the mobile terminal device collects the RSS fingerprint data (d i ,c i ) is saved in the local database to form the indoor positioning RSS fingerprint data set D = {(d i ,c i )|1≤i≤N}, laying the foundation for the subsequent indoor positioning model training. Where D is the RSS fingerprints of multiple Aps collected by the user's mobile terminal device and their corresponding location tag set, Contains the RSS fingerprints corresponding to K APs beacons, c i ={(x i ,y i )|1≤i≤N} is the wireless RSS record d i The corresponding real indoor plane coordinates, where x i Record d for RSS fingerprint data i The corresponding horizontal coordinate, y i Record d for RSS fingerprint data i The corresponding vertical coordinate.

[0052] Further, the detailed process of step A is as follows:

[0053] Firstly, the indoor plane map is designed according to the real indoor plane distribution, the real indoor RSS collection sample space is constructed, and the indoor plane map is divided into m×n grids according to the custom ratio;

[0054] Then, the divided grid is matched to the real indoor plane position according to the proportional relationship;

[0055] Finally, the user collects RSS fingerprint data in each cell and uses the center point coordinates of the current cell as the label of the data record. Each collected RSS fingerprint data record is represented as (d i , c i ).

[0056] Step B: Each mobile terminal device first uses the collected indoor RSS fingerprint dataset D to train the local indoor positioning sub-model, and then adds the random Laplace noise Laplace(Δf / ε) (Definition 3) to the trained indoor positioning sub-model parameters Θ and sends it to the edge server to achieve differential perturbation of the model parameters Θ of each mobile terminal device (Definition 1); where Θ is the local indoor positioning sub-model parameter trained by each mobile terminal device, ε is the privacy budget parameter, Δf is the data sensitivity parameter as shown in Definition 2, and Laplace(·) is the random noise that obeys the Laplace distribution.

[0057] Further, the detailed process of step B is as follows:

[0058] For local sub-model training, the optimization goal of model training on any mobile terminal device is:

[0059]

[0060] Among them, model u (·) represents the local sub-model to be learned, model u (d i ) means that the data d i The output result of the model after inputting the model training, l(·,·) represents the model in RSS fingerprint data (d i , c i ) represents the loss of the model on each mobile terminal device on its own dataset. The classification task l(·,·) is a standard cross entropy loss. Θ represents all sub-model parameters to be learned, including weights and bias terms.

[0061] The differential privacy perturbation process for model parameters includes the following two stages: data sensitivity calculation and noise generation:

[0062] The sensitivity is calculated as shown in formulas (1) and (2):

[0063] Θ′=reshape(Θ′, width, height) (1)

[0064] Δf=|max(mean(Θ′, axis=1))-min(mean(Θ′, axis=1))| (2)

[0065] reshape(,) means rearranging the list without changing its contents. reshape(Θ′, width, height) means converting the one-dimensional data Θ′ into a two-dimensional array of width*height. max(,) means finding the maximum value of an element, min(,) means finding the minimum value of an element, mean(,) means finding the mean of an element, and axis=1 means finding the mean of each row of elements in a two-dimensional list.

[0066] Noise generation and addition are as shown in formula (3):

[0067] Θ′=Θ+Laplace(Δf / ε u ) (3)

[0068] Where Laplace(·) is the random noise that satisfies the Laplace distribution, and the amount of noise added is controlled by the sensitivity Δf, where εu is the privacy protection budget allocated to users for differential perturbations on mobile terminal devices.

[0069] Step C: First, the edge server processes the indoor positioning sub-model parameters θ′ uploaded by each mobile terminal device. i Aggregate and confuse the actual contribution of each mobile terminal device to obtain the latest model parameter Θ s ; Then, the edge server updates the model parameters Θ s The edge server sends the trained optimal indoor positioning model parameters to each mobile terminal device for the next iterative training. Through the continuous interaction between the edge server and each mobile terminal device, the model parameters are continuously iterated and updated until the indoor positioning model performance reaches the optimal level. Finally, the edge server sends the trained optimal indoor positioning model parameters Θ s It is sent to each mobile terminal device to provide users with real-time, safe and accurate indoor positioning services.

[0070] Further, the detailed process of step C is as follows:

[0071] The edge server receives the model parameters θ′ from each mobile terminal device i Aggregate and use the aggregated global model parameters Θ s The update of the edge server can be expressed as:

[0072]

[0073] Among them, Θ s is the model parameter, Θ′ i The local sub-model parameters uploaded by N mobile terminal devices, i = 1, 2, ..., N. Based on this principle, continuous iteration is carried out to achieve the coordinated update of edge servers and mobile terminal devices;

[0074] Step D: The user uses his mobile terminal device to collect the RSS fingerprint data of WiFi and BLE in a given indoor area in real time, and removes irrelevant location points by calculating the Pearson correlation coefficient between the location points and the RSS fingerprint data to obtain the preprocessed RSS fingerprint data c data .

[0075] Step E: c data Input into the trained indoor positioning model model(·), and after a series of calculations, the corresponding indoor positioning service is obtained. The formal expression is shown in the formula:

[0076] S type =model(c data )

[0077] Where model(.) represents the trained indoor positioning model, c data is the data preprocessed by the user, S type The indoor positioning model returns the indoor positioning result to the user.

[0078] Definition 1 (ε-differential privacy): Suppose there is a random algorithm is the set of all possible outputs, for any two adjacent data sets D and D′ that differ in at most one record and Subset of If the algorithm satisfy:

[0079]

[0080] Then the algorithm M is said to provide ε-differential privacy protection, where ε is called the privacy protection budget and P[·] represents the algorithm The probability of the result is calculated for the data sets D and D′. This definition ensures that the presence or absence of a single record does not significantly affect the algorithm Output.

[0081] Definition 2 (global sensitivity): Suppose function Q: The global sensitivity of Q is defined as follows:

[0082] Δf=max D,D′ ||Q(D)-Q(D′)||

[0083] Among them, ||Q(D)-Q(D′)|| is the 1-order norm distance between Q(D) and Q(D′), and sensitivity is used to characterize the maximum change caused by deleting any record in the data set. It is a key parameter for determining the amount of noise added.

[0084] Definition 3 (Laplace mechanism): The Laplace mechanism is applicable to numerical query results and is one of the basic implementation mechanisms of differential privacy protection. For a function f: Its sensitivity is Δf, so it is called f * (D) Provides ε-differential privacy protection.

[0085]

[0086] is a random noise that follows a Laplace distribution, with a scale parameter of Its probability density function is as follows:

[0087]

[0088] Experimental verification of the present invention

[0089] The experiment uses two RSS fingerprint datasets, Mall and UJIIndoorLoc, to evaluate the effectiveness and service quality of the present invention.

[0090] 1) Mall dataset: collected from a 31.8×14.95m 2 The overall area of ​​a shopping mall is divided into 10 sub-areas, with a total of 22 BLE beacons, which can stably detect signals from 35 WIFI APs. It has 7,000 valid samples, each of which contains an area ID and 57-dimensional RSS features.

[0091] 2) UJIIndoorLoc dataset: A 390×270m dataset collected from Universitat Jaume I 2 The dataset contains 19937 training samples and 1111 test samples, each of which contains a floor ID and 520-dimensional Wi-Fi RSS features.

[0092] In order to verify the feasibility of deep learning model training for mobile terminal devices, the present invention uses two fully connected layers to construct the indoor positioning model, sets the model iteration training times to 100 times, and verifies the feasibility of the present invention from three aspects: model training accuracy, model training loss and time statistics on two data sets. Figure 1 , Figure 2 and Figure 3 They are the model training accuracy, model training loss and time statistics on the Mall dataset. As can be seen from the figure, as the number of training iterations increases, the training accuracy and training time of the positioning model increase, while the training loss decreases. The training accuracy of the positioning model reaches 43%, the model training loss is about 1.6, and the training time is 36629ms. Figure 4 , Figure 5 and Figure 6 They are the model training accuracy, model training loss and time statistics on the UJIIndoorLoc dataset. As can be seen from the figure, with the increase in the number of training iterations, the training accuracy and training time of the positioning model are increasing, while the training loss is decreasing. On this dataset, the model training accuracy reaches 57%, the model training loss is 1.3, and the total training time is 143318ms. The experimental results show that the present invention verifies the feasibility of indoor positioning model training on the mobile terminal. Since only two fully connected layers are used, the model performance can be improved.

Claims

1. A differential private indoor positioning federated learning method based on Android, It is characterized in that The federated learning method is implemented in a system consisting of a mobile terminal device and an edge server; The mobile terminal device is an Android-based smart phone. The user first uses the mobile terminal device to load a rasterized indoor area plan map, and then collects RSS fingerprint data from multiple wireless sensor beacons; after collecting the RSS fingerprint data, the user obtains the initial model parameters from the edge server, and uses the RSS fingerprint data on the mobile terminal device to train the local sub-model of indoor positioning. After each round of training, the trained model parameters are processed with differential privacy protection and uploaded to the edge server; in this architecture, it is considered that the mobile terminal devices are independent and trustworthy, and the mobile terminal devices do not have the ability to communicate with each other and exist in a data island state, and cannot collude to obtain the user's privacy information; The edge server is an intelligent gateway with data computing and storage functions, which provides users with a channel to enter the network and the function of communicating with other server devices; first, the edge server will create a training task and initialize the indoor positioning model; then, the edge server aggregates the indoor positioning model parameters uploaded by each mobile terminal device, confuses the actual contribution of the participating mobile terminal devices, and sends the aggregated model parameters to each mobile terminal device to enable it to perform the next round of iterative training, and continuously interacts and iterates with the mobile terminal device through the edge server to update the model until the model reaches the optimal level; finally, the trained optimal indoor positioning model is sent to each mobile terminal device to provide users with real-time, secure and accurate indoor positioning services; in this architecture, the edge server is considered untrustworthy; The federated learning method includes three stages: data collection and preprocessing, offline training, and online positioning. In the data collection and preprocessing stage, users first use mobile terminal devices to collect RSS fingerprint data of WiFi and BLE, and eliminate irrelevant location points by calculating the Pearson correlation coefficient between the location points and the RSS fingerprint data. In the offline training stage, the indoor positioning sub-model is trained on the mobile terminal device using the pre-processed RSS fingerprint data. In order to protect the user's RSS fingerprint data privacy and model parameter privacy, the model parameters need to be differentially privacy protected locally and then uploaded to the edge server. Finally, the edge server performs trustworthy aggregation on the received model parameters and sends the latest aggregated model parameters to each mobile terminal device for the next iterative training until the optimal indoor positioning model is obtained. In the online positioning stage, the user collects the RSS fingerprint data of the nearby WiFi and BLE in real time, and inputs the collected RSS fingerprint data into the trained model to obtain the corresponding indoor positioning service. The offline training process is specifically as follows: Each mobile terminal device first uses the collected indoor RSS fingerprint dataset D to train the indoor positioning sub-model, and then adds the random Laplace noise Laplace(Δf / ε) to the trained indoor positioning sub-model parameters Θ and sends them to the edge server to achieve differential perturbation of the model parameters Θ of each mobile terminal device; where Θ is the indoor positioning sub-model parameter trained by each mobile terminal device, ε is the privacy budget parameter, Δf is the data sensitivity parameter, and Laplace(·) is the random noise that obeys the Laplace distribution; After receiving the local indoor positioning sub-model parameters Θ′ after differential privacy perturbation sent by each mobile terminal device, the edge server first performs global aggregation on it to confuse the actual contribution of each mobile terminal device and obtain the latest model parameters Θ s ; Then, the edge server updates the model parameters Θ s The edge server sends the trained optimal indoor positioning model parameters Θ to each mobile terminal device for the next iterative training. Through the continuous interaction between the edge server and each mobile terminal device, the model parameters are continuously iterated and updated until the indoor positioning model performance reaches the optimal level. Finally, the edge server sends the trained optimal indoor positioning model parameters Θ to each mobile terminal device for the next iterative training. s It is sent to each mobile terminal device to provide users with real-time, safe and accurate indoor positioning services.

2. According to the Android-based differential private indoor positioning federated learning method described in claim 1, It is characterized in that The specific method of data collection and preprocessing is: the mobile terminal device collects RSS fingerprint data of a given indoor area through a wireless sensor beacon (d i , c i ), and the collected RSS fingerprint data (d i , c i ) is saved in the local database to form the indoor positioning RSS fingerprint data set D = {(d i , c i )|1≤i≤N}; where D is the RSS fingerprint data of multiple wireless access points, i.e. APs, collected by the user's mobile terminal device and their corresponding location tag sets, Contains the RSS fingerprints corresponding to K APs beacons, c i ={(x i ,y i )|1≤i≤N} is the RSS record d i The corresponding real indoor plane coordinates, where x i Record d for RSS fingerprint data i The corresponding horizontal coordinate, y i Record d for RSS fingerprint data i The corresponding vertical coordinate.

3. According to the Android-based differential private indoor positioning federated learning method described in claim 2, It is characterized in that The data collection process is specifically as follows: first, design an indoor map according to the real indoor plane distribution, construct a real indoor RSS fingerprint data collection sample space, and divide the indoor plane map into m×n grids according to a custom ratio; Then, the divided grids are matched to the real indoor plane positions according to the proportional relationship; finally, the user collects RSS fingerprint data in each cell and uses the center point of the current cell as the label of the data record. Each collected RSS fingerprint data record is represented as (d i , c i ).

4. According to the Android-based differential private indoor positioning federated learning method described in claim 1, It is characterized in that For the indoor positioning sub-model training, the optimization goal of the model training on any mobile terminal device is: Among them, model u (·,·) represents the local sub-model to be learned, model u (d i ) means that the data d i The output result of the model after inputting the model training, l(·,·) represents the model in RSS fingerprint data (d i , c i ) represents the loss of the model on each mobile terminal device on its own dataset. The classification task l(·,·) is a standard cross entropy loss. Θ represents all model parameters to be learned, including weights and bias terms.

5. According to the Android-based differential private indoor positioning federated learning method described in claim 1, It is characterized in that The differential privacy perturbation process for the indoor positioning model parameter Θ includes two stages: data sensitivity calculation and noise generation: The sensitivity is calculated as shown in formulas (1) and (2): Θ′=reshape(Θ′,width,height)(1) Δf=|max(mean(Θ′, axis=1))-min(mean(Θ′, axis=1))| (2) Among them, reshape(,) means rearranging the list without changing the list content; reshape(Θ′, width, height) means converting the one-dimensional data Θ′ into a two-dimensional array of width*height; max(,) means finding the maximum value of the elements, min(,) means finding the minimum value of the elements, mean(,) means finding the mean of the elements, and axis=1 means finding the mean of each row of elements in the two-dimensional list; Noise generation and addition are as shown in formula (3): Θ′=Θ+Laplace(Δf / ε u ) (3) Where Laplace(·) is the random noise that satisfies the Laplace distribution, and the amount of noise added is controlled by the sensitivity Δf, where ε u To allocate the privacy protection budget to the user for differential perturbation on the mobile terminal device, Δf is calculated as shown in formula (2).

6. According to the Android-based differential private indoor positioning federated learning method described in claim 1, It is characterized in that The edge server receives the model parameters θ′ from each mobile terminal device. i Aggregate and use the aggregated global model parameters Θ s Sent to the mobile terminal device, the edge server update is formalized as follows: Among them, Θ s is the model parameter, Θ′ i The local sub-model parameters uploaded by N mobile terminal devices, i = 1, 2, ..., N; based on this principle, continuous iteration is carried out to achieve coordinated update of edge servers and mobile terminal devices.

7. According to the Android-based differential private indoor positioning federated learning method described in claim 1, It is characterized in that The specific process of online positioning is as follows: The user first uses his mobile terminal device to collect the RSS fingerprint data of WiFi and BLE in a given indoor area in real time, and eliminates irrelevant location points by calculating the Pearson correlation coefficient between the location points and the RSS fingerprint data to obtain the preprocessed RSS fingerprint data c data ; Then c data Input it into the trained indoor positioning sub-model model(·) to obtain the corresponding indoor positioning service. The specific process can be expressed as: S type =model(c data ) Where model(.) represents the trained indoor positioning model, c data is the data preprocessed by the user, S type The indoor positioning model returns the indoor positioning result to the user.