A method and system for scrambling mobile terminal sensor data based on Laplace mechanism
By using the Laplace mechanism and Savitzky-Golay smoothing algorithm to remove high-frequency noise and scramble data in the mobile terminal sensor data protection, the problems of large computing volume, high resource consumption and poor simulation degree in the prior art are solved, and efficient and low-complexity data protection effect is achieved.
Patent Information
- Application Number
- CN202111309619.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-06
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2041-11-06
AI Technical Summary
When protecting sensor data of mobile terminals, the prior art has a large amount of computing, a lot of resource consumption, and the degree of false data is poor, which affects the practicality of the sensor.
The Laplace mechanism is used in combination with the Savitzky-Golay smoothing algorithm to remove high-frequency noise in the sensor data, and scramble the data through Laplace noise to increase the degree of simulation.
On the basis of not affecting the practicality of the sensor, it effectively protects users' real sensor data, reduces computing complexity and resource consumption, and improves the privacy protection effect of data.
Smart Images

Figure CN114139576B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information security technology, and in particular relates to a method and system for scrambling mobile terminal sensor data using the Laplace mechanism. Background Art
[0002] Currently, with the development of the Internet of Things (IoT) and the widespread adoption of smart terminals, smart devices such as smartphones, smartwatches, and smart bracelets, which incorporate various microelectromechanical sensors, are constantly emerging. These built-in sensors often feature high precision, low power consumption, and small size, leading to their integration into various wearable devices, such as accelerometers, gyroscopes, and magnetometers. Meanwhile, thanks to the increasing power of machine learning algorithms, research into obtaining highly relevant user data through seemingly harmless sensor data is receiving increasing attention. Because sensor data is generally considered non-sensitive, people often overlook the potential privacy risks. Unlike microphones, cameras, and GPS, which require user authorization, major smart device operating systems do not impose any restrictions on the acquisition of this seemingly harmless sensor data. Identifying user movement and recording steps is one of the most typical application scenarios for sensors in smart terminals. Furthermore, due to the close contact between smart terminals and users, this passive and imperceptible data collection may even contain other private information, and this process occurs almost constantly.
[0003] A study published at the top international information security conference, the Conference on Network and Distributed Systems Security (NDSS 2020), by Professor Ren Kui's team from Zhejiang University, shows that the sound vibrations emitted by the speaker in a smartphone can be recorded by the built-in accelerometer and gyroscope. With the help of deep learning models, the accuracy of reconstructing the original information can reach up to 90%. Inevitably, sensor components always have defects within the tolerance range of hardware quality during the manufacturing process, which in turn affect the generation of data. By observing the characteristics of the data generated by the sensors, attackers can covertly perform unique identification of smart terminals. More and more researchers have noticed the above problems, and to prevent privacy leaks, some solutions have been proposed. Among them, the patent "A Method for Protecting the Fingerprint of a Mobile Smart Device Sensor" (application number 201910040491.5, publication number CN109766683A) applied for by the University of Science and Technology of China discloses a method for protecting the fingerprint of a mobile smart device sensor. The method includes the following steps: 1. Collecting sensor data; 2. Data preprocessing; 3. Adversarial training of fingerprint protection data based on neural networks, training the fingerprint recognition neural network model for fingerprint protection using training data; 4. Data output, processing the preprocessed sensor raw data using the trained fingerprint recognition neural network model and then outputting the data. The drawbacks of this method are: the neural network model has a large computational load and consumes many resources; and the processing of raw data requires preprocessing, model training, and model processing output, which is quite cumbersome.
[0004] A patent application filed by Shanghai Jiao Tong University, titled "Android Platform Sensor Data Protection System" (application number CN201610303876.2, publication number CN105956480A), discloses a sensor data protection system for the Android platform. This system includes a low-level hook module and a high-level management module. The management module transmits protection policies to the hook module, which then intercepts and protects sensor data according to these policies, thus achieving sensor data protection. The main data protection methods are implemented through a pseudo-data simulator, a downsampling module, and an obfuscator within the hook module. The pseudo-data simulator repeatedly transmits pre-set pseudo-data to the target application, while the downsampling module directly reduces the sampling rate of the target application, and the obfuscator linearly transforms the original data. However, the system's methods have significant shortcomings: the pre-set pseudo-data, downsampling, and linearly transformed data all exhibit significant differences and repetitive patterns compared to the original data, making them easily recognizable by applications and leading to service denial. Furthermore, it is difficult to guarantee the usability of the data itself, not only the pre-set pseudo-data but also the downsampling and linearly transformed data.
[0005] For high-frequency noise, including human voice, captured by sensors, low-pass filters can typically be used for filtering. The essence of smoothing algorithms commonly used in signal processing is to filter high-frequency noise, and they are characterized by their simplicity and effectiveness. Among them, the Savitzky-Golay smoothing algorithm, also known as the polynomial smoothing algorithm, is a data processing method based on the least squares method. It essentially uses the original data in a sliding window to fit a polynomial equation and replace the original data to remove high-frequency noise.
[0006] Based on the above analysis, the problems and defects of the existing technology are as follows: the existing sensor data protection methods have the defects of large computational load, high resource consumption or poor simulation of fake data; at the same time, the machine learning tools used in most solutions require multiple processing of the original data, which is quite cumbersome.
[0007] The challenge in addressing the above problems and shortcomings lies in designing a sensor data scrambling method that protects the original sensor data while requiring minimal computation, achieving a certain degree of realism, and not affecting the sensor's usability.
[0008] The significance of solving the above problems and defects is as follows: In view of the privacy leakage problem of the sensors built into the smart terminals and the shortcomings of the existing technologies, a method is provided that can protect the user's real sensor data without affecting the practicality of the sensors, so as to avoid the leakage of sensitive privacy information caused by real sensor data in the context of the current high development of technologies such as machine learning. Summary of the Invention
[0009] To address the problems existing in the prior art, this invention provides a method and system for scrambling mobile terminal sensor data using the Laplace mechanism. This invention utilizes the Savitzky-Golay smoothing algorithm to remove high-frequency signals, thereby desensitizing high-frequency privacy information in the sensor data. Based on the Laplace mechanism, the removed high-frequency noise information is used to randomly scramble the original data each time, increasing the realism.
[0010] This invention is implemented as follows: a method for scrambling mobile terminal sensor data using a Laplace mechanism, the method comprising:
[0011] Step 1: In the raw data processing stage, raw sensor data is acquired and separated into three directions according to the standard three-axis coordinate system; at the same time, the frequency of data acquisition by the smart terminal sensor is recorded. The positive role of this step in this solution is that separating data in different directions allows for data processing of sensor data in different directions, resulting in better simulation and less impact on practicality.
[0012] Step two, in the noise removal and recording stage, sets the parameters of the Savitzky-Golay smoothing algorithm, uses the Savitzky-Golay smoothing algorithm with determined parameters to denoise the original data, and calculates the average and range of the noise removed in different directions. The positive role of this step in this scheme is to remove high-frequency noise, including human voice, from the original data, and to obtain the average and range of noise from different directions to positively affect the simulation of scrambling in the subsequent process.
[0013] Step 3: In the data resampling stage, a target sampling rate is selected, and spline interpolation is used to interpolate the smoothed data to increase the sampling rate to the target sampling rate, so that the data can be applied to scenarios with different output frequencies. The positive role of this step in this solution is that spline interpolation enables data with the original sampling rate to be output for scenarios with different output frequencies.
[0014] Step four, in the data noise addition stage, uses the average and range of noise removed during the noise removal and recording stages to set the parameters of the Laplace noise formula, and then uses the Laplace noise formula for different directions to add noise to the data in the corresponding directions; the data is then output in the data output stage. The positive role of this step in this scheme is that adding Laplace noise to the data allows for control of the noise intensity using a privacy budget, thus ensuring practicality. Simultaneously, using the denoised data as a "template," the Laplace noise can generate different noise levels each time, further ensuring the fidelity of the data.
[0015] Furthermore, in step one, the standard three-axis coordinate system is defined as follows: when the device is in the default screen orientation, the X-axis extends horizontally to the right, the Y-axis extends vertically upward, and the Z-axis extends outward perpendicular to the screen.
[0016] Furthermore, in step two, the original data is denoised to make the data smoother, while removing high-frequency human voices and sensor characteristics that may leak privacy from the noise.
[0017] Furthermore, in step four, different privacy budgets during the noise-adding process will produce different privacy protection effects.
[0018] Furthermore, in step four, the specific process of outputting data through the data output stage is as follows: based on the actual output scenario and output frequency, data is output on the basis of the current data that has been noise-added and resampled.
[0019] Another objective of this invention is to provide a mobile terminal sensor data scrambling system based on the Laplace mechanism for implementing the Laplace mechanism mobile terminal sensor data scrambling method. The Laplace mechanism mobile terminal sensor data scrambling system includes: a data preprocessing module, a data denoising module, a data resampling module, a data denoising module, and a data output module.
[0020] The data preprocessing module is connected to the data denoising module, the data denoising module is connected to the data resampling module, the data resampling module is connected to the data noise-adding module, and the data noise-adding module is connected to the data output module.
[0021] Furthermore, the data preprocessing module includes a data acquisition submodule and a raw information recording submodule, used to preprocess the raw data; wherein the data acquisition submodule separates the raw sensor data according to a standard three-axis coordinate system; wherein the raw information recording submodule is used to record the raw data and the frequency information during the acquisition of the raw data.
[0022] Furthermore, the data denoising module includes a Savitzky-Golay smoothing algorithm submodule and a noise processing submodule, used to smooth and denoise the data, removing high-frequency information including human voices. The Savitzky-Golay smoothing algorithm submodule selects appropriate Savitzky-Golay smoothing algorithm parameters based on the amount of original sensor data: window size s and order r. The window size s is typically an odd number greater than or equal to 3, and the order r needs to satisfy s > r + 1. A larger s results in a smoother curve; a larger r results in more fluctuations. The noise processing submodule uses the Savitzky-Golay smoothing algorithm with determined parameters to smooth the data set S in different directions. x , S y , S z The data S′ is obtained after processing. x S′ y S′ z The processed data S′ in the three directions x S′ y S′ z Compared with the original data S respectively x , S y , S z By performing interpolation calculations on each data point, we obtain the set n of noise values removed from each point in each direction. x , n y , n z For the obtained noise value set n in three directions x , n y , n zTake the average value respectively and range Dn x =max(n x )-min(n x );
[0023] Dn y =max(n y )-min(n y );
[0024] Dn z =max(n z )-min(n z ).
[0025] Furthermore, the data resampling module includes a sampling rate conversion submodule and a spline interpolation algorithm submodule, which are used to convert the sampling rate and insert new values. The interpolation does not affect the frequency domain information. The sampling rate conversion submodule sets the target sampling rate f′ according to the possible target scenario. The highest sampling rate of the mobile terminal sensor is generally no more than 1000Hz, so it is set to 1000.
[0026] Based on the original sampling rate f and the amount of original data recorded in the original information recording submodule of the data preprocessing module, the amount of data m required to achieve the target sampling rate f′ is calculated. The spline interpolation algorithm submodule then interpolates the data after denoising by the data denoising module using a spline interpolation algorithm with an insertion data amount m and a fitting order r, to obtain the resampled data S″. x ,S″ y ,S″ z .
[0027] Furthermore, the data noise-adding module calculates the parameters of the Laplace distribution by setting a privacy budget ε.
[0028] The Laplace formula for generating noise in each direction is obtained: LapLace(a i , b i ),, i={x, y, z}, where a i =Avgn i The privacy budget ε controls the degree of privacy protection and data availability; a smaller privacy budget results in higher privacy protection but lower availability. Noise is added to the data to obtain scrambled data S″′. x ,S″′ y ,S″′ z ;
[0029] The data output module will output the scrambled data S″′. x ,S″′ y,S″′ z As the original target data, it is downsampled and output according to the actual output scenario and output frequency requirements.
[0030] Combining all the above technical solutions, the advantages and positive effects of this invention are as follows: This invention can be used to protect the real data generated by sensors in mobile terminals, including accelerometers, gyroscopes, and magnetometers, while ensuring practicality and realism, thus making up for the shortcomings of current mobile terminal sensor data protection technologies, which have large computational loads and low practicality.
[0031] Compared with existing technologies, this invention achieves protection of the original sensor data of smart terminals while having lower computational complexity and lower resource consumption. This invention removes high-frequency noise, including human voice, by performing Savitzky-Golay smoothing on the data and retaining low-frequency data that reflects utility. Then, it adds Laplace noise related to the removed noise for simulation. There is no need to train a machine learning model in advance. By using standards such as Euclidean distance, it can be found that the processed data can produce a large difference from the original data. This can protect the user's real sensor data and ensure privacy and security even if it is leaked.
[0032] This invention achieves customizable and highly realistic data protection levels. The intensity of added noise can be determined by adjusting the privacy budget; a lower privacy budget results in a stronger noise, and vice versa. Furthermore, the generation of Laplace noise depends on the noise removed during the denoising process, thus producing noise that more closely resembles reality. Moreover, for the same data, Laplace noise will produce different noise results each time, further enhancing realism.
[0033] This invention achieves both protection of original sensor data and guarantee of practicality. It protects the real sensor data by performing Savitzky-Golay smoothing on the data to remove high-frequency noise, including human voice, and retaining the low-frequency data that reflects the utility, and then scrambling it. This process can still largely retain the data part used for behavior recognition, such as walking and running. Therefore, the sensor data processed by this invention can balance practicality and privacy. Attached Figure Description
[0034] Figure 1 This is a flowchart of a mobile terminal sensor data scrambling method based on the Laplace mechanism provided in an embodiment of the present invention.
[0035] Figure 2 This is a schematic diagram illustrating the specific process of scrambling mobile terminal sensor data using the Laplace mechanism provided in this embodiment of the invention.
[0036] Figure 3This is a schematic diagram of the structure of a mobile terminal sensor data scrambling system based on the Laplace mechanism provided in an embodiment of the present invention.
[0037] Figure 3 The module consists of: 1. Data preprocessing module; 2. Data denoising module; 3. Data resampling module; 4. Data noise addition module; and 5. Data output module.
[0038] Figure 4 These are line graphs of the original data, the data after smoothing and denoising, and the data after re-noising, recorded by the accelerometer provided in this embodiment of the invention.
[0039] Figure 5 The graph shows the original data, the data after smoothing and denoising, and the data after re-noising, with the privacy budget increased to 15, 30, and 45 respectively, according to the embodiments of the present invention. Detailed Implementation
[0040] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0041] To address the problems existing in the prior art, the present invention provides a method and system for scrambling mobile terminal sensor data using the Laplace mechanism. The present invention will be described in detail below with reference to the accompanying drawings.
[0042] The Laplace mechanism-based mobile terminal sensor data scrambling method provided by this invention can also be implemented using other steps by those skilled in the art. Figure 1 The Laplace mechanism scrambling method for mobile terminal sensor data provided by this invention is merely one specific embodiment.
[0043] like Figure 1 As shown in the embodiment of the present invention, the method for scrambling mobile terminal sensor data using the Laplace mechanism includes:
[0044] S101: In the raw data processing stage, raw sensor data is acquired and the data in three directions is separated according to the standard three-axis coordinate system; at the same time, the frequency of data acquisition by the smart terminal sensor is recorded.
[0045] S102: In the noise removal and recording stage, set the parameters of the Savitzky-Golay smoothing algorithm, use the Savitzky-Golay smoothing algorithm with the parameters determined to remove noise from the original data, and calculate the average value and range of the noise removed in different directions.
[0046] S103: In the data resampling stage, a target sampling rate is selected, and spline interpolation is used to interpolate the smoothed data to increase the sampling rate to the target sampling rate, so that the data can be applied to scenarios with different output frequencies.
[0047] S104: In the data noise addition stage, the average value and range of the noise removed in the noise removal and recording stages are used to set the parameters of the Laplace noise formula, and the Laplace noise formula in different directions is used to add noise to the data in the corresponding directions respectively; the data is output through the data output stage.
[0048] In S101 provided in this embodiment of the invention, the standard three-axis coordinate system is defined as follows: when the device is in the default screen orientation, the X-axis extends horizontally to the right, the Y-axis extends vertically upward, and the Z-axis extends outward perpendicular to the screen.
[0049] In S102 of the present invention, the original data is denoised to make the data smoother, and at the same time, information such as high-frequency human voices and sensor characteristics that may leak privacy are removed from the noise.
[0050] In S104 provided in this embodiment of the invention, different privacy budgets during the noise addition process will produce different privacy protection effects.
[0051] In S104 provided in this embodiment of the invention, the specific process of outputting data through the data output stage is as follows: based on the actual output scenario and output frequency, data is output on the basis of the data that has already been noise-added and resampled.
[0052] The technical solution of the present invention will be described in detail below with reference to specific embodiments.
[0053] like Figure 2 As shown in the embodiment of the present invention, the method for scrambling mobile terminal sensor data using the Laplace mechanism is as follows:
[0054] Step A: Obtain the raw sensor data S from the mobile terminal. In this embodiment, the data sampling frequency is approximately 50Hz, and the raw data duration is 16 seconds.
[0055] Step B: Separate the data in three directions according to the standard three-axis coordinate system. The data set on the X-axis is denoted as S. x The data set on the Y-axis is denoted as S. y The data set on the Z-axis is denoted as S. z Save the original sensor data and the current data at a sampling rate of f = 50Hz for later processing;
[0056] Step C involves denoising the data. Appropriate Savitzky-Golay smoothing algorithm parameters are selected based on the amount of original sensor data: window size *s* and order *r*. The window size *s* is typically an odd number greater than or equal to 3, and the order *r* must satisfy *s* > *r* + 1. A larger *s* results in a smoother curve, while a larger *r* increases the likelihood of more fluctuations. The Savitzky-Golay smoothing algorithm with these parameters is then applied to the data sets *S* in different directions. x , S y , S z The data S′ is obtained after processing. x S′ y S′ z In this embodiment, the window size s is 17 and the order r is 3.
[0057] Step D, process the data S′ in the three directions. x S′ y S′ z Compared with the original data S respectively x , S y , S z By performing interpolation calculations on each data point, we obtain the set n of noise values removed from each point in each direction. x , n y , n z For the obtained noise value set n in three directions x , n y , n z Take the average value respectively and range Dn x =max(n x )-min(n x ), Dn y =max(n y )-min(n y ), Dn z =max(n z )-min(n z );
[0058] The Avg.n obtained in this embodiment x The value is 0.0023486350031055093, Avg.n y The value is 0.00105276827569025, Avg.n z The value is -0.007183362567290729; the resulting Dn x The value is 13.356936776970194, Dn y The value is 20.623454007017358, Dn zIt is 20.41470630803716;
[0059] Step E: Set the target sampling rate f′ based on the possible target scene. The highest sampling rate of mobile terminal sensors is generally no more than 1000Hz, so it can usually be set to 1000Hz. Calculate the amount of data m that needs to be inserted to achieve the target sampling rate f′ based on the original sampling rate f recorded in Step 2 and the amount of original data. Interpolate the data after denoising in Step C according to the inserted data amount m and the spline interpolation algorithm at the fitting order r to obtain the resampled data S″. x ,S″ y ,S″ z The target sampling rate used in this embodiment is f′=1000Hz, therefore the amount of data to be inserted (including the total amount of the original data) is 16000.
[0060] Step F: Calculate the parameters of the Laplace distribution by setting the privacy budget ε. The Laplace formula for generating noise in each direction is obtained: Laplace(a i , b i ), i = {x, y, z}, where a i =Avg.n i The privacy budget ε controls the degree of privacy protection and data availability; a smaller privacy budget results in higher privacy protection but lower availability. Noise is added to the data to obtain scrambled data S″′. x ,S″′ y ,S″′ z ;
[0061] Step G, scramble the data S″′ x ,S″′ y ,S″′ z As the original target data, it is downsampled and output according to the actual output scenario and output frequency requirements.
[0062] like Figure 3 As shown in the figure, the mobile terminal sensor data scrambling system based on the Laplace mechanism provided in this embodiment of the invention includes: a data preprocessing module 1, a data denoising module 2, a data resampling module 3, a data noise-adding module 4, and a data output module 5. The data preprocessing module 1 is connected to the data denoising module 2, the data denoising module 2 is connected to the data resampling module 3, the data resampling module 3 is connected to the data noise-adding module 4, and the data noise-adding module 4 is connected to the data output module 5.
[0063] The data preprocessing module provided in this embodiment of the invention includes a data acquisition submodule and a raw information recording submodule, used to preprocess the raw data. The data acquisition submodule separates the raw sensor data according to a standard three-axis coordinate system; the raw information recording submodule records the raw data and the frequency information during raw data acquisition.
[0064] The data denoising module provided in this embodiment of the invention includes a Savitzky-Golay smoothing algorithm submodule and a noise processing submodule, used to smooth and denoise data, removing high-frequency information including human voices. The Savitzky-Golay smoothing algorithm submodule selects appropriate Savitzky-Golay smoothing algorithm parameters based on the amount of original sensor data: window size s and order r; wherein the window size s is typically an odd number greater than or equal to 3, and the order r needs to satisfy s > r + 1; the larger s is, the smoother the curve; the larger r is, the more likely there will be more fluctuations; the noise processing submodule uses the Savitzky-Golay smoothing algorithm with determined parameters to smooth the data set S in different directions. x , S y , S z The data S′ is obtained after processing. x S′ y S′ z ; The processed data S′ in the three directions x S′ y S′ z Compared with the original data S respectively x , S y , S z By performing interpolation calculations on each data point, we obtain the set n of noise values removed from each point in each direction. x , n y , n z For the obtained noise value set n in three directions x , n y , n z Take the average value respectively
[0065] and range Dn x =max(n x )-min(n x );
[0066] Dn y =max(n y )-min(n y );
[0067] Dn z =max(nz )-min(n z ).
[0068] The data resampling module provided in this embodiment of the invention includes a sampling rate conversion submodule and a spline interpolation algorithm submodule, used to convert the sampling rate and insert new values. The interpolation does not affect the frequency domain information. The sampling rate conversion submodule sets a target sampling rate f′ based on possible target scenarios. The highest sampling rate of a mobile terminal sensor is generally no more than 1000Hz, so it is usually set to 1000Hz. Based on the original sampling rate f recorded by the original information recording submodule in the data preprocessing module and the amount of original data, it calculates the amount of data m that needs to be inserted to achieve the target sampling rate f′. The spline interpolation algorithm submodule interpolates the data after denoising by the data denoising module according to the inserted data amount m and the spline interpolation algorithm at a fitting order r, to obtain the resampled data S″. x ,S″ y ,S″ z ;
[0069] The data noise-adding module provided in this embodiment of the invention calculates the parameters of the Laplace distribution by setting a privacy budget ε.
[0070] The Laplace formula for generating noise in each direction is obtained: Laplace(a i b i ),, i={x, y, z}, where a i =Avg.n i The privacy budget ε controls the degree of privacy protection and data availability; a smaller privacy budget results in higher privacy protection but lower availability. Noise is added to the data to obtain scrambled data S″′. x ,S″′ y ,S″′ z .
[0071] The data output module provided in this embodiment of the invention will output scrambled data S″′. x ,S″′ y ,S″′ z As the original target data, it is downsampled and output according to the actual output scenario and output frequency requirements.
[0072] The technical solution of the present invention will be described in detail below with reference to simulation experiments.
[0073] This test uses an open-source pedometer from GitHub. The frequency used to collect sensor data and calculate steps is set to the frequency described as SENSOR_DELAY_GAME in the Android system, which is about 50Hz, for the purpose of demonstrating the effect. The raw data duration is 16 seconds. Figure 4 The graphs shown in the middle (from top to bottom) depict the raw data recorded by the accelerometer, the data after smoothing and denoising, and the data after re-denoising (privacy budget of 5). Note that the accelerometer is only one type of sensor in a mobile terminal and does not constitute a limitation on this invention.
[0074] from Figure 4 It can be seen that when the privacy budget is 5, there is a significant difference between the noisy data and the original data. Based on the characteristics of Laplace noise, increasing the privacy budget to 15, 30, and 45 sequentially allows for the plotting of... Figure 5 The graphic; from Figure 5 As can be seen, with the privacy budget gradually increasing, the graph gradually approaches the original data; further increasing the noise makes the graph increasingly resemble the smoothed data. It's worth noting that even with the same privacy budget, the amount of noise added each time is different, which greatly ensures the realism of the data. Next, the original data, smoothed data, and noisy data were used to count steps using a pedometer. All tests were repeated for 60 seconds, yielding the following data:
[0075] Table 1 shows the test results of step counting using a pedometer.
[0076]
[0077] As shown in the table above, when the privacy budget is adjusted to around 30, the measured data is very close to the results shown by the original data. When the privacy budget is further increased, the data gradually approaches the smoothed value. Therefore, it can be concluded that, through this invention, the privacy budget of Laplace noise can be adjusted to minimize the impact on the user's actual use while protecting the privacy of the original data.
[0078] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware portion can be implemented using dedicated logic; the software portion can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will appreciate that the above-mentioned devices and methods can be implemented using computer-executable instructions and / or contained in processor control code, for example, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, or can be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0079] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the scope of protection of the present invention.
Claims
1. A method for scrambling sensor data of a mobile terminal based on a Laplace mechanism, characterized in that: The mobile terminal sensor data scrambling method of the Laplace mechanism includes: Step 1: In the raw data processing stage, the raw sensor data is obtained and the data in three directions is separated according to the standard three-axis coordinate system; at the same time, the frequency of the smart terminal sensor during data collection is recorded; Step 2: In the noise removal and recording stage, set the parameters of the Savitzky-Golay smoothing algorithm, use the Savitzky-Golay smoothing algorithm with the determined parameters to denoise the original data, and calculate the average and range of the noise removed in different directions; Step 3: In the data resampling stage, a target sampling rate is selected, and the smoothed data is interpolated using spline interpolation to increase the sampling rate to the target sampling rate, so that the data can be applied to scenarios with different output frequencies; Step 4: In the data noise addition stage, the Laplace noise formula parameters are set using the average and range of the noise removed in the noise removal and recording stages, and the Laplace noise formulas in different directions are used to add noise to the data in the corresponding directions respectively; the data is output through the data output stage.
2. The method for scrambling sensor data of a mobile terminal using the Laplace mechanism as claimed in claim 1, characterized in that: In the step 1, data separation is performed according to a standard three-axis coordinate system, which stipulates that when the device is in the default screen orientation, the X-axis extends horizontally to the right, the Y-axis extends vertically upward, and the Z-axis extends outward perpendicular to the screen.
3. The method for scrambling sensor data of a mobile terminal using the Laplace mechanism as claimed in claim 1, characterized in that: In the step 2, the original data is denoised to make the data smoother, and at the same time, high-frequency human voices and characteristic information of the sensor itself that may leak privacy and are hidden in the noise are removed.
4. The method for scrambling sensor data of a mobile terminal using the Laplace mechanism as claimed in claim 1, characterized in that: In the step 4, the Laplace parameters are set using the noise removed in the noise removal and recording stages, and different privacy budgets in the noise adding process will produce different privacy protection effects.
5. The method for scrambling sensor data of a mobile terminal using the Laplace mechanism as claimed in claim 1, characterized in that: In the step 4, the specific process of outputting data through the data output stage is: according to the actual output scenario and output frequency, data output is performed based on the current noisy and resampled data.
6. A mobile terminal sensor data scrambling system using a Laplace mechanism that implements the mobile terminal sensor data scrambling method using a Laplace mechanism as claimed in any one of claims 1 to 5, characterized in that: The mobile terminal sensor data scrambling system of the Laplace mechanism includes: a data preprocessing module, a data denoising module, a data resampling module, a data denoising module, and a data output module; The data preprocessing module is connected to the data denoising module, the data denoising module is connected to the data resampling module, the data resampling module is connected to the data denoising module, and the data denoising module is connected to the data output module.
7. The mobile terminal sensor data scrambling system of the Laplace mechanism as claimed in claim 6, characterized in that: The data preprocessing module includes a data acquisition submodule and an original information recording submodule, which are used to preprocess the original data; wherein the data acquisition submodule separates the original sensor data according to a standard three-axis coordinate system; wherein the original information recording submodule is used to record the original data and the frequency information when the original data is collected.
8. The mobile terminal sensor data scrambling system of the Laplace mechanism as claimed in claim 6, characterized in that: The data denoising module includes a Savitzky-Golay smoothing algorithm submodule and a noise processing submodule, which are used to smooth and denoise the data to remove high-frequency information including human voice contained therein; wherein the Savitzky-Golay smoothing algorithm submodule selects Savitzky-Golay smoothing algorithm parameters according to the amount of original sensor data: window size s and order r; wherein the window size s is an odd number greater than or equal to 3, and the order r needs to satisfy s>r+1; wherein the noise processing submodule uses the Savitzky-Golay smoothing algorithm with determined parameters to respectively perform denoising on the data sets S in different directions x , S y , S z After processing, the denoised data S' is obtained x , S′ y , S′ z ; The processed data S′ in three directions x , S′ y , S′ z Respectively with the original data S x , S y , S z Calculate the difference of each data point one by one to get the set of noise values n removed from each point in each direction x , n y , n z ; For the noise value set n in the three directions x , n y , n z Take the average value and range Dn x =max(n x )-min(n x ); Dn y =max(n y )-min(n y ); Dn z =max(n z )-min(n z )。 9. The mobile terminal sensor data scrambling system of the Laplace mechanism as claimed in claim 6, characterized in that: The data resampling module includes a sampling rate conversion submodule and a spline interpolation algorithm submodule, which are used to convert the sampling rate and insert a new value, and the interpolation does not affect the frequency domain information; wherein the sampling rate conversion submodule sets the target sampling rate f′ according to the possible target scene, and the maximum sampling rate of the mobile terminal sensor is set to 1000Hz; The amount of data m required to be inserted to achieve the target sampling rate f′ is calculated according to the original sampling rate f recorded by the original information recording submodule in the data preprocessing module and the amount of original data; wherein the spline interpolation algorithm submodule interpolates the data denoised by the data denoising module according to the inserted data amount m and the spline interpolation algorithm under the fitting order r to obtain the resampled data S″ x , S″ y , S″ z .
10. The mobile terminal sensor data scrambling system of the Laplace mechanism as claimed in claim 6, characterized in that: The data noise module will calculate the parameters of the Laplace distribution by setting the privacy budget ε The Laplace formula for generating noise in each direction is obtained: Laplace(a i , b i ), i = {x, y, z}, where a i =Avgn i ; The privacy budget ε can be used to control the degree of privacy protection and data availability. The smaller the privacy budget, the higher the degree of privacy protection of the data and the lower the availability. By adding noise to the data, the scrambled data S″′ will be obtained x , S″′ y , S″′ z ; The data output module will use the scrambled data S″′ x , S″′ y , S″′ z As the original target data, it is downsampled and output according to the actual output scenario and output frequency requirements.
Citation Information
Patent Citations
Android platform sensor data protection system
CN105956480A
Mobile intelligent device sensor fingerprint protection method
CN109766683A
A method for protecting fingerprints on mobile smart device sensors
CN109766683B