Distance query method, device, equipment and medium based on local differential privacy
By adding noise to the distance vector of the client in the social network graph and performing aggregation operation, the problem of efficient distance query while protecting privacy is solved, and security and efficiency are improved.
Patent Information
- Application Number
- CN202411014129.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-07-26
AI Technical Summary
On the premise of protecting user privacy, how to conduct distance query in efficient graph data analysis, especially in social networks, it is difficult for the existing technology to maintain the effectiveness of query results while ensuring privacy security.
By adding noise values to the distance vector of each client in the social network graph and performing aggregation operation until the repeated stop condition is reached, the distance query result is obtained. The probability distribution sampling function and the aggregation formula are used to calculate the distance vector between clients, which enhances privacy and security and improves query efficiency.
While protecting user privacy, it improves the security and efficiency of distance query, reduces disturbances in query results, and achieves efficient distance query results.
Smart Images

Figure CN119577258B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of privacy protection technology, and in particular to a distance query method, apparatus, device, and medium based on local differential privacy. Background Art
[0002] In today's digital age, with the prevalence of big data, the role of graph data in society is becoming increasingly important. Graph data reveals complex network structures and interactions through the relationship mapping of nodes (vertices) and edges (edges), from social networks to the Internet of Things, from ecosystems to economic models.
[0003] However, with the increasing digitization of personal information, how to effectively analyze this graph data without exposing user privacy has become a critical issue in modern society. Local differential privacy (LDP) provides a powerful tool to address this issue. By allowing users to process their data locally, even if the data is obtained by a third party, it cannot accurately interpret personal information, significantly protecting personal privacy. Local differential privacy (LDP) has been a significant development in the field of privacy protection in recent years. It is a special case of differential privacy, which was proposed by Dwork et al. in 2006 to provide a framework for quantifying the level of data privacy protection. Unlike traditional differential privacy, it implements privacy protection at the data collection stage, rather than at the data release stage. Local differential privacy randomizes data on the user side, preventing any third party, including the data collector, from accurately knowing the data of any specific user, thereby ensuring the security of user privacy.
[0004] Graph data has diverse applications across various fields. For example, in social networks, graph data analysis can help identify influential users, predict information dissemination patterns, and optimize advertising targeting. In supply chain management, by analyzing graph data across supply networks, companies can optimize inventory, reduce costs, and improve efficiency. In finance, analysis of transaction networks can be used to prevent fraud and money laundering. In urban planning, graph data analysis of transportation networks helps optimize traffic flow and reduce congestion.
[0005] Distance query is a fundamental and important function in graph data analysis. It not only relates to the graph's topological structure but also reflects the closeness of the relationships between nodes. In a graph, distance typically refers to the length of the shortest path between two nodes, which is called the "shortest path distance." It is one of the key metrics for evaluating the speed and efficiency of information dissemination in a network. In social networks, shortest path distance can help us understand the close relationships between users; in logistics networks, it helps calculate the most efficient route from one point to another. However, ensuring privacy often requires some degree of perturbation of the original data, which may affect the utility of the query results.
[0006] Therefore, in order to perform efficient distance queries while protecting user privacy, a distance query method based on local differential privacy is urgently needed to balance privacy protection and the utility of query results. Summary of the Invention
[0007] The present invention provides a distance query method, apparatus, device and medium based on local differential privacy, which can improve the security and efficiency of distance query based on local differential privacy.
[0008] To achieve the above objectives, the present invention provides a distance query method based on local differential privacy, comprising:
[0009] Obtain a social network graph and initialize a distance vector for each client in the social network graph;
[0010] The client adds a noise value to the distance vector and distributes it to neighboring clients, and updates the distance vector of each client after performing an aggregation operation;
[0011] Repeat the steps of adding noise to the distance vector of the client and then distributing it to neighboring clients and performing aggregation operations to update the distance vector of each client until a repetition stop condition is met to obtain a distance query result.
[0012] Optionally, before initializing the distance vector of each client in the social network graph, the method further includes:
[0013] Each client presets a distance threshold and privacy parameters.
[0014] Optionally, the client adds a noise value to the distance vector and distributes the result to neighboring clients, including:
[0015] A noise value is obtained through a probability distribution sampling function, and the noise value is added to the distance vector.
[0016] Optionally, obtaining the noise value through a probability distribution sampling function includes:
[0017] The noise value is obtained using the following probability distribution sampling function:
[0018]
[0019] Where x is the noise value and b is the scale parameter.
[0020] Optionally, adding the noise value to the distance vector comprises:
[0021] The noise value is added to the distance vector using the following formula:
[0022]
[0023] in, is the distance vector of client u after adding the noise value, is the initial distance vector of the client, ∈ is the privacy parameter, R is the distance threshold, and X is the independent random variable parameter.
[0024] Optionally, updating the distance vector of each client after performing the aggregation operation includes:
[0025] Each client traverses all clients except itself and uses a preset aggregation formula to calculate the distance vector between the client and the clients except itself to obtain the target distance vector;
[0026] The target distance vector is used to update the distance vector between each client and the clients other than itself, and a collection of distance vectors between each client and the clients other than itself is obtained.
[0027] Optionally, the calculating of the distance vector between the client and clients other than the client using a preset aggregation formula includes:
[0028] The following aggregation formula is used to calculate the distance between a client and other clients except itself:
[0029]
[0030] in, is the distance from client u to client j obtained by the k+1th aggregation, is the distance from client i to client j obtained in the kth aggregation, is the distance from client u to client j obtained in the kth aggregation, [n] represents the set {1,2,…,n}, and N(u) represents the set of neighboring clients of client u.
[0031] In order to solve the above problems, the present invention further provides a distance query device based on local differential privacy, the device comprising:
[0032] A distance vector initialization module is used to obtain a social network graph and initialize the distance vector of each client in the social network graph;
[0033] A distance vector aggregation module is used for the client to add a noise value to the distance vector and distribute it to neighboring clients, and to update the distance vector of each client after performing an aggregation operation;
[0034] The distance query result acquisition module is used to repeatedly add noise to the distance vector of the client and distribute it to neighboring clients and perform aggregation operations to update the distance vector of each client until a repetition stop condition is met to obtain a distance query result.
[0035] In order to solve the above problem, the present invention further provides an electronic device, comprising:
[0036] at least one processor; and,
[0037] a memory communicatively connected to the at least one processor; wherein,
[0038] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned distance query method based on local differential privacy.
[0039] In order to solve the above problems, the present invention also provides a computer-readable storage medium, which stores at least one computer program. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned distance query method based on local differential privacy.
[0040] The present invention adds a noise value to the distance vector on a client and distributes it to neighboring clients. This noise addition improves the security of each client in a social network graph and enhances privacy. Only one noise value is added to each distance query result, resulting in minimal disturbance. Furthermore, by repeatedly adding noise to the client's distance vector and distributing it to neighboring clients, and performing an aggregation operation to update each client's distance vector, distance query efficiency is improved and the minimum distance vector value can be obtained during distance queries. This invention improves the utility of distance query results while protecting user privacy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A flowchart of a distance query method based on local differential privacy provided by an embodiment of the present invention;
[0042] Figure 2A functional module diagram of a distance query device based on local differential privacy provided by one embodiment of the present invention;
[0043] Figure 3 A schematic structural diagram of an electronic device for implementing a distance query method based on local differential privacy provided in one embodiment of the present invention.
[0044] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0045] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0046] The embodiment of the present application provides a distance query method based on local differential privacy. The execution subject of the distance query method based on local differential privacy includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the distance query method based on local differential privacy can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0047] Reference Figure 1 FIG2 is a flow chart of a distance query method based on local differential privacy provided by an embodiment of the present invention. In this embodiment, the distance query method based on local differential privacy includes:
[0048] S1. Obtain a social network graph and initialize a distance vector of each client in the social network graph.
[0049] In an embodiment of the present invention, the social network graph refers to a network depicting the relationships between individuals (such as people or organizations), wherein each node, also called a client, represents an individual, and the edge represents the relationship between individuals, such as friendship, cooperation or communication path.
[0050] In the embodiment of the present invention, the distance vector refers to the distance between a client and other clients in the social network graph.
[0051] As an embodiment of the present invention, before initializing the distance vector of each client in the social network graph, the method further includes:
[0052] Each client presets a distance threshold and privacy parameters.
[0053] In this embodiment of the present invention, the distance threshold refers to the limit on distance queries between each client and other clients in the social network graph, and is used to determine the maximum acceptable error in distance calculation. The distance threshold affects the error and computational efficiency of distance queries.
[0054] In the embodiment of the present invention, the privacy parameter refers to the degree of privacy protection, which is used to measure the degree of privacy loss when data is released. The smaller the privacy parameter, the higher the degree of privacy protection.
[0055] Exemplarily, the initialization of the distance vector of each client in the social network graph may be performed by the following steps:
[0056] Each client generates its own initial distance vector Where 0 represents the result of the 0th aggregation, where the length of the initial distance vector is n, and n is the number of all clients in the social network graph. The distance between client u and client j is P; if Indicates that the distance between client u and client j is 1.
[0057] S2. The client adds a noise value to the distance vector and distributes it to neighboring clients, and updates the distance vector of each client after performing an aggregation operation.
[0058] In the embodiment of the present invention, the noise value refers to randomly generated data in differential privacy protection, which is used to cover or disrupt original data to prevent sensitive information from being leaked.
[0059] As an embodiment of the present invention, the client adds a noise value to the distance vector and distributes it to neighboring clients, including:
[0060] A noise value is obtained through a probability distribution sampling function, and the noise value is added to the distance vector.
[0061] In the embodiment of the present invention, the probability distribution sampling function is a method for obtaining a noise value. For example, a Laplace noise value may be obtained through a Laplace probability distribution.
[0062] Furthermore, the noise value is obtained through the probability distribution sampling function, including:
[0063] The noise value is obtained using the following probability distribution sampling function:
[0064]
[0065] Where x is the noise value and b is the scale parameter.
[0066] In the embodiment of the present invention, the value of the scale parameter is usually 1.
[0067] Furthermore, the adding the noise value to the distance vector includes:
[0068] The noise value is added to the distance vector using the following formula:
[0069]
[0070] in, is the distance vector of client u after adding the noise value, is the initial distance vector of the client, ∈ is the privacy parameter, T is the distance threshold, and X is the independent random variable parameter.
[0071] Furthermore, updating the distance vector of each client after performing the aggregation operation includes:
[0072] Each client traverses all clients except itself and uses a preset aggregation formula to calculate the distance vector between the client and the clients except itself to obtain the target distance vector;
[0073] The target distance vector is used to update the distance vector between each client and the clients other than itself, and a collection of distance vectors between each client and the clients other than itself is obtained.
[0074] Furthermore, the calculating of the distance vector between the client and the clients other than the client using a preset aggregation formula includes:
[0075] The following aggregation formula is used to calculate the distance between a client and other clients except itself:
[0076]
[0077] Among them, j∈[n] / N(u), is the distance from client u to client j obtained by the k+1th aggregation, is the distance from client i to client j obtained in the kth aggregation, is the distance from client u to client j obtained in the kth aggregation, [n] represents the set {1,2,…,n}, and N(u) represents the set of neighboring clients of client u.
[0078] Exemplarily, in the polymerization, the number of polymerizations k=0.
[0079] For example, the client obtains the minimum distance from the distance vector collection as follows: Client u knows that the distance from its neighbor i to client j is Then its distance to client j can be represented by the minimum distance from neighbors to client j + 1, that is, At the same time, add this distance to the previous distance to client j Compare and update the minimum value.
[0080] In the embodiment of the present invention, the client adds a noise value to the distance vector and distributes it to neighboring clients. This can improve the security of each client in the social network graph and enhance privacy security by adding the noise value.
[0081] S3. Repeat the steps of adding noise to the distance vector of the client and then distributing it to neighboring clients and performing an aggregation operation to update the distance vector of each client until a repetition stop condition is met and a distance query result is obtained.
[0082] In an embodiment of the present invention, the repetitive stopping condition may be that the distance queried between each client is the shortest distance under the distance threshold. The repetitive stopping condition may also be the number of iterations, where the number of iterations refers to the number of queries corresponding to the distance threshold minus 1, that is, minus the 0th query. The number of iterations is expressed as T-1.
[0083] In this embodiment of the present invention, a client adds a noise value to the distance vector and distributes it to neighboring clients. This noise addition improves the security of each client in a social network graph and enhances privacy. Only one noise value is added to the result of each distance query, resulting in minimal disturbance. Furthermore, by repeatedly adding noise to the client's distance vector and distributing it to neighboring clients, and performing an aggregation operation to update each client's distance vector, distance query efficiency is improved and the minimum distance vector value can be obtained during distance queries. This embodiment of the present invention allows for efficient distance queries while protecting user privacy.
[0084] like Figure 2 , which is a functional module diagram of a distance query device based on local differential privacy provided by one embodiment of the present invention.
[0085] The distance query device 100 based on local differential privacy of the present invention can be installed in an electronic device. Depending on the functions implemented, the distance query device 100 based on local differential privacy can include a distance vector initialization module 101, a distance vector aggregation module 102, and a distance query result acquisition module 103.
[0086] The module described in the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and is stored in a memory of the electronic device.
[0087] In this embodiment, the functions of each module / unit are as follows:
[0088] The distance vector initialization module 101 is used to obtain a social network graph and initialize the distance vector of each client in the social network graph.
[0089] In an embodiment of the present invention, the social network graph refers to a network depicting the relationships between individuals (such as people or organizations), wherein each node, also called a client, represents an individual, and the edge represents the relationship between individuals, such as friendship, cooperation or communication path.
[0090] In the embodiment of the present invention, the distance vector refers to the distance between a client and other clients in the social network graph.
[0091] As an embodiment of the present invention, before initializing the distance vector of each client in the social network graph, the method further includes:
[0092] Each client presets a distance threshold and privacy parameters.
[0093] In this embodiment of the present invention, the distance threshold refers to the limit on distance queries between each client and other clients in the social network graph, and is used to determine the maximum acceptable error in distance calculation. The distance threshold affects the error and computational efficiency of distance queries.
[0094] In the embodiment of the present invention, the privacy parameter refers to the degree of privacy protection, which is used to measure the degree of privacy loss when data is released. The smaller the privacy parameter, the higher the degree of privacy protection.
[0095] Exemplarily, the initialization of the distance vector of each client in the social network graph may be performed by the following steps:
[0096] Each client generates its own initial distance vector Where 0 represents the result of the 0th aggregation, where the length of the initial distance vector is n, and n is the number of all clients in the social network graph. The distance between client u and client j is P; if Indicates that the distance between client u and client j is 1.
[0097] The distance vector aggregation module 102 is configured for the client to add a noise value to the distance vector and distribute the result to neighboring clients, and to perform an aggregation operation and update the distance vector of each client.
[0098] In the embodiment of the present invention, the noise value refers to randomly generated data in differential privacy protection, which is used to cover or disrupt original data to prevent sensitive information from being leaked.
[0099] As an embodiment of the present invention, the client adds a noise value to the distance vector and distributes it to neighboring clients, including:
[0100] A noise value is obtained through a probability distribution sampling function, and the noise value is added to the distance vector.
[0101] In the embodiment of the present invention, the probability distribution sampling function is a method for obtaining a noise value. For example, a Laplace noise value may be obtained through a Laplace probability distribution.
[0102] Furthermore, the noise value is obtained through the probability distribution sampling function, including:
[0103] The noise value is obtained using the following probability distribution sampling function:
[0104]
[0105] Where x is the noise value and b is the scale parameter.
[0106] In the embodiment of the present invention, the value of the scale parameter is usually 1.
[0107] Furthermore, the adding the noise value to the distance vector includes:
[0108] The noise value is added to the distance vector using the following formula:
[0109]
[0110] in, is the distance vector of client u after adding the noise value, is the initial distance vector of the client, ∈ is the privacy parameter, R is the distance threshold, and X is the independent random variable parameter.
[0111] Furthermore, updating the distance vector of each client after performing the aggregation operation includes:
[0112] Each client traverses all clients except itself and uses a preset aggregation formula to calculate the distance vector between the client and the clients except itself to obtain the target distance vector;
[0113] The target distance vector is used to update the distance vector between each client and the clients other than itself, and a collection of distance vectors between each client and the clients other than itself is obtained.
[0114] Furthermore, the calculating of the distance vector between the client and the clients other than the client using a preset aggregation formula includes:
[0115] The following aggregation formula is used to calculate the distance between a client and other clients except itself:
[0116]
[0117] Among them, j∈[n] / N(u), is the distance from client u to client j obtained by the k+1th aggregation, is the distance from client i to client j obtained in the kth aggregation, is the distance from client u to client j obtained in the kth aggregation, [n] represents the set {1,2,…,n}, and N(u) represents the set of neighboring clients of client u.
[0118] Exemplarily, in the polymerization, the number of polymerizations k=0.
[0119] For example, the client obtains the minimum distance from the distance vector collection as follows: Client u knows that the distance from its neighbor i to client j is Then its distance to client j can be represented by the minimum distance from neighbors to client j + 1, that is, At the same time, add this distance to the previous distance to client j Compare and update the minimum value.
[0120] In the embodiment of the present invention, the client adds a noise value to the distance vector and distributes it to neighboring clients. This can improve the security of each client in the social network graph and enhance privacy security by adding the noise value.
[0121] The distance query result acquisition module 103 is configured to repeatedly add noise to the distance vector of the client and distribute the noise to neighboring clients, and perform aggregation operations to update the distance vector of each client until a repetition stop condition is met to obtain a distance query result.
[0122] In an embodiment of the present invention, the repetitive stopping condition may be that the distance queried between each client is the shortest distance under the distance threshold. The repetitive stopping condition may also be the number of iterations, where the number of iterations refers to the number of queries corresponding to the distance threshold minus 1, that is, minus the 0th query. The number of iterations is expressed as T-1.
[0123] like Figure 3 , which is a structural diagram of an electronic device for implementing a distance query method based on local differential privacy provided by an embodiment of the present invention.
[0124] The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a distance query method program based on local differential privacy.
[0125] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting the various components of the entire electronic device using various interfaces and lines, and executing or executing programs or modules stored in the memory 11 (for example, executing a distance query method program based on local differential privacy, etc.), as well as calling data stored in the memory 11, to execute various functions of the electronic device and process data.
[0126] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of a distance query method program based on local differential privacy, but can also be used to temporarily store data that has been output or is to be output.
[0127] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.
[0128] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0129] Figure 3 Only the electronic device with components is shown, and it can be understood by those skilled in the art that Figure 3 The structure shown does not limit the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0130] For example, although not shown, the electronic device may further include a power source (such as a battery) for powering various components. Preferably, the power source may be logically connected to the at least one processor 10 via a power management device, thereby implementing functions such as charge management, discharge management, and power consumption management through the power management device. The power source may further include any components such as one or more DC or AC power sources, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, etc. The electronic device may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0131] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0132] The distance query method program based on local differential privacy stored in the memory 11 of the electronic device is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0133] Obtain a social network graph and initialize a distance vector for each client in the social network graph;
[0134] The client adds a noise value to the distance vector and distributes it to neighboring clients, and updates the distance vector of each client after performing an aggregation operation;
[0135] Repeat the steps of adding noise to the distance vector of the client and then distributing it to neighboring clients and performing aggregation operations to update the distance vector of each client until a repetition stop condition is met to obtain a distance query result.
[0136] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.
[0137] Furthermore, if the modules / units integrated into the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0138] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor of an electronic device, the computer program can implement:
[0139] Obtain a social network graph and initialize a distance vector for each client in the social network graph;
[0140] The client adds a noise value to the distance vector and distributes it to neighboring clients, and updates the distance vector of each client after performing an aggregation operation;
[0141] Repeat the steps of adding noise to the distance vector of the client and then distributing it to neighboring clients and performing aggregation operations to update the distance vector of each client until a repetition stop condition is met to obtain a distance query result.
[0142] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical function division, and other division methods may be used in actual implementation.
[0143] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.
[0144] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.
[0145] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0146] Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the claims are intended to be embraced therein. Any reference to a figure in a claim should not be construed as limiting the claim to which it relates.
[0147] Blockchain, as used in this article, refers to a novel application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each block contains information about a batch of online transactions, used to verify the validity of this information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.
[0148] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0149] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. Terms such as "first" and "second" are used to indicate names and do not imply any particular order.
[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A distance query method based on local differential privacy, characterized by: The method comprises: Get the social network graph and initialize the distance vector of each client in the social network graph, where the initial distance vector of client u is expressed as 0 represents the result of the 0th aggregation, The length is n, where n is the number of all clients in the social network graph, Represents the initial distance vector The distance between client u and client j; The client adds a noise value to the distance vector and distributes it to neighboring clients, and performs an aggregation operation to update the distance vector of each client. The updating of the distance vector of each client after the aggregation operation includes: each client traverses clients other than itself, and uses a preset aggregation formula to calculate the distance vector between the client and the clients other than itself to obtain a target distance vector. The calculation of the distance vector between the client and the clients other than itself using the preset aggregation formula includes: using the following aggregation formula to calculate the distance between the client and the clients other than itself: Among them, j∈[n] / N(u), is the distance from client u to client j obtained by the k+1th aggregation, is the distance from client i to client j obtained in the kth aggregation, is the distance from client u to client j obtained in the kth aggregation, [n] represents the set {1, 2, …, n}, and N(u) represents the set of neighboring clients of client u; the distance vector between each client and the clients other than itself is updated using the target distance vector; Repeat the steps of adding noise to the distance vector of the client and then distributing it to neighboring clients and performing aggregation operations to update the distance vector of each client until a repetition stop condition is met to obtain a distance query result.
2. The distance query method based on local differential privacy according to claim 1, characterized in that: Before initializing the distance vector of each client in the social network graph, the method further includes: Each client presets a distance threshold and privacy parameters.
3. The distance query method based on local differential privacy according to claim 1, characterized in that: The client adds a noise value to the distance vector and distributes the noise value to neighboring clients, including: A noise value is obtained through a probability distribution sampling function, and the noise value is added to the distance vector.
4. The distance query method based on local differential privacy according to claim 3, characterized in that: The obtaining of the noise value by using the probability distribution sampling function includes: The noise value is obtained using the following probability distribution sampling function: Where x is the noise value and b is the scale parameter.
5. The distance query method based on local differential privacy according to claim 3, characterized in that: The adding the noise value to the distance vector comprises: The noise value is added to the distance vector using the following formula: in, is the distance vector of client u after adding the noise value, is the initial distance vector of client u, ∈ is the privacy parameter, T is the distance threshold, and X is the independent random variable parameter.
6. A distance query device based on local differential privacy, characterized in that: The device can implement the distance query method based on local differential privacy according to any one of claims 1 to 5, and the device includes: The distance vector initialization module is used to obtain a social network graph and initialize the distance vector of each client in the social network graph, wherein the initialization of the distance vector of each client in the social network graph includes: client u generates its own initial distance vector Where 0 represents the result of the 0th aggregation, the length of the initial distance vector is n, and n is the number of all clients in the social network graph. represents the distance between client u and client j under the initial distance vector; A distance vector aggregation module is configured to cause a client to add a noise value to the distance vector and distribute it to neighboring clients, and to perform an aggregation operation to update the distance vector of each client. The updating of the distance vector of each client after the aggregation operation includes: each client traverses all clients other than itself and calculates the distance vector between the client and the clients other than itself using a preset aggregation formula to obtain a target distance vector. The calculation of the distance vector between the client and the clients other than itself using the preset aggregation formula includes: calculating the distance between the client and the clients other than itself using the following aggregation formula: Among them, j∈[n] / N(u), is the distance from client u to client j obtained by the k+1th aggregation, is the distance from client i to client j obtained in the kth aggregation, is the distance from client u to client j obtained in the kth aggregation, [n] represents the set {1, 2, …, n}, and N(u) represents the set of neighboring clients of client u; the distance vector between each client and the clients other than itself is updated using the target distance vector; The distance query result acquisition module is used to repeatedly add noise to the distance vector of the client and distribute it to neighboring clients and perform aggregation operations to update the distance vector of each client until a repetition stop condition is met to obtain a distance query result.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the distance query method based on local differential privacy according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the distance query method based on local differential privacy is implemented as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Demand privacy protecting method in social network
CN107862219A
Federated learning differential privacy protection method for adding noise based on Rayleigh divergence
CN113127931A