A method, system, device, and storage medium for preventing user real location leakage
By calculating the perturbation factor Δ and the distance gradient α, and introducing the confusion distance y, the problem of user privacy leakage in location-based services is solved, achieving both effective location privacy protection and user experience consideration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING MOMO INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2022-06-06
- Publication Date
- 2026-04-24
AI Technical Summary
Existing location-based services pose a risk of user privacy breaches, as malicious users can determine a user's true location by calculating the distance between the user and others.
By calculating the perturbation factor Δ and the distance gradient α, a confusion distance y is introduced. The perturbation factor Δ is calculated based on the user relationship and the true distance x, and the confusion distance y is used as the display distance to prevent the leakage of the user's true location.
It effectively protects user privacy, keeps the discrepancy between the distance displayed and the actual distance within a reasonable range, prevents the precise location of the user's actual position, takes into account user experience, and keeps the displayed distance constant.
Smart Images

Figure CN117235774B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method and system for preventing the leakage of a user's real location. Background Technology
[0002] The description of the background technology in this invention pertains to the related technology of this invention and is merely for illustration and to facilitate understanding of the invention. It should not be construed as the applicant explicitly believing or presuming that the applicant believes it to be prior art on the filing date of the first application.
[0003] Location-based services (LBS) utilize various positioning technologies to obtain the current location of a device and provide information resources and basic services to it via the mobile internet. In recent years, LBS has experienced rapid development and widespread application, bringing great convenience to people's lives. However, it also poses a threat to individual privacy. In some internet application scenarios, internet products provide users with geographical distance information between themselves and others. Although the internet product does not provide the user's real location to other users, malicious users can still use three or more distance information points to calculate the user's real location. For example, by drawing circles with three other users as centers and the distances between the user and those other users as radii, the intersection of these three circles is the user's real location. Current location-based services pose a risk of user privacy leakage. How to protect user privacy and prevent the leakage of users' real locations is an urgent problem to be solved. Summary of the Invention
[0004] The main objective of this invention is to provide a method and system for preventing the leakage of a user's real location, aiming to solve the problem of user privacy leakage risks in existing location-based services in the field of computer technology.
[0005] To address the above problems, this invention provides a method for preventing the leakage of a user's real location, characterized by comprising the following steps:
[0006] Get the current user's Userid, user relationships with other users, and actual distance x;
[0007] The perturbation factor Δ is calculated based on the user relationship and the actual distance x. The calculation method of the perturbation factor Δ varies depending on the relationship between the user and other users.
[0008] The confusion distance y is calculated based on the perturbation factor Δ, where y = x + Δ;
[0009] The obfuscation distance y is displayed as the display distance between the current user and other users.
[0010] Furthermore, the formula for calculating the disturbance factor Δ is as follows: The ± value is determined by whether the selected state of the Userid is a set state. If it is a set state, Δ is negative; otherwise, it is positive. The Userid is an integer of the same length as the actual distance x, starting from a set number of digits. If the number of digits is insufficient, zeros are added. λ is calculated based on the perturbation factor function g(x), where g(x) is a user-defined piecewise function, x1 and x2 are two adjacent boundary points of the piecewise function g(x), and the actual distance x falls within the interval [x1, x2]. λ is calculated using the following formula:
[0011] Furthermore, the user relationships include observers and observed persons, ordinary visitors or friends, and registered users on the platform; the custom piecewise function g(x) varies depending on the relationship between the user and other users.
[0012] Furthermore, the method also includes calculating a distance gradient α based on the true distance x, and calculating a confusion distance y based on a perturbation factor Δ and the distance gradient α, where y = α + Δ; the distance gradient α is a distance that is positively correlated with the true distance x and whose error is within a set range;
[0013] Preferably, the distance gradient α is calculated using the following formula: α = e [10*lnx] / 10 , [·] is the integer operator, which means taking the integer part of the data.
[0014] Furthermore, a gradient perturbation function is introduced for the distance gradient α, and the gradient perturbation function is: Where α is the distance gradient and x is the true distance. This is called the difference function; after introducing the gradient perturbation function, the formula for calculating the confusion distance y is as follows:
[0015] This invention also provides a system for preventing the leakage of a user's real location, characterized in that it includes:
[0016] The acquisition module is used to obtain the current user's Userid, as well as the user relationship and actual distance x between the current user and other users;
[0017] The disturbance factor calculation module is used to calculate the disturbance factor Δ based on the user relationship and the actual distance x. The calculation method of the disturbance factor Δ varies depending on the relationship between the user and other users.
[0018] The confusion distance calculation module is used to calculate the confusion distance y based on the disturbance factor Δ, where y = x + Δ;
[0019] The display module is used to display the obfuscation distance y as the display distance between the current user and other users.
[0020] Furthermore, the system also includes: a distance gradient calculation module, used to calculate the distance gradient α based on the true distance x, and to calculate the confusion distance y based on the perturbation factor Δ and the distance gradient α, where y = α + Δ; the distance gradient α is a distance that is positively correlated with the true distance x and whose error is within a set range.
[0021] The beneficial effects of this invention are: it fully protects user privacy information while taking user experience into account. The distance obfuscation method can ensure that the deviation between the obfuscated distance and the actual distance is within a reasonable range, and it cannot accurately locate the user's actual location. At the same time, the method has a fixed pattern, which can prevent the distance displayed on the user's end from changing back and forth. Attached Figure Description
[0022] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below:
[0023] Figure 1 This diagram illustrates how malicious users can use triangulation to determine a user's true location in existing technologies.
[0024] Figure 2 A flowchart of a method for preventing the leakage of a user's real location according to the present invention is shown.
[0025] Figure 3 The perturbation factor effect of a first embodiment of the method for preventing leakage of user real location of the present invention is shown.
[0026] Figure 4 The relationship between the distance gradient α and the true distance x in the method for preventing leakage of the user's true location according to the present invention is shown.
[0027] Figure 5 The difference function in the method for preventing leakage of user's real location according to the present invention is shown. The range of values for .
[0028] Figure 6 The relationship between the obfuscated distance y and the true distance x in the method for preventing leakage of a user's true location according to the present invention is shown.
[0029] Figure 7 The obfuscated display distance is shown in the method of preventing leakage of the user's real location according to the present invention.
[0030] Figure 8 A schematic diagram of a system for preventing user location leakage is shown in the method for preventing user location leakage of the present invention.
[0031] Figure 9 This is a system structure diagram of an embodiment of the method for preventing leakage of a user's real location according to the present invention.
[0032] Figure 10 This is a schematic diagram of a computer-readable storage medium according to an embodiment of a method for preventing leakage of a user's real location according to the present invention. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0034] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying their relative importance.
[0035] The following description provides several embodiments of the present invention. Different embodiments can be substituted or combined. Therefore, the present invention can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present invention should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.
[0036] Example 1
[0037] Figure 1 This diagram illustrates how malicious users can use triangulation to determine a user's true location in existing technologies.
[0038] Existing internet products sometimes display distances between users and other users or shops. For example, if the current user's actual distances to other users 1, 2, and 3 are 42km, 60km, and 50km respectively, and the product displays these actual distances, a malicious user could, knowing the actual locations of users 1, 2, and 3, draw circles with radii of 42km, 60km, and 50km respectively. The intersection of these three circles would be the current user's actual location. In this scenario, there is a risk of the current user's true location being leaked.
[0039] Figure 2 A flowchart of a method for preventing the leakage of a user's real location, as proposed in this application, is shown.
[0040] To address the above issues, this application proposes a method for preventing the leakage of a user's real location, comprising the following steps:
[0041] Step S101: Obtain the current user's Userid, user relationship with other users, and actual distance x.
[0042] The Userid is an integer identifier for a user; the user relationships include observers and observed users, ordinary visitors or friends, and registered users on the platform. The relationships between the current user and other users can be calculated by obtaining their respective locations through various existing positioning systems such as GPS, BeiDou, and Galileo, which will not be elaborated here.
[0043] Step S102: Calculate the disturbance factor Δ based on the user relationship and the actual distance x. The calculation method of the disturbance factor Δ varies depending on the relationship between the user and other users.
[0044] In step S102, the perturbation factor Δ varies depending on the user relationship. Taking a friend relationship as an example, the perturbation effect is as follows: Figure 3 As shown, the relationship between the perturbation factor Δ and the true distance x is a piecewise curve defined by the user.
[0045] While gradient perturbation is considered a highly secure method, in recent years, some algorithm scientists have pointed out that gradient perturbation can also yield unique true data through algorithmic analysis. That is, due to the strong regularity of gradient perturbation, there is a one-to-one correspondence between the true distance and the confused distance, and theoretically, the actual distance can still be inferred through this regularity. To avoid this situation, this application introduces a perturbation factor Δ related to user relationships and user characteristics (Userid).
[0046] Furthermore, the formula for calculating the disturbance factor Δ in step S102 is as follows: The ± value is determined by whether a certain state selected by the Userid is a set state. If it is a set state, Δ is negative; otherwise, it is positive. For example, if the state of the 3rd bit of the Userid is 1, Δ is negative; otherwise, it is positive.
[0047] The Userid is an integer of the same length as the actual distance x, starting from a set number of digits. If the number of digits is insufficient, it is padded with zeros. For example, Let the Userid be an integer of the same length as the actual distance, starting from the third digit. Assume the actual distance x = 4257m, the Userid is 5265362673, and the actual distance is a 4-digit integer.
[0048] λ is calculated based on the perturbation factor function g(x), where g(x) is a user-defined piecewise function, x1 and x2 are two adjacent boundary points of the piecewise function g(x), and the true distance x falls within the interval [x1, x2]. λ is calculated using the following formula:
[0049] Furthermore, the custom piecewise function g(x) varies depending on the relationship between the user and other users. Different piecewise functions can be set based on user relationships such as friend relationships, visitor relationships, and observer-observed relationships. Different piecewise functions are selected to calculate the perturbation factor for different user relationships, thus allowing control over the magnitude of the perturbation factor based on the user's intimacy. For example, if both parties are friends, a smaller perturbation factor can be achieved by setting the piecewise function, meaning the error between the displayed distance y and the actual distance x is within 10m; while if both parties are ordinary visitors, a larger perturbation factor can be achieved by setting the piecewise function, meaning the error between the displayed distance y and the actual distance x is within 100m. The aforementioned 10m and 100m are thresholds that can be selected according to actual needs and set based on the user's relationship with other users.
[0050] Furthermore, the method also includes step S103, calculating the distance gradient α based on the true distance x, wherein the distance gradient α is a distance that is positively correlated with the true distance x and whose error is within a set range.
[0051] The method further includes:
[0052] Step S103: Calculate the distance gradient α based on the true distance x, where the distance gradient α is a distance that is positively correlated with the true distance x and whose error is within a set range.
[0053] Step S104: Calculate the confusion distance y based on the disturbance factor Δ, where y = x + Δ;
[0054] After step S103 exists, step S104 becomes calculating the confusion distance y based on the perturbation factor Δ and the distance gradient α, where y = α + Δ.
[0055] Preferably, the distance gradient α is calculated using the following formula: α = e [10*lnx] / 10 The · symbol represents the integer part of the data. This formula yields a distance gradient α that is always close to the true distance x and cannot be reversed.
[0056] Figure 4 The relationship between the distance gradient α and the true distance x is shown. Figure 4As can be seen, the distance gradient α is comparable to the true distance x, but the distance gradient differs significantly from the true distance at the oscillating regression point and exhibits a relatively severe discrete distribution, resulting in a noticeable stepped distance in the user's perception.
[0057] Therefore, a gradient perturbation function is further introduced for the distance gradient α, the gradient perturbation function being: Where α is the distance gradient and x is the true distance. This part is called the difference function; Figure 5 The difference function is shown. The range of values for the difference function is such that it oscillates in a range slightly less than 1 as the actual distance x changes.
[0058] After introducing the gradient perturbation function, the formula for calculating the confusion distance y is as follows: Finally, a confusion distance function with a high degree of fit to the true distance is obtained through the gradient perturbation function. Figure 6 The relationship between the obfuscated distance y and the true distance x is shown.
[0059] Step S105: Display the obfuscation distance y as the display distance between the current user and other users.
[0060] Taking the current user with Userid 746643192 as an example, assuming that the actual distance between the current user 746643191 and user 1 is x = 42000 meters, and the relationship between the users is that they are friends;
[0061] Step 1: Calculate the perturbation factor Δ based on the custom segmentation function defined for the business logic. The segmentation function for friend relationships is as follows:
[0062]
[0063] The perturbation error corresponding to the true distance can be calculated based on the piecewise function; it can be calculated using the formula. Substituting into the function yields the disturbance error value λ.
[0064] Calculations show that when x = 42.00 km, x1 = 10 km, x2 = 100 km, λ1 = 0.1 km, and λ2 = 1 km, substituting these values into the formula, the disturbance error λ = 0.42 km is calculated.
[0065] Step 2: The sign is determined based on the fact that the second digit of the user's unique ID (746643192) is an even number, therefore a negative sign is chosen. For custom feature perturbation terms; The starting distance is an integer of the same length as the actual distance, therefore
[0066] Calculate the disturbance factor:
[0067] Step 3: Calculate the distance gradient value α = e [10*ln42000] / 10 = 40134.8374 meters;
[0068] The fourth step is to calculate the confusion distance, and the final calculation result is:
[0069]
[0070] The actual distance to user 2 is x = 60000 meters, and the relationship between the users is that they are friends. The calculated perturbation distance is y = 58546m.
[0071] The actual distance to user 3 is x = 50000m, and the users are friends. The calculated perturbation distance is y = 46902m. The displayed distance after obfuscation is as follows: Figure 7 As shown, after distance obfuscation, circles drawn using the distances between the three users do not intersect, meaning the actual location of the user can no longer be determined.
[0072] Figure 8 This invention also provides a system for preventing the leakage of a user's real location, characterized in that it includes:
[0073] Module 801 is used to obtain the current user's Userid, as well as the user relationship and actual distance x between other users;
[0074] The disturbance factor calculation module 802 is used to calculate the disturbance factor Δ based on the user relationship and the actual distance x. The calculation method of the disturbance factor Δ varies depending on the relationship between the user and other users.
[0075] The confusion distance calculation module 804 is used to calculate the confusion distance y based on the disturbance factor Δ, where y = x + Δ;
[0076] Display module 805 is used to display the confusion distance y as the display distance between the current user and other users.
[0077] Furthermore, the system also includes: a distance gradient calculation module 804, used to calculate the distance gradient α based on the true distance x, and to calculate the confusion distance y based on the perturbation factor Δ and the distance gradient α, where y = α + Δ; the distance gradient α is a distance that is positively correlated with the true distance x and whose error is within a set range.
[0078] Figure 9 This is a system architecture diagram according to an embodiment of the present disclosure. (As shown) Figure 9The system 500 includes a processor 501 and a memory 502. The processor executes computer instructions stored in the memory to implement all or part of the steps of the method for discovering sensitive word derivatives based on the phonetic order of Chinese characters in the aforementioned embodiments of this disclosure.
[0079] Figure 10 This is a schematic diagram of a computer-readable storage medium according to embodiments of the present disclosure. Figure 10 As shown, the computer-readable storage medium 40 according to an embodiment of the present disclosure stores non-transitory computer-readable instructions 41 thereon. When the non-transitory computer-readable instructions 41 are executed by a processor, all or part of the steps of the methods for discovering sensitive word-derived vocabulary based on the phonetic order of Chinese characters in the foregoing embodiments of the present disclosure are performed.
[0080] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0081] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0082] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: construct a base page, the page code of which is used to build the environment required for the operation of the business page and / or implement the same workflow abstracted from similar business scenarios; construct one or more page templates, the page templates being used to provide code templates for implementing business functions in the business scenario; based on the corresponding page templates, through code conversion of the specific functions of each page in the business scenario, generate the final page code for each page in the business scenario; and merge the generated final page code of each page into the page code of the base page to generate the code for the business page.
[0083] Alternatively, the aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: construct a base page, the page code of which is used to build the environment required for the operation of the business page and / or implement the same workflow abstracted from similar business scenarios; construct one or more page templates, the page templates being used to provide code templates for implementing business functions in the business scenario; based on the corresponding page templates, through code conversion of the specific functions of each page in the business scenario, generate the final page code for each page in the business scenario; and merge the generated final page code of each page into the page code of the base page to generate the code for the business page.
[0084] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0085] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0086] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0087] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
Claims
1. A method for preventing the leakage of a user's real location, characterized in that, Includes the following steps: Step S101: Obtain the current user's Userid, user relationship with other users, and actual distance x; The user relationships include observer-observed relationships, ordinary visitor or friend relationships, and platform registered user relationships; Step S102: Calculate the disturbance factor Δ based on the user relationship and the actual distance x. The calculation method of the disturbance factor Δ varies depending on the relationship between the user and other users. Step S104: Calculate the confusion distance y based on the disturbance factor Δ, where y = x + Δ; Step S105: Display the obfuscation distance y as the display distance between the current user and other users; The formula for calculating the disturbance factor Δ is as follows: Wherein, ± is determined by whether the selected state of the Userid is a set state; if it is a set state, Δ is negative, otherwise it is positive; is an integer of the same length as the actual distance x, starting from the set number of digits of the Userid; if the number of digits is insufficient, zeros are added; λ is calculated based on the perturbation factor function g(x), where g(x) is a user-defined piecewise function, x1 and x2 are two adjacent boundary points of the piecewise function g(x), the actual distance x falls within the interval [x1, x2], and λ is calculated according to the following formula: The custom piecewise function g(x) varies depending on the relationship between the user and other users.
2. The method as described in claim 1, characterized in that: The method further includes step S103, calculating the distance gradient α based on the true distance x, wherein the distance gradient α is a distance that is positively correlated with the true distance x and whose error is within a set range; After step S103 exists, step S104 becomes calculating the confusion distance y based on the perturbation factor Δ and the distance gradient α, where y = α + Δ.
3. The method as described in claim 2, characterized in that: The formula for calculating the distance gradient α is as follows: In this context, [·] is the integer operator, which means taking the integer part of the data.
4. The method as described in claim 3, characterized in that: A gradient perturbation function is introduced for the distance gradient α, and the gradient perturbation function is: Where α is the distance gradient and x is the true distance. This is called the difference function; after introducing the gradient perturbation function, the formula for calculating the confusion distance y is as follows: 。 5. A system for preventing the leakage of a user's real location, characterized in that, include: Module 801 is used to obtain the current user's Userid, as well as the user relationship and actual distance x between other users; The user relationships include observer-observed relationships, ordinary visitor or friend relationships, and platform registered user relationships; The disturbance factor calculation module 802 is used to calculate the disturbance factor Δ based on the user relationship and the actual distance x. The calculation method of the disturbance factor Δ varies depending on the relationship between the user and other users. The confusion distance calculation module 804 is used to calculate the confusion distance y based on the disturbance factor Δ, where y = x + Δ; Display module 805 is used to display the confusion distance y as the display distance between the current user and other users; The formula for calculating the disturbance factor Δ is as follows: The ± value is determined by whether the selected state of the Userid is a set state. If it is a set state, Δ is negative; otherwise, it is positive. The Userid is an integer of the same length as the actual distance x, starting from a set number of digits. If the number of digits is insufficient, zeros are added. λ is calculated based on the perturbation factor function g(x), where g(x) is a user-defined piecewise function, x1 and x2 are two adjacent boundary points of the piecewise function g(x), and the actual distance x falls within the interval [x1, x2]. λ is calculated using the following formula: The custom piecewise function g(x) varies depending on the relationship between the user and other users.
6. The system as described in claim 5, characterized in that: The system further includes a distance gradient calculation module 804, used to calculate the distance gradient α based on the true distance x, and to calculate the confusion distance y based on the perturbation factor Δ and the distance gradient α, where y = α + Δ; the distance gradient α is a distance that is positively correlated with the true distance x and whose error is within a set range.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The steps of the method of claims 1-4 are implemented when the processor executes the program.
8. A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method of claims 1-4.
Citation Information
Patent Citations
Information push method and device and server
CN107689991A
Safe and verifiable data truth value discovery method in mobile crowd sensing
CN114362917A