Method, device, first device and storage medium for searching device
Through the privacy set interception calculation and geographic information indexing algorithm, combined with the central node to control the index accuracy, the problem of user equipment location information leakage is solved, and the security of peripheral devices is achieved is achieved, and interactive security is improved.
Patent Information
- Application Number
- CN202310077398.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-01
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-02-01
AI Technical Summary
In the process of searching peripheral devices in the prior art, the location information of the user equipment is easily leaked, resulting in insufficient interaction security.
Privacy set interception calculation combined with geographic information indexing algorithm is used to control index accuracy through central nodes to realize secure calculations between multiple devices and avoid leakage of user equipment location information.
Without revealing user equipment location information, accurately searching peripheral devices has improved interaction security.
Smart Images

Figure CN116775780B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, first device, and storage medium for searching a device. Background Art
[0002] User-device interaction is a key application area for modern computer systems. In many scenarios, the location information of user devices is an essential factor in user-device interaction. The location information of a user device includes the geographic coordinates of its current location. When searching for nearby devices, the user device typically first obtains the geographic coordinates of its current location and then transmits them over the network to participate in the next step of searching for nearby users, thereby determining whether other user devices participating in the interaction are nearby. This method of searching for nearby devices is highly susceptible to leaking the location information of the user device. Summary of the Invention
[0003] The present application provides a method, apparatus, first device, and storage medium for searching for a device, which solves the problem in related technologies of easily leaking the location information of the user device when searching for surrounding devices. The present application achieves the goal of finding the surrounding devices of the first device without leaking the location information of the first device to other participating devices participating in the intersection calculation of the privacy set, thereby avoiding leaking the location information of the first device and improving the security of interaction.
[0004] The technical solution of this application is achieved as follows:
[0005] A method for searching for a device, applied to a first device, the method comprising:
[0006] Obtain a first geographic information index value of a first device at a first index precision; wherein the first index precision is sent to the first device by a central node;
[0007] Based on the first geographic information index value, initiating a privacy set intersection calculation among multiple devices to obtain a first privacy set intersection result; wherein the multiple devices include the first device and remaining devices;
[0008] Based on the intersection result of the first privacy sets, peripheral devices of the first device are found from the remaining devices.
[0009] A device for searching for a device, comprising:
[0010] An acquisition module, configured to acquire a first geographic information index value of a first device at a first index precision; wherein the first index precision is sent to the first device by a central node;
[0011] a processing module, configured to initiate a privacy set intersection calculation among multiple devices based on the first geographic information index value to obtain a first privacy set intersection result; wherein the multiple devices include the first device and remaining devices;
[0012] The processing module is configured to search for peripheral devices of the first device from the remaining devices based on the intersection result of the first privacy sets.
[0013] A first device includes: a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to perform the steps of the above-mentioned method for searching for a device.
[0014] A storage medium stores one or more programs, wherein the one or more programs can be executed by one or more processors to implement the steps of the method for searching for a device as described above.
[0015] The present application provides a method for searching for a device, by obtaining a first geographic information index value of a first device under a first index precision; wherein the first index precision is sent to the first device by a central node; based on the first geographic information index value, a privacy set intersection calculation is initiated between multiple devices to obtain a first privacy set intersection result; wherein the multiple devices include the first device and the remaining devices; based on the first privacy set intersection result, the peripheral devices of the first device are found from the remaining devices; the present application realizes the search for the peripheral devices of the first device without leaking the location information of the first device to other participating devices participating in the privacy set intersection calculation, thereby avoiding leaking the location information of the first device and improving the interaction security. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of a method for searching for a device provided in an embodiment of the present application Figure 1 ;
[0017] Figure 2 A schematic diagram of an index map provided in an embodiment of the present application;
[0018] Figure 3 A schematic diagram of an interaction with a search device provided in an embodiment of the present application;
[0019] Figure 4 A schematic diagram of a method for searching for a device provided in an embodiment of the present application Figure 2 ;
[0020] Figure 5 A schematic diagram of a method for searching for a device provided in an embodiment of the present application Figure 3 ;
[0021] Figure 6 A schematic diagram of a method for searching for a device provided in an embodiment of the present application Figure 4 ;
[0022] Figure 7 A schematic diagram of a process for searching for a device according to an embodiment of the present application;
[0023] Figure 8 A schematic diagram of the structure of a search device provided in an embodiment of the present application;
[0024] Figure 9 A schematic structural diagram of the first device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.
[0026] It should be understood that the “embodiments of the present application” or “the aforementioned embodiments” mentioned throughout the specification mean that the specific features, structures or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, “in the embodiments of the present application” or “in the aforementioned embodiments” appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. In the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0027] User-device interaction is an important application direction of contemporary computer systems. The location information of user devices is an indispensable factor in user-device interaction in many scenarios. The location information of user devices includes the geographic coordinates of the current location (e.g., the latitude and longitude of the device's location). User devices can obtain the latitude and longitude information of their current location through a satellite positioning module or mobile base station positioning, and then participate in the next step of user interaction. Nearby users are searched to determine whether the user devices participating in the interaction are nearby. For example, taxi-hailing apps match drivers with nearby passengers, and social applications (apps) search for nearby users.
[0028] Furthermore, to find devices near the user, or to determine whether the user is nearby, the related art can be implemented through the following solutions:
[0029] The user device uploads the device's geographic coordinate information to the central node, which calculates and then sends nearby user information to the user device;
[0030] User devices detect surrounding user devices using wireless signals and other methods, thereby calculating surrounding device information. Modern devices generally make extensive use of wireless networks (such as mobile hotspots and Bluetooth) and mobile networks, and some devices also actively transmit electromagnetic signals and ultrasonic waves. Detection equipment can obtain surrounding device information by detecting the signal's source angle and attenuation information.
[0031] User devices establish end-to-end connections with each other through a central node or without a central node, exchange coordinate information, and calculate surrounding device information.
[0032] Furthermore, related technologies are divided into two categories, which can be divided according to whether data is transmitted through the Internet:
[0033] One type is to use the wireless signal of the user device to assist in detection and calculation. This solution does not require the Internet to transmit data and can protect the geographic coordinate information of the user device from being obtained by a third party. However, the wireless signal propagation range of the user device itself is limited, generally between tens and one hundred meters. If it exceeds this range, detection cannot be achieved, or the signal strength is insufficient to affect the calculation.
[0034] Another type is to transmit the geographic coordinate information of user devices over the internet. With this type of solution, there are no relative location restrictions for the user devices participating in the calculation. This method can be further divided into two types. One is that multiple user devices transmit their location data to a centralized platform, which then calculates the location interaction information between the devices. This method directly uses the geographic coordinate information of the user devices for calculations. Although the data will not be leaked to other devices participating in the calculation, the centralized platform can obtain all users' private location information. The other method also transmits user data over the internet, but first establishes an end-to-end encrypted tunnel, allowing different user devices to interact directly. This prevents intermediate nodes on the internet from detecting user data, but each user device participating in the calculation can obtain the private location information of other users. It can be seen that the related technology has the problem of easily leaking the location information of user devices when searching for surrounding devices.
[0035] This application realizes the locating of peripheral devices of the first device without leaking the location information of the first device to other participating devices participating in the privacy set intersection calculation, thereby avoiding leaking the location information of the first device and improving the interaction security.
[0036] This application provides a method for searching a device, which is applied to a first device. Figure 1 As shown, the method includes the following steps:
[0037] Step 101: Obtain a first geographic information index value of a first device at a first index precision.
[0038] The first index precision is sent by the central node to the first device.
[0039] In the embodiment of the present application, index accuracy does not involve user privacy, and the setting of index accuracy can be assisted and controlled by the central node. Index accuracy is also called the accuracy requirement for finding surrounding devices.
[0040] In a feasible scenario of searching for surrounding devices, the first device that initiates the location comparison communicates with the central node to obtain the geographic information of the current round of user devices, that is, the accuracy requirement of the user location comparison. It can be understood that accuracy is a purely metric information. For example, if the accuracy is required to be 1 meter, it means that there are currently two user devices within a radius of 1 meter, which can be considered to be in the same location. For another example, if the accuracy is required to be 3 meters, it means that there are currently two user devices within a radius of 3 meters, which can be considered to be in the same location. The accuracy requirement can be adaptively set according to actual needs, and this application does not make specific restrictions on this.
[0041] In the embodiment of the present application, index accuracy includes but is not limited to being indicated by the following spatial indexes: hexagonal hierarchical index (ie, H3 index), geohash index, and multidimensional space point index (Google S2).
[0042] The geospatial indexing system involved in the H3 index is a discrete global grid system consisting of spherical multi-precision hexagonal tiles with a hierarchical index. Figure 2 As shown, the H3 index abstracts the Earth as a sphere composed of multiple regular hexagons. Each regular hexagon can be further divided into multiple smaller regular hexagons. The H3 index defines the regular hexagons that make up the Earth as 16 layers. The size of the regular hexagons in each layer can be expressed in precision, with the highest precision being level 15, representing a regular hexagon with a side length of approximately 50 cm, and the lowest precision being level 0, representing a regular hexagon with a side length of approximately 1,107 km. Each layer is composed of seven regular hexagons, including a reduced regular hexagon in the center and six regular hexagons around the periphery.
[0043] In this embodiment, depending on the actual business scenario, an accuracy of approximately 5-8 levels can be selected to represent a radius of several kilometers. Actual business scenarios include, but are not limited to, dynamic pricing scenarios such as optimizing ride prices and scheduling, map spatial data visualization and mining scenarios, and social application software finding nearby users.
[0044] A geohash index encodes two-dimensional longitude and latitude into a one-dimensional string. A geohash represents a rectangular area. Google S2 indexes are suitable for searches involving angles, intervals, and longitude and latitude points. S2 comes from the mathematical symbol S2 in geometry, representing the unit sphere. Google S2 is suitable for solving various geometric problems on spherical surfaces.
[0045] In some embodiments of the present application, the first device may include a smart phone, a tablet computer, a laptop computer, a PDA, a personal digital assistant (PDA), a portable media player (PMP), a navigation device, a wearable device, etc., and the embodiments of the present application do not specifically limit this.
[0046] Step 102: Based on the first geographic information index value, initiate a privacy set intersection calculation between multiple devices to obtain a first privacy set intersection result.
[0047] The multiple devices include the first device and the remaining devices. Here, the multiple devices are all the participants currently participating in the secure multi-party computation (MPC). Figure 3 As shown, the first device corresponds to user equipment 1, and the remaining devices include user equipment 2, user equipment 3, ... and user equipment n, and each user equipment interacts with the central node.
[0048] The remaining devices may include smartphones, tablet computers, laptops, PDAs, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, etc., and are not specifically limited in the embodiments of the present application.
[0049] In the embodiment of the present application, the indexing algorithm is combined with multi-party secure computing to realize the search of surrounding user devices under the premise of protecting the location information of the user device. It can be understood that multi-party secure computing refers to a calculation in which multiple parties participate in the calculation, one or more of which obtains the calculation results, but the calculation process does not disclose the input data of any participant. Private Set Intersection (PSI), referred to as private intersection, is an application algorithm in multi-party secure computing. Private intersection can avoid the phenomenon that traditional intersection schemes cause participants to leak data other than the intersection. After the participants complete the private intersection, the data intersection of the participants can be obtained, but the data of other participants that are not related to it cannot be obtained. For example, multiple companies plan to find common users and hope to obtain the intersection of users without leaking other non-intersection users. In this scenario, private intersection technology can be chosen to achieve this.
[0050] In this embodiment of the present application, the result of the private set intersection is used to indicate whether the geographic information index values of two devices are the same at the current index precision. Specifically, the result of the first private set intersection is used to indicate whether the geographic information index values of two devices (including the first device and another remaining device participating in the multi-party secure computation) are the same when searching for the first device's surrounding devices at the first index precision.
[0051] Step 103: Based on the intersection result of the first privacy set, find peripheral devices of the first device from the remaining devices.
[0052] In the embodiment of the present application, when the first privacy set intersection result is obtained, the first privacy set intersection result is used as a reference to search for peripheral devices of the first device from the remaining devices.
[0053] Furthermore, in the process of finding the peripheral devices of the first device from the remaining devices with reference to the intersection result of the first privacy set, the index accuracy is adjusted with reference to the intersection result of the first privacy set, and the privacy set intersection calculation between multiple devices is re-initiated until the peripheral devices with the same geographic information index value as itself are found.
[0054] In a feasible scenario, in the process of searching for the surrounding devices of the first device from the remaining devices with reference to the intersection result of the first privacy set, if the intersection result of the first privacy set represents that, when searching for the surrounding devices of the first device under the first index precision, the geographic information index values of the two devices are the same, the surrounding devices with the same geographic information index value as the first device can be regarded as the surrounding devices.
[0055] In another feasible scenario, in the process of searching for the surrounding devices of the first device from the remaining devices with reference to the intersection result of the first privacy set, if the intersection result of the first privacy set represents the first index precision, when searching for the surrounding devices of the first device, the geographic information index values of the two devices are the same, the index precision can also be adjusted, for example, the index precision can be improved, the search range can be narrowed, and the privacy set intersection calculation between multiple devices can be re-initiated until the surrounding devices with the same geographic information index value as itself are found, so as to maximize the accuracy of the search for the surrounding devices.
[0056] The present application provides a method for searching for a device, by obtaining a first geographic information index value of a first device under a first index precision; wherein the first index precision is sent to the first device by a central node; based on the first geographic information index value, a privacy set intersection calculation is initiated between multiple devices to obtain a first privacy set intersection result; wherein the multiple devices include the first device and the remaining devices; based on the first privacy set intersection result, the peripheral devices of the first device are found from the remaining devices; the present application realizes the search for the peripheral devices of the first device without leaking the location information of the first device to other participating devices participating in the privacy set intersection calculation, thereby avoiding leaking the location information of the first device and improving the interaction security.
[0057] In some embodiments of the present application, step 101, obtaining a first geographic information index value of a first device at a first index precision, can be implemented as follows: the first device obtains its own geographic information, and calculates the first geographic information index value based on a multi-party secure computing algorithm and the first index precision obtained from a central node. Geographic information indexing algorithms include, but are not limited to, the H3 algorithm, the Geohash algorithm, and the Google S2 algorithm. Here, the first device obtains its own geographic information, and can determine the geographic information of the first device, such as longitude and latitude, by using Global Positioning System (GPS) positioning or base station triangulation positioning.
[0058] In some embodiments of the present application, the implementation of the privacy set intersection calculation between multiple devices includes but is not limited to the use of the following algorithms: Oblivious Transfer (OT), key exchange algorithms such as Diffie-Hellman, and blind signature (Blind RSA) algorithm.
[0059] In some embodiments of the present application, step 102 initiates a privacy set intersection calculation between multiple devices based on the first geographic information index value to obtain a first privacy set intersection result, which can be obtained by Figure 4 The steps shown achieve:
[0060] Step 1021: Encrypt the first geographic information index value once based on the private key of the first device to obtain a first encrypted value.
[0061] In an embodiment of the present application, taking the first device initiating location comparison as device A and any device among the remaining devices currently participating in the multi-party secure computation as device B as an example, the privacy set intersection calculation is further explained: the first device randomly generates a private key of the first device, and based on the private key of the first device, encrypts the first geographic information index value once to obtain a first encrypted value.
[0062] In a feasible scenario, taking the Diffie-Hellman algorithm as an example to implement the intersection calculation of privacy sets between multiple devices, the device A participating in the calculation generates a pair of large prime numbers pg with the assistance of the central node, and then the device A randomly generates a private key H based on pg. a Finally, device A performs an encryption calculation on the h3 index value x to obtain the first encrypted value: U a =Enc(x) a .
[0063] Step 1022: Send the first encrypted value to the central node.
[0064] In the embodiment of the present application, when the first device obtains the first encrypted value, it sends the first encrypted value to the central node. At this time, device A sends the encrypted value U a Upload to the central node and distribute it to other devices participating in the calculation.
[0065] After receiving the encrypted value, other devices perform secondary encryption calculation on the encrypted value. Here, device B performs secondary encryption calculation on U a Take the second encryption as an example, and get the second encrypted value: U ab =Enc(Enc(x) a ) b Device B will U ab Upload to the central node and distribute it to other devices participating in the calculation.
[0066] Step 1023: Receive a second encrypted value sent by the central node, which is obtained by secondary encryption of the first encrypted value by the remaining devices.
[0067] At this time, the first device, such as device A, receives the second encrypted value sent by the central node, which is obtained after the remaining devices (including device B) perform secondary encryption on the first encrypted value.
[0068] Step 1024: Receive the third encrypted values corresponding to the remaining devices sent by the central node.
[0069] Device B participating in the calculation generates a pair of large prime numbers pg through the assistance of the central node′ , then device B is based on pg ′ Randomly generate a private key H b Finally, device B has the index value x for h3 ′ Perform an encryption calculation to obtain the third encrypted value: U b =Enc(x ′ ) b Device B will U b Upload to the central node, and the central node forwards it to device A.
[0070] Step 1025: Perform secondary encryption on the third encrypted value to obtain a fourth encrypted value.
[0071] Here, device A encrypts the value U received by device B once b Perform secondary encryption to obtain the fourth encrypted value: U ba =Enc(Enc(x ′ ) b ) a .
[0072] Step 1026: Obtain a first privacy set intersection result based on the first encrypted value and the fourth encrypted value.
[0073] Here, device A compares U ab with U ba If they are the same, it means that the h3 index values of the two devices are the same. Other devices are calculated and compared in the same way.
[0074] In some embodiments of the present application, step 1026 obtains the first privacy set intersection result based on the first encrypted value and the fourth encrypted value, which can be obtained by the following steps:
[0075] If the first encrypted value and the fourth encrypted value are the same, a first privacy set intersection result is generated, which is used to indicate that the geographic information index values of the two devices participating in the privacy set intersection calculation are the same under the first index precision.
[0076] If the first encrypted value and the fourth encrypted value are different, a first privacy set intersection result is generated, which is used to represent that the geographic information index values of the two devices participating in the privacy set intersection calculation are different under the first index precision.
[0077] Based on this, the first device can obtain device information having the same geographic information index value as itself, such as the h3 index value.
[0078] In some embodiments of the present application, step 103 is based on the intersection result of the first privacy set, and the peripheral devices of the first device are found from the remaining devices. Figure 5 The steps shown achieve:
[0079] Step 1031: Based on the intersection result of the first privacy set, adjust the first index precision to the second index precision.
[0080] Step 1032: Obtain a second geographic information index value of the first device at a second index precision.
[0081] Here, step 1032, obtaining the second geographic information index value of the first device at the second index precision, can be implemented as follows: the first device obtains its own geographic information and, based on a multi-party secure computation algorithm and the second index precision obtained from the central node, calculates the second geographic information index value. The calculation of the second geographic information index value is similar to the calculation of the first geographic information index value.
[0082] Step 1033: Based on the second geographic information index value, initiate a privacy set intersection calculation between multiple devices to obtain a second privacy set intersection result.
[0083] Step 1034: Based on the intersection result of the second privacy set, determine whether to adjust the second index precision until a surrounding device with the same geographic information index value as the first device is found from the remaining devices.
[0084] It can be seen that this application uses the first privacy set intersection result as a reference, and in the process of finding the peripheral devices of the first device from the remaining devices, uses the first privacy set intersection result as a reference to adjust the index accuracy, re-initiates the privacy set intersection calculation between multiple devices, and obtains the second privacy set intersection result, and then uses the second privacy set intersection result as a reference to adjust the index accuracy, and re-initiates the privacy set intersection calculation between multiple devices... In other words, this application can adjust the index accuracy based on the previous privacy set intersection result as a reference to confirm whether to execute a new round of privacy set intersection calculation under the index accuracy, until the peripheral devices with the same geographic information index value as the first device are found from the remaining devices.
[0085] In some embodiments of the present application, step 1031 adjusts the first index precision to the second index precision based on the intersection result of the first privacy set, which can be achieved by the following steps: if the intersection result of the first privacy set indicates that under the first index precision, the geographic information index value of the remaining devices is different from the first geographic information index value, the first index precision is lowered to the second index precision.
[0086] Here, upon obtaining the first privacy set intersection result, the first device reads the device information with the same h3 index as itself. If no device has the same geographic information index value as itself, it indicates that there are no nearby peripheral devices at the current precision. At this point, the subsequent higher-precision calculation is exited. Of course, the index precision can be reduced at this point, and a new round of privacy set intersection calculations is performed until a peripheral device with the same geographic information index value as the first device is found from the remaining devices. It should be noted that the confidence level of the peripheral device found at this time is low, and the corresponding confidence level can be output at the same time as the query result. The lower the confidence level, the lower the credibility of the peripheral device found for the first device.
[0087] In some embodiments of the present application, step 1031 adjusts the first index precision to the second index precision based on the intersection result of the first privacy set, which can be achieved by the following steps: if the intersection result of the first privacy set indicates that under the first index precision, the geographic information index values of multiple devices in the remaining devices are the same as the first geographic information index value, the first index precision is adjusted to the second index precision.
[0088] In this scenario, the remaining devices will share the same h3 index value with at least one other device. Consider device A. The central node will assist in increasing the precision level with other devices with the same h3 index value before performing the next round of privacy intersection. At this point, if there are no surrounding devices with the same h3 index value as device A at the current precision level corresponding to the increased precision level, this indicates that the nearest device to device A is within the precision range of the previous level, and there is no need to further reduce the precision.
[0089] In some embodiments of the present application, after searching for the peripheral devices of the first device from the remaining devices based on the intersection result of the first privacy set in step 103, the following can also be performed: Figure 6 Follow the steps below to determine the location of the discovered peripherals:
[0090] Step 201: Based on the index accuracy when finding surrounding devices, obtain the index set where the geographic information index value of the first device is located.
[0091] In the embodiment of the present application, the first device obtains the h3 index values {x1, x2...x6} of the six neighboring regular hexagons of the regular hexagon represented by the h3 index value of device A at the current precision.
[0092] Step 202: Based on the nth geographic information index value in the index set, initiate a privacy set intersection calculation between multiple devices to obtain the nth privacy set intersection result corresponding to the nth geographic information index value.
[0093] In the embodiment of the present application, the nth geographic information index value is any index value in {x1, x2...x6}. The first setting is based on using the above 6 h3 index values to initiate a privacy intersection calculation with the surrounding devices again.
[0094] Step 203: Determine the location of the found surrounding device based on the intersection result of the nth privacy set.
[0095] In the embodiment of the present application, since the device participating in the privacy intersection has the same h3 index value as the first device at the previous level of precision, it means that the other device must be one of the six surrounding devices of the first device. Therefore, based on the intersection result, the orientation of the other surrounding devices (i.e., one of the six orientations of the regular hexagon) can be obtained.
[0096] It can be seen that this application combines the h3 index algorithm with the privacy intersection algorithm to achieve the search of surrounding user devices, including the location, distance and range accuracy information of surrounding devices, while protecting the user device's geographic information such as coordinate information.
[0097] In a scenario where it is possible to find surrounding devices, combined with Figure 7 As shown,
[0098] Step 301: The user equipment participating in the calculation requests the central node to obtain the index accuracy of the h3 index value calculated in this round.
[0099] Step 302: The user equipment participating in the calculation calculates the h3 index value at the current index precision.
[0100] Here, a pair of large prime numbers is generated with the help of the central node. Then, each user device participating in the calculation randomly generates a private key. Taking device A as an example, the h3 index value x is encrypted and calculated to obtain an encrypted value U a =Enc(x) a .
[0101] Device A will use the encrypted value U a Upload to the central node, and the central node distributes it to other nodes participating in the calculation; after receiving the encrypted value, other devices perform secondary encryption calculation on the encrypted value. Taking device B as an example, a Perform secondary encryption calculation to obtain U ab =Enc(Enc(x) a ) b ,Then, it is uploaded to the central node and distributed by the central node to other nodes participating in the ,computation.
[0102] Similarly, device A encrypts the value U received by device B once b Perform secondary encryption to obtain U ba =Enc(Enc(x ′ )b ) a .
[0103] Step 303: User devices initiate a privacy set intersection to obtain their own surrounding devices at the current accuracy.
[0104] Here, compare U ab with U ba If they are the same, it means that the h3 index of the two devices is the same. Other devices are calculated and compared in the same way. All devices obtain the device information with the same h3 index as themselves after calculation.
[0105] The user device reads the device information with the same h3 index value as itself. If no device has the same h3 index value as itself, it means that there are no nearby devices at the current accuracy. The subsequent calculation with higher accuracy is aborted.
[0106] The remaining devices will have the same h3 index value as at least one other device. Consider device A, which uses the central node to assist in improving the accuracy level with other devices with the same h3 index value, and then conducts the next round of privacy intersection.
[0107] If there is no device with the same h3 index value as device A at the current precision, it means that the nearest device to device A is within the precision range of the next higher level, and there is no need to further reduce the precision for calculation.
[0108] Step 304: Whether to perform peripheral device position calculation.
[0109] Here, if the specific positions of devices around device A are to be acquired, step 305 is executed to acquire the position information of the devices around the current device at the current accuracy.
[0110] Among them, step 305, obtaining the position information of the surrounding devices of the current device at the current accuracy, can be processed as follows:
[0111] Obtain the h3 index values {x1, x2... x6} of the six neighboring regular hexagons of the regular hexagon represented by device A's h3 index at the current precision. Using the aforementioned private intersection algorithm, use these six h3 index values to initiate another private intersection calculation with the surrounding devices.
[0112] Since the devices participating in the private intersection have the same h3 index value as device A at the previous level of precision, it means that the other device must be one of the six surrounding devices of device A. Therefore, based on the intersection result, the position of the other surrounding device (one of the six positions of the regular hexagon) can be obtained.
[0113] Here, if the specific positions of the devices surrounding device A are not considered, step 306 is executed to determine the number of surrounding devices.
[0114] Step 307: If there are peripheral devices, whether to perform higher-precision calculations. If so, continue with the next round of calculations to further obtain higher-precision peripheral device information.
[0115] Step 308: If there are no surrounding devices, determine whether to perform a higher-level precision surrounding device position determination. If so, execute step 309: calculate the h3 index values of the six regular hexagons around device A at the higher-level precision. This will yield a higher-level precision surrounding device position determination result.
[0116] As can be seen from the above, this application uses a privacy-preserving intersection algorithm to exchange the coordinate information of different user devices with the help of a central node, achieving the function of finding surrounding user devices without leaking the user device coordinate information to any party (the central node, or other user devices participating in the calculation). This application uses the h3 index algorithm to represent the characteristics of regular hexagons of different precisions, realizing that finding surrounding user devices only requires an intersection operation, and no longer requires calculating the user coordinate azimuth distance, satisfying the application of the privacy-preserving intersection algorithm.
[0117] It can be seen that this application proposes a method for finding surrounding devices. The coordinate information of the user of this solution is still transmitted through the Internet, and will not be restricted by the relative position distance of multiple user devices. The relative positions of multiple user devices participating in the calculation are confirmed through the privacy intersection algorithm. At the same time, the geographic information of devices that are not around the first device will not be leaked, and the private location information of the user device is protected as much as possible.
[0118] The embodiment of the present application provides a device for searching a device, which can be applied to Figure 1 In a method for searching a device provided in a corresponding embodiment, referring to Figure 8 As shown, the device 400 for searching the device includes:
[0119] The acquisition module 401 is configured to acquire a first geographic information index value of a first device at a first index precision, wherein the first index precision is sent from a central node to the first device;
[0120] Processing module 402 is configured to initiate a privacy set intersection calculation among multiple devices based on the first geographic information index value to obtain a first privacy set intersection result; wherein the multiple devices include the first device and the remaining devices;
[0121] The processing module 402 is configured to search for peripheral devices of the first device from the remaining devices based on the intersection result of the first privacy set.
[0122] In some embodiments of the present application, the processing module 402 is used to adjust the first index precision to the second index precision based on the first privacy set intersection result; obtain the second geographic information index value of the first device at the second index precision; based on the second geographic information index value, initiate a privacy set intersection calculation between multiple devices to obtain a second privacy set intersection result; based on the second privacy set intersection result, determine whether to adjust the second index precision until a surrounding device with the same geographic information index value as the first device is found from the remaining devices.
[0123] In some embodiments of the present application, the processing module 402 is configured to lower the first index precision to a second index precision if the intersection result of the first privacy set indicates that the geographic information index values of the remaining devices are different from the first geographic information index value at the first index precision.
[0124] In some embodiments of the present application, the processing module 402 is configured to increase the first index precision to a second index precision if the intersection result of the first privacy set indicates that the geographic information index values of multiple devices in the remaining devices are the same as the first geographic information index value under the first index precision.
[0125] In some embodiments of the present application, the processing module 402 is used to obtain the index set containing the geographic information index value of the first device based on the index accuracy when the surrounding devices are found; based on the nth geographic information index value in the index set, initiate a privacy set intersection calculation between multiple devices to obtain the nth privacy set intersection result corresponding to the nth geographic information index value; and determine the position of the found surrounding devices based on the nth privacy set intersection result.
[0126] In some embodiments of the present application, the processing module 402 is configured to encrypt the first geographic information index value once based on the private key of the first device to obtain a first encrypted value; send the first encrypted value to the central node; and receive a second encrypted value sent by the central node after the remaining devices perform a second encryption on the first encrypted value;
[0127] Receive the third encrypted value corresponding to the remaining devices sent by the central node; perform secondary encryption on the third encrypted value to obtain a fourth encrypted value; and obtain the intersection result of the first privacy set based on the first encrypted value and the fourth encrypted value.
[0128] In some embodiments of the present application, the processing module 402 is configured to generate a first privacy set intersection result, if the first encrypted value and the fourth encrypted value are the same, for indicating that the geographic information index values of two devices participating in the privacy set intersection calculation are the same at the first index precision;
[0129] If the first encrypted value and the fourth encrypted value are different, a first privacy set intersection result is generated, which is used to represent that the geographic information index values of the two devices participating in the privacy set intersection calculation are different under the first index precision.
[0130] It should be noted that, for the description of the same steps and contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.
[0131] The embodiment of the present application provides a first device, which can be applied to Figure 1 In a method for searching a device provided in a corresponding embodiment, referring to Figure 9 As shown, the first device 500 includes: a processor 501, a memory 502 and a communication bus 503, wherein: the communication bus 503 is used to implement a communication connection between the processor 501 and the memory 502;
[0132] The processor 501 is configured to execute the device search program stored in the memory 502 to implement the following steps:
[0133] Obtaining a first geographic information index value of the first device at a first index precision; wherein the first index precision is sent to the first device by the central node;
[0134] Based on the first geographic information index value, initiating a privacy set intersection calculation between multiple devices to obtain a first privacy set intersection result; wherein the multiple devices include the first device and the remaining devices;
[0135] Based on the intersection result of the first privacy set, peripheral devices of the first device are found from the remaining devices.
[0136] In some embodiments of the present application, the processor 501 is used to execute a device search program stored in the memory 502 to implement the following steps: based on the first privacy set intersection result, adjusting the first index precision to the second index precision; obtaining the second geographic information index value of the first device under the second index precision; based on the second geographic information index value, initiating a privacy set intersection calculation between multiple devices to obtain a second privacy set intersection result; based on the second privacy set intersection result, determining whether to adjust the second index precision until a peripheral device with the same geographic information index value as the first device is found from the remaining devices.
[0137] In some embodiments of the present application, the processor 501 is used to execute a program for searching devices stored in the memory 502 to implement the following steps: if the intersection result of the first privacy set represents that the geographic information index value of the remaining devices is different from the first geographic information index value under the first index precision, the first index precision is lowered to the second index precision.
[0138] In some embodiments of the present application, the processor 501 is used to execute a program for searching devices stored in the memory 502 to implement the following steps: if the intersection result of the first privacy set represents that under the first index precision, the geographic information index values of multiple devices in the remaining devices are the same as the first geographic information index value, the first index precision is increased to the second index precision.
[0139] In some embodiments of the present application, the processor 501 is configured to execute a device search program stored in the memory 502 to implement the following steps: based on the index accuracy when finding surrounding devices, obtaining an index set containing the geographic information index value of the first device;
[0140] Based on the nth geographic information index value in the index set, initiate a privacy set intersection calculation between multiple devices to obtain the nth privacy set intersection result corresponding to the nth geographic information index value;
[0141] Based on the intersection result of the nth privacy set, the location of the found surrounding devices is determined.
[0142] In some embodiments of the present application, the processor 501 is used to execute a program for searching devices stored in the memory 502 to implement the following steps: encrypting the first geographic information index value once based on the private key of the first device to obtain a first encrypted value; sending the first encrypted value to the central node; receiving a second encrypted value sent by the central node after the remaining devices encrypt the first encrypted value twice to obtain a second encrypted value; receiving a third encrypted value corresponding to the remaining devices sent by the central node; encrypting the third encrypted value twice to obtain a fourth encrypted value; and obtaining the intersection result of the first privacy set based on the first encrypted value and the fourth encrypted value.
[0143] In some embodiments of the present application, the processor 501 is used to execute a program for searching a device stored in the memory 502 to implement the following steps: if the first encryption value and the fourth encryption value are the same, a first privacy set intersection result is generated to characterize that the geographic information index values of the two devices participating in the privacy set intersection calculation are the same under the first index precision; if the first encryption value and the fourth encryption value are different, a first privacy set intersection result is generated to characterize that the geographic information index values of the two devices participating in the privacy set intersection calculation are different under the first index precision.
[0144] It should be noted that, for the description of the same steps and contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.
[0145] An embodiment of the present application provides a computer storage medium storing one or more programs. The one or more programs can be executed by one or more processors to implement the following steps:
[0146] Obtaining a first geographic information index value of the first device at a first index precision; wherein the first index precision is sent to the first device by the central node;
[0147] Based on the first geographic information index value, initiating a privacy set intersection calculation between multiple devices to obtain a first privacy set intersection result; wherein the multiple devices include the first device and the remaining devices;
[0148] Based on the intersection result of the first privacy set, peripheral devices of the first device are found from the remaining devices.
[0149] In some embodiments of the present application, the one or more programs may be executed by one or more processors to implement the following steps:
[0150] Based on the first privacy set intersection result, the first index precision is adjusted to the second index precision; the second geographic information index value of the first device under the second index precision is obtained; based on the second geographic information index value, a privacy set intersection calculation between multiple devices is initiated to obtain the second privacy set intersection result; based on the second privacy set intersection result, it is determined whether to adjust the second index precision until a peripheral device with the same geographic information index value as the first device is found from the remaining devices.
[0151] In some embodiments of the present application, the one or more programs may be executed by one or more processors to implement the following steps:
[0152] If the intersection result of the first privacy set indicates that the geographic information index values of the remaining devices are different from the first geographic information index value under the first index precision, the first index precision is lowered to the second index precision.
[0153] In some embodiments of the present application, the one or more programs may be executed by one or more processors to implement the following steps:
[0154] If the intersection result of the first privacy set indicates that under the first index precision, the geographic information index values of multiple devices in the remaining devices are the same as the first geographic information index value, the first index precision is increased to the second index precision.
[0155] In some embodiments of the present application, the one or more programs may be executed by one or more processors to implement the following steps:
[0156] Based on the index accuracy when finding the surrounding devices, obtain the index set where the geographic information index value of the first device is located;
[0157] Based on the nth geographic information index value in the index set, initiate a privacy set intersection calculation between multiple devices to obtain the nth privacy set intersection result corresponding to the nth geographic information index value;
[0158] Based on the intersection result of the nth privacy set, the location of the found surrounding devices is determined.
[0159] In some embodiments of the present application, the one or more programs may be executed by one or more processors to implement the following steps:
[0160] Encrypting the first geographic information index value once based on the private key of the first device to obtain a first encrypted value;
[0161] Sending the first encrypted value to the central node;
[0162] Receiving a second encrypted value sent by the central node after the remaining devices perform secondary encryption on the first encrypted value;
[0163] Receive the third encrypted values corresponding to the remaining devices sent by the central node;
[0164] Performing secondary encryption on the third encrypted value to obtain a fourth encrypted value;
[0165] A first privacy set intersection result is obtained based on the first encrypted value and the fourth encrypted value.
[0166] In some embodiments of the present application, the one or more programs may be executed by one or more processors to implement the following steps:
[0167] If the first encrypted value and the fourth encrypted value are the same, generating a first privacy set intersection result for indicating that the geographic information index values of the two devices participating in the privacy set intersection calculation are the same under the first index precision;
[0168] If the first encrypted value and the fourth encrypted value are different, a first privacy set intersection result is generated, which is used to represent that the geographic information index values of the two devices participating in the privacy set intersection calculation are different under the first index precision.
[0169] It should be noted that, for the description of the same steps and contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.
[0170] It should be noted that the above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0171] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0172] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0173] In addition, the functional units in the embodiments of the present application can all be integrated into one processing module, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units. It can be understood by ordinary technicians in this field that all or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiments; and the above-mentioned storage medium includes: mobile storage devices, read-only memory (ROM), random access memory (RAM), disks or optical disks, etc. Various media that can store program codes.
[0174] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0175] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0176] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0177] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for searching a device, characterized in that: The method comprises: Obtain a first geographic information index value of a first device at a first index precision; wherein the first index precision is sent to the first device by a central node; Based on the first geographic information index value, initiating a privacy set intersection calculation among multiple devices to obtain a first privacy set intersection result; wherein the multiple devices include the first device and remaining devices; Based on the intersection result of the first privacy set, searching for peripheral devices of the first device from the remaining devices; The step of searching for peripheral devices of the first device from the remaining devices based on the intersection result of the first privacy set includes: Adjusting the first index precision to a second index precision based on the intersection result of the first privacy set; Obtain a second geographic information index value of the first device at the second index precision; Based on the second geographic information index value, initiating a privacy set intersection calculation between the multiple devices to obtain a second privacy set intersection result; Based on the intersection result of the second privacy set, it is determined whether to adjust the second index precision until the surrounding device having the same geographic information index value as the first device is found from the remaining devices.
2. The method according to claim 1, characterized in that The adjusting the first index precision to a second index precision based on the intersection result of the first privacy set includes: If the intersection result of the first privacy set indicates that the geographic information index value of the remaining device is different from the first geographic information index value under the first index precision, the first index precision is lowered to the second index precision.
3. The method according to claim 1, characterized in that The adjusting the first index precision to a second index precision based on the intersection result of the first privacy set includes: If the intersection result of the first privacy set indicates that the geographic information index values of multiple devices in the remaining devices are the same as the first geographic information index value under the first index precision, the first index precision is increased to the second index precision.
4. The method according to claim 1, wherein After finding peripheral devices of the first device from the remaining devices based on the intersection result of the first privacy set, the method further includes: Based on the index accuracy when finding the surrounding device, obtaining the index set where the geographic information index value of the first device is located; Based on the nth geographic information index value in the index set, initiating a privacy set intersection calculation between the multiple devices to obtain an nth privacy set intersection result corresponding to the nth geographic information index value; Based on the intersection result of the nth privacy set, the position of the found surrounding device is determined.
5. The method according to claim 1, characterized in that The initiating a privacy set intersection calculation among multiple devices based on the first geographic information index value to obtain a first privacy set intersection result includes: Encrypting the first geographic information index value once based on the private key of the first device to obtain a first encrypted value; Sending a first encrypted value to the central node; receiving a second encrypted value sent by the central node, obtained by secondary encryption of the first encrypted value by the remaining devices; receiving a third encrypted value corresponding to the remaining device sent by the central node; Performing secondary encryption on the third encrypted value to obtain a fourth encrypted value; Based on the first encrypted value and the fourth encrypted value, a first privacy set intersection result is obtained.
6. The method according to claim 5, characterized in that Obtaining the first privacy set intersection result based on the first encrypted value and the fourth encrypted value includes: If the first encrypted value and the fourth encrypted value are the same, generating a first privacy set intersection result for indicating that the geographic information index values of the two devices participating in the privacy set intersection calculation are the same under the first index precision; If the first encrypted value and the fourth encrypted value are different, a first privacy set intersection result is generated, which is used to represent that the geographic information index values of the two devices participating in the privacy set intersection calculation are different under the first index precision.
7. A device for searching a device, characterized in that: include: An acquisition module, configured to acquire a first geographic information index value of a first device at a first index precision; wherein the first index precision is sent to the first device by a central node; a processing module, configured to initiate a privacy set intersection calculation among multiple devices based on the first geographic information index value to obtain a first privacy set intersection result; wherein the multiple devices include the first device and remaining devices; The processing module is configured to search for peripheral devices of the first device from the remaining devices based on the intersection result of the first privacy set; The step of searching for peripheral devices of the first device from the remaining devices based on the intersection result of the first privacy set includes: Adjusting the first index precision to a second index precision based on the intersection result of the first privacy set; Obtain a second geographic information index value of the first device at the second index precision; Based on the second geographic information index value, initiating a privacy set intersection calculation between the multiple devices to obtain a second privacy set intersection result; Based on the intersection result of the second privacy set, it is determined whether to adjust the second index precision until the surrounding device having the same geographic information index value as the first device is found from the remaining devices.
8. A first device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method for searching a device according to any one of claims 1 to 6.
Citation Information
Patent Citations
Efficient searchable proxy privacy set intersection method and device
CN114491613A
Multi-party privacy set intersection method and device, equipment and storage medium
CN115065459A