Anonymity query method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202311423164.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-10-30
AI Technical Summary
相关技术的匿踪查询过程中需要进行大量的加解密运算,对服务器的内存和中央处理器等计算资源要求较高
[0040]本公开实施例的匿踪查询方法和装置、电子设备和存储介质,接收到用户查询端发出匿踪查询请求后,根据数据切分策略确定匿踪查询请求在分布式系统中对应的目标节点,将匿踪查询请求发送给目标节点。目标节点根据匿踪查询请求的同态加密密文生成包括有数据集标识的第一多项式和第二多项式后,从目标节点处获取第一多项式和第二多项式并发送给用户查询端。用户查询端对第一多项式进行解密,根据第一多项式解密结果可以判断出匿踪查询请求的查询对象是否存在,并在判断出查询对象存在时对第二多项式的解密处理结果得到查询对象。本公开实施例在实现匿踪查询的情况下,基于分布式系统的目标节点利用同态加密方法生成包括有数据集标识的第一多项式和第二多项式,从而有效降低加解密运算的次数,进而有效降低服务器的内存和中央处理器的资源消耗。
Smart Images

Figure CN117370420B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data security technology, and in particular to a method and apparatus for stealth querying, electronic devices, and storage media. Background Technology
[0002] Anonymous querying refers to a service provided by a data owner as a service provider that allows users to query related data based on an identifier within a dataset. The data querying party owns a specified dataset and wants to find related data, but does not want to disclose the specified dataset to the service provider.
[0003] Anonymous queries for related technologies involve data partitioning during service creation. The querying party obtains query results from different datasets based on the number of partitions, and then aggregates them. This process requires extensive encryption and decryption operations, placing high demands on server memory and CPU resources. Summary of the Invention
[0004] This disclosure provides an anonymous tracking method and apparatus, an electronic device, and a storage medium to solve the above-mentioned problems.
[0005] A first aspect of this disclosure provides an anonymous query method, including:
[0006] In response to receiving an anonymous query request, the target node corresponding to the anonymous query request in the distributed system is determined according to a preset data partitioning strategy;
[0007] Obtain a first polynomial and a second polynomial, which include a dataset identifier, from the target node, wherein the first polynomial and the second polynomial are generated by the target node based on the homomorphic encrypted ciphertext of the stealth query request;
[0008] The first polynomial and the second polynomial are sent to the user query terminal of the anonymous query request, so that the user query terminal can determine whether the query object of the anonymous query request exists based on the decryption processing result of the first polynomial, and if the query object exists, the user query terminal obtains the query object based on the decryption processing result of the second polynomial.
[0009] In some embodiments of this disclosure, determining whether the query object of the stealth query request exists based on the decryption processing result of the first polynomial includes:
[0010] The first polynomial is decrypted using the decryption method corresponding to the homomorphic encrypted ciphertext to obtain the decrypted value.
[0011] If the decrypted value is equal to the preset value, it is determined that the query object exists;
[0012] If the decrypted value is not equal to the preset value, it is determined that the query object does not exist.
[0013] In some embodiments of this disclosure, between the step of determining the target node corresponding to the anonymous query request in the distributed system according to a preset data partitioning strategy in response to receiving the anonymous query request, and the step of obtaining the first polynomial and the second polynomial including the dataset identifier from the target node, the method further includes:
[0014] The target node generates the first polynomial based on the amount of data in its dataset and the stealth query request;
[0015] The target node generates the second polynomial based on the data in its dataset.
[0016] In some embodiments of this disclosure, determining the target node corresponding to the anonymous query request in the distributed system according to a preset data partitioning strategy includes:
[0017] Based on the dataset size of the anonymous query request and the minimum size parameter corresponding to the data partitioning strategy, determine the required number of nodes for the anonymous query request;
[0018] Based on the required number of nodes for the anonymous query request, a head node and at least one service node are determined from the distributed system. The target node includes the head node and the at least one worker node, wherein the head node polls the working status of the at least one service node.
[0019] Data segmentation and preprocessing are performed on the head node and the at least one service node.
[0020] In some embodiments of this disclosure, the data segmentation of the head node and the at least one service node includes:
[0021] Based on the homomorphic encrypted ciphertext and the data segmentation strategy, the first node is mapped to the second node, wherein the first node is one of the head node and the at least one service node.
[0022] In some embodiments of this disclosure, mapping the first node to the second node based on the homomorphic encrypted ciphertext and the data segmentation strategy includes:
[0023] Using the ciphertext encryption method of the homomorphic encryption ciphertext, the dataset identifier of the first node is encrypted to obtain the identifier ciphertext;
[0024] Using the required number of nodes corresponding to the data segmentation strategy, the identifier ciphertext is hashed to obtain a hash value;
[0025] Based on the hash value, the first node is mapped to the second node.
[0026] In some embodiments of this disclosure, the preprocessing includes at least one of data feature filtering and data format adjustment.
[0027] A second aspect of this disclosure provides an anonymity tracking device, comprising:
[0028] The node determination module is used to respond to receiving an anonymous query request and determine the target node corresponding to the anonymous query request in the distributed system according to a preset data partitioning strategy.
[0029] A polynomial acquisition module is used to acquire a first polynomial and a second polynomial, which include a dataset identifier, from the target node, wherein the first polynomial and the second polynomial are generated by the target node based on the homomorphic encrypted ciphertext of the stealth query request;
[0030] The polynomial sending module is used to send the first polynomial and the second polynomial to the user query terminal of the anonymous query request, so that the user query terminal can determine whether the query object of the anonymous query request exists based on the decryption processing result of the first polynomial, and if the query object exists, the user query terminal can obtain the query object based on the decryption processing result of the second polynomial.
[0031] In some embodiments of this disclosure, the user query terminal is used to decrypt the first polynomial using the decryption method corresponding to the homomorphic encrypted ciphertext to obtain a decrypted value; the user query terminal is also used to determine that the query object exists if the decrypted value is equal to a preset value; the user query terminal is also used to determine that the query object does not exist if the decrypted value is not equal to the preset value.
[0032] In some embodiments of this disclosure, the polynomial acquisition module is used by the target node to generate the first polynomial based on the data volume of the target node's dataset and the stealth query request; the polynomial acquisition module is also used by the target node to generate the second polynomial based on the data in the target node's dataset.
[0033] In some embodiments of this disclosure, the node determination module is used to determine the required number of nodes for the anonymous query request based on the dataset size of the anonymous query request and the minimum size parameter corresponding to the data partitioning strategy; the node determination module is also used to determine a head node and at least one service node from the distributed system based on the required number of nodes for the anonymous query request, the target node including the head node and the at least one worker node, wherein the head node polls the working status of the at least one service node; the node determination module is also used to perform data partitioning and preprocessing on the head node and the at least one service node.
[0034] In some embodiments of this disclosure, the node determination module is used to map a first node to a second node based on the homomorphic encrypted ciphertext and the data segmentation strategy, wherein the first node is one of the head node and the at least one service node.
[0035] In some embodiments of this disclosure, the node determination module is used to encrypt the dataset identifier of the first node using the ciphertext encryption method of the homomorphic ciphertext to obtain identifier ciphertext; the node determination module is also used to perform hash calculation on the identifier ciphertext using the required number of nodes corresponding to the data splitting strategy to obtain a hash value; the node determination module is also used to map the first node to the second node based on the hash value.
[0036] A third aspect of this disclosure provides an electronic device, comprising:
[0037] Memory, used to store computer program products;
[0038] A processor is configured to execute a computer program product stored in the memory, and when the computer program product is executed, to implement the method described in the first aspect above.
[0039] A fourth aspect of this disclosure provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method described in the first aspect above.
[0040] The stealth query method, apparatus, electronic device, and storage medium of this disclosure, upon receiving a stealth query request from a user client, determine the target node corresponding to the stealth query request in the distributed system according to a data segmentation strategy, and send the stealth query request to the target node. The target node generates a first polynomial and a second polynomial including a dataset identifier based on the homomorphically encrypted ciphertext of the stealth query request, obtains the first and second polynomials from the target node, and sends them to the user client. The user client decrypts the first polynomial, and based on the decryption result, determines whether the query object of the stealth query request exists. If the query object exists, the user client obtains the query object by processing the decryption result of the second polynomial. In implementing stealth query, this disclosure, based on the target node in the distributed system using a homomorphic encryption method to generate a first and second polynomial including a dataset identifier, effectively reduces the number of encryption and decryption operations, thereby effectively reducing the resource consumption of the server's memory and central processing unit.
[0041] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0042] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0043] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:
[0044] Figure 1 Here is a flowchart of the stealth query method in some embodiments of this disclosure;
[0045] Figure 2 This disclosure provides schematic diagrams of the structure of distributed systems in some examples.
[0046] Figure 3 This is a structural block diagram of the stealth query device in some embodiments of this disclosure;
[0047] Figure 4 This is a structural block diagram of an electronic device in some embodiments of this disclosure. Detailed Implementation
[0048] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0049] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of this disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.
[0050] It should also be understood that in the embodiments disclosed herein, "a plurality of" may refer to two or more, and "at least one" may refer to one, two or more.
[0051] It should also be understood that any component, data or structure mentioned in the embodiments of this disclosure can generally be understood as one or more unless expressly defined or given to the contrary in the context.
[0052] Furthermore, the term "and / or" in this disclosure is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this disclosure generally indicates that the preceding and following related objects have an "or" relationship.
[0053] It should also be understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.
[0054] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0055] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.
[0056] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0057] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0058] The embodiments disclosed herein can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.
[0059] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.
[0060] Figure 1 This is a flowchart of the stealth query method in some embodiments of this disclosure. For example... Figure 1 As shown, the stealth query method includes:
[0061] S1: In response to receiving an anonymous query request, determine the target node in the distributed system corresponding to the anonymous query request according to the preset data partitioning strategy.
[0062] Users send anonymous query requests to the distributed system's server through the user query client. The anonymous query request includes the target object. The anonymous query request is encrypted using a preset anonymous encryption method.
[0063] After receiving an anonymous query request, the server in the distributed system retrieves the data partitioning strategy corresponding to the anonymous query request. Based on this data partitioning strategy, the target node corresponding to the anonymous query request in the distributed system can be determined.
[0064] Optionally, in some embodiments of this disclosure, an anonymous query request is sent to the controller of the distributed system via a user query client. The anonymous query request includes the homomorphic encrypted ciphertext Q of the target object to be queried.
[0065] After receiving an anonymous query request, the controller of the distributed system can perform a hash calculation on the homomorphic encrypted ciphertext Q according to the following formula:
[0066] k = hash(Q) (1)
[0067] Here, hash() is the hash calculation formula. k is the target node, which can include multiple nodes, and the service status of multiple nodes is synchronized through the controller.
[0068] Once the controller of a distributed system identifies the target node, it can send an anonymous query request to the target node.
[0069] S2: Obtain the first and second polynomials, including the dataset identifier, from the target node.
[0070] Among them, the first polynomial and the second polynomial are generated by the target node based on the homomorphic encrypted ciphertext of the stealth query request.
[0071] Upon receiving an anonymous query request, the target node can generate a first polynomial B and a second polynomial L, including the dataset identifier, based on the homomorphically encrypted ciphertext Q and the dataset identifier id stored by the target node, according to a preset polynomial generation rule. The first polynomial B can be used by the user query client to detect whether the query object in the anonymous query request exists. The second polynomial L can be used by the user query client to obtain the query object based on the decryption result of the second polynomial if the query object exists.
[0072] S3: Send the first and second polynomials to the user query client of the anonymous query request so that the user query client can determine whether the query object of the anonymous query request exists based on the decryption result of the first polynomial, and obtain the query object based on the decryption result of the second polynomial if the query object exists.
[0073] After receiving the first polynomial B and the second polynomial L, the user query terminal can decrypt the first polynomial B and determine whether the query object of the anonymous query request exists based on the decryption result of the first polynomial.
[0074] Once the existence of the query object is confirmed, the user can use their private key to decrypt the second polynomial L according to the following formula to obtain the query object:
[0075] data = Dec(L(Enc(id))) (2)
[0076] Where data is the query object, Dec() is the decryption method corresponding to the homomorphic encrypted ciphertext, L(Enc(id)) = Q and L() is the homomorphic encryption method, and L(Enc(id)) is the second polynomial.
[0077] In this embodiment, after receiving an anonymous query request from a user, the controller of the distributed system determines the target node corresponding to the anonymous query request in the distributed system according to the data partitioning strategy and sends the anonymous query request to the target node. The target node generates a first polynomial and a second polynomial, including a dataset identifier, based on the homomorphically encrypted ciphertext of the anonymous query request. It then obtains the first and second polynomials from the target node and sends them to the user. The user encrypts the first polynomial, and based on the decryption result of the first polynomial, it can determine whether the query object of the anonymous query request exists. If the query object exists, the user obtains the query object by decrypting the second polynomial. In implementing anonymous queries, this embodiment utilizes homomorphic encryption to generate a first and second polynomial, including a dataset identifier, based on the target node of the distributed system. This effectively reduces the number of encryption and decryption operations, thereby effectively reducing the resource consumption of the server's memory and central processing unit.
[0078] In some embodiments of this disclosure, between steps S1 and S2, the following may also be included:
[0079] The target node generates the first polynomial based on the amount of data in the target node's dataset and the anonymous query requests.
[0080] The target node can process the homomorphically encrypted dataset (id) i ,data i Processing the id of the homomorphic encrypted ciphertext Q, we obtain the first polynomial B in the following formula:
[0081] B(Q) = (Q-id1)(Q-id2)...(Q-id1)(Q-id2)( ... n (3)
[0082] Where n is the dataset size, that is, the amount of data in the dataset of the target node.
[0083] The target node generates a second polynomial based on the data in its dataset. For example, the second polynomial L can be generated using the following formula:
[0084] L(id i ) = data i (4)
[0085] Where i = 1, 2, ..., n.
[0086] In this embodiment, since the first polynomial is generated based on the data volume of the target node's dataset and the homomorphically encrypted stealth query request, the user query terminal can accurately determine whether the query object of the stealth query request exists in the target node's dataset based on the decrypted value of the first polynomial. When the query object exists in the target node's dataset, the homomorphically encrypted second polynomial generated from the data in the target node's dataset can be decrypted to obtain the query object.
[0087] In some embodiments of this disclosure, determining whether the object of the stealth query request exists based on the decryption result of the first polynomial may specifically include:
[0088] The first polynomial is decrypted using the decryption method corresponding to the homomorphic encrypted ciphertext to obtain the decrypted value. If the decrypted value is equal to the preset value, the query object is determined to exist; if the decrypted value is not equal to the preset value, the query object is determined to not exist.
[0089] The presence of an ID in the target node's dataset can be determined by checking if Dec(B) is 0. Here, Dec(B) is the decrypted value, and 0 is a preset value. When Dec(B) = 0, the query object exists; when Dec(B) is not equal to 0, the query object does not exist.
[0090] In this embodiment, the first polynomial can be decrypted using the decryption method corresponding to the homomorphic encrypted ciphertext to obtain the decrypted value. Then, the existence of the query object can be quickly and accurately determined based on whether the decrypted value is equal to a preset value.
[0091] In some embodiments of this disclosure, step S1 may include:
[0092] S1-1: Determine the required number of nodes for the anonymous query request based on the dataset size of the anonymous query request and the minimum size parameter corresponding to the data partitioning strategy.
[0093] The required number of nodes N for an anonymous query request can be calculated using the following formula:
[0094]
[0095] Where D is the minimum size parameter corresponding to the data splitting strategy.
[0096] S1-2: Based on the required number of nodes for the anonymous query request, determine the head node and at least one service node from the distributed system. The target nodes include the head node and at least one worker node.
[0097] Figure 2 This disclosure provides schematic diagrams of the structure of distributed systems as examples. For instance... Figure 2As shown, the controller of the distributed system selects the node containing the required data as the target node based on the number of nodes needed for the anonymous query request. The controller starts all nodes in the target node and assigns them sequence numbers i = 1, 2, ..., N. The node with sequence number 1 is the head node, and the remaining nodes are worker nodes. Each node synchronizes its service status through the controller.
[0098] S1-3: Perform data splitting and preprocessing on the head node and at least one service node.
[0099] Data can be segmented according to a preset data segmentation strategy for each of the head node and at least one service node, and preprocessed according to a preset preprocessing strategy.
[0100] In this embodiment, the number of nodes required for the anonymous query request can be quickly and accurately determined based on the dataset size of the anonymous query request and the minimum size parameter corresponding to the data partitioning strategy. Then, based on the required number of nodes, the corresponding head node and service node can be selected from the distributed system for data partitioning and preprocessing, which helps to improve the efficiency of anonymous queries.
[0101] In some embodiments of this disclosure, data segmentation of the head node and at least one service node specifically includes: mapping a first node to a second node based on homomorphic ciphertext and a data segmentation strategy, wherein the first node is one of the head node and at least one service node. For example, the encryption method of the dataset can be used with homomorphic ciphertext, combined with the dataset possessed by each node after data segmentation in the data segmentation strategy, to map the first node to the second node.
[0102] In this embodiment, based on the homomorphic encrypted ciphertext and data segmentation strategy, the first node of the head node and at least one service node can be quickly and accurately mapped to the second node.
[0103] In some embodiments of this disclosure, mapping a first node to a second node based on homomorphic ciphertext and a data segmentation strategy specifically includes: encrypting the dataset identifier of the first node using the ciphertext encryption method of homomorphic ciphertext to obtain identifier ciphertext; performing hash calculation on the identifier ciphertext using the required number of nodes corresponding to the data segmentation strategy to obtain a hash value; and mapping the first node to the second node based on the hash value.
[0104] In one example disclosed herein, the hash value can be calculated using the following formula:
[0105] j = hash(Enc(id)) mod N+1 (6)
[0106] Where j is the second node, Enc(id) is the identifier ciphertext, hash(Enc(id)) is the hash value obtained by hashing the identifier ciphertext, and N is the number of nodes required.
[0107] In this embodiment, the dataset identifier of the first node is encrypted using the homomorphic encryption ciphertext encryption method to obtain the identifier ciphertext. The identifier ciphertext is then hashed using the required number of nodes corresponding to the data splitting strategy to obtain the hash value. This hash value can then be used to effectively map the first node to the second node.
[0108] In some embodiments of this disclosure, preprocessing includes at least one of data feature filtering and data format adjustment. Data feature filtering may include deleting unwanted data attribute values, such as certain data attributes in a data entry, based on query conditions of an anonymous query method. Data format adjustment may include normalization processing and other data format modification methods.
[0109] In this embodiment, the accuracy and efficiency of cloaking can be effectively improved by filtering data features and adjusting data format.
[0110] Figure 3 This is a structural block diagram of the stealth detection device in some embodiments of this disclosure. For example... Figure 3 As shown, the stealth detection device includes:
[0111] The node determination module 100 is used to respond to the received stealth query request and determine the target node in the distributed system corresponding to the stealth query request according to the preset data partitioning strategy.
[0112] The polynomial acquisition module 200 is used to acquire a first polynomial and a second polynomial, which include a dataset identifier, from the target node. The first polynomial and the second polynomial are generated by the target node based on the homomorphic encrypted ciphertext of the stealth query request.
[0113] The polynomial sending module 300 is used to send a first polynomial and a second polynomial to the user query terminal of the anonymous query request, so that the user query terminal can determine whether the query object of the anonymous query request exists based on the decryption processing result of the first polynomial, and obtain the query object based on the decryption processing result of the second polynomial if the query object exists.
[0114] In some embodiments of this disclosure, the user query terminal is used to decrypt the first polynomial using the decryption method corresponding to the homomorphic encrypted ciphertext to obtain a decrypted value; the user query terminal is also used to determine that the query object exists if the decrypted value is equal to a preset value; the user query terminal is also used to determine that the query object does not exist if the decrypted value is not equal to the preset value.
[0115] In some embodiments of this disclosure, the polynomial acquisition module 200 is used by the target node to generate a first polynomial based on the data volume of the target node's dataset and the stealth query request; the polynomial acquisition module 200 is also used by the target node to generate a second polynomial based on the data in the target node's dataset.
[0116] In some embodiments of this disclosure, the node determination module 100 is used to determine the required number of nodes for the anonymous query request based on the dataset size of the anonymous query request and the minimum size parameter corresponding to the data partitioning strategy; the node determination module 100 is also used to determine a head node and at least one service node from the distributed system based on the required number of nodes for the anonymous query request, wherein the target node includes a head node and at least one worker node, wherein the head node polls the working status of the at least one service node; the node determination module 100 is also used to perform data partitioning and preprocessing on the head node and at least one service node.
[0117] In some embodiments of this disclosure, the node determination module 100 is used to map a first node to a second node based on homomorphic encrypted ciphertext and a data segmentation strategy, wherein the first node is one of the head node and at least one service node.
[0118] In some embodiments of this disclosure, the node determination module 100 is used to encrypt the dataset identifier of the first node using a homomorphic encryption ciphertext encryption method to obtain identifier ciphertext; the node determination module 100 is also used to perform hash calculation on the identifier ciphertext using the required number of nodes corresponding to the data splitting strategy to obtain a hash value; the node determination module 100 is also used to map the first node to the second node based on the hash value.
[0119] In some embodiments of this disclosure, preprocessing includes at least one of data feature filtering and data format adjustment. Data feature filtering may include deleting unwanted data attribute values, such as certain data attributes in a data entry, based on query conditions of an anonymous query method. Data format adjustment may include normalization processing and other data format modification methods.
[0120] It should be noted that the specific implementation of the stealth query device in this disclosure is similar to the specific implementation of the stealth query method in this disclosure. For details, please refer to the description of the stealth query method section. In order to reduce redundancy, it will not be described again.
[0121] In addition, this disclosure also provides an electronic device, including:
[0122] Memory, used to store computer programs;
[0123] A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the stealth query method described in any of the above embodiments of the present disclosure.
[0124] Below, for reference Figure 4 To describe an electronic device according to embodiments of this disclosure. For example... Figure 4 As shown, the electronic device includes one or more processors and memory.
[0125] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.
[0126] The memory can store one or more computer program products, and the memory can include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program products can be stored on the computer-readable storage medium, and the processor can run the computer program products to implement the stealth query methods of the various embodiments of this disclosure described above and / or other desired functions.
[0127] In one example, the electronic device may also include input devices and output devices, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0128] In addition, the input device may also include, for example, a keyboard, a mouse, etc.
[0129] This output device can output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0130] Of course, for the sake of simplicity, Figure 4 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.
[0131] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps of the stealth query methods according to various embodiments of this disclosure as described in the foregoing sections of this specification.
[0132] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0133] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the stealth query methods according to various embodiments of this disclosure as described in the foregoing portion of this specification.
[0134] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0135] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0136] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0137] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0138] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.
[0139] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions to this disclosure.
[0140] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0141] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A method for anonymous querying, characterized in that, include: In response to receiving an anonymous query request, the target node corresponding to the anonymous query request in the distributed system is determined according to a preset data partitioning strategy; Obtain a first polynomial and a second polynomial, which include a dataset identifier, from the target node. The first polynomial and the second polynomial are generated by the target node based on the homomorphically encrypted ciphertext of the stealth query request. The first polynomial is obtained by processing the homomorphically encrypted dataset identifier, and the second polynomial is obtained by homomorphically encrypting the data in the dataset of the target node. The first polynomial and the second polynomial are sent to the user query terminal of the stealth query request so that the user query terminal can determine whether the query object of the stealth query request exists based on the decryption processing result of the first polynomial, and if the query object exists, the user query terminal obtains the query object based on the decryption processing result of the second polynomial. The step of determining the target node corresponding to the anonymous query request in the distributed system according to a preset data partitioning strategy includes: Based on the dataset size of the anonymous query request and the minimum size parameter corresponding to the data partitioning strategy, determine the required number of nodes for the anonymous query request; Based on the required number of nodes for the anonymous query request, a head node and at least one service node are determined from the distributed system. The target node includes the head node and the at least one service node, wherein the head node polls the working status of the at least one service node. Data segmentation and preprocessing are performed on the head node and the at least one service node; The data segmentation of the head node and the at least one service node includes: Based on the homomorphic encrypted ciphertext and the data segmentation strategy, the first node is mapped to the second node, wherein the first node is one of the head node and the at least one service node.
2. The method according to claim 1, characterized in that, Determining whether the query object of the stealth query request exists based on the decryption processing result of the first polynomial includes: The first polynomial is decrypted using the decryption method corresponding to the homomorphic encrypted ciphertext to obtain the decrypted value. If the decrypted value is equal to the preset value, it is determined that the query object exists; If the decrypted value is not equal to the preset value, it is determined that the query object does not exist.
3. The method according to claim 1, characterized in that, Between the steps of responding to a received anonymous query request and determining the target node corresponding to the anonymous query request in the distributed system according to a preset data partitioning strategy, and the step of obtaining a first polynomial and a second polynomial including a dataset identifier from the target node, the method further includes: The target node generates the first polynomial based on the amount of data in its dataset and the stealth query request; The target node generates the second polynomial based on the data in its dataset.
4. The method according to claim 1, characterized in that, The step of mapping the first node to the second node based on the homomorphic encrypted ciphertext and the data segmentation strategy includes: Using the ciphertext encryption method of the homomorphic encryption ciphertext, the dataset identifier of the first node is encrypted to obtain the identifier ciphertext; Using the required number of nodes corresponding to the data segmentation strategy, the identifier ciphertext is hashed to obtain a hash value; Based on the hash value, the first node is mapped to the second node.
5. The method according to claim 1, characterized in that, The preprocessing includes at least one of data feature filtering and data format adjustment.
6. An anonymous tracking device, characterized in that, include: A node determination module is used to, in response to receiving an anonymous query request, determine the target node corresponding to the anonymous query request in the distributed system according to a preset data partitioning strategy; the node determination module is further used to: determine the required number of nodes for the anonymous query request based on the dataset size of the anonymous query request and the minimum size parameter corresponding to the data partitioning strategy; determine a head node and at least one service node from the distributed system based on the required number of nodes for the anonymous query request, wherein the target node includes the head node and the at least one service node, wherein the head node polls the working status of the at least one service node; perform data partitioning and preprocessing on the head node and the at least one service node; the node determination module is also used to: map a first node to a second node based on the homomorphic encrypted ciphertext of the anonymous query request and the data partitioning strategy, wherein the first node is one of the head node and the at least one service node; The polynomial acquisition module is used to acquire a first polynomial and a second polynomial, which include a dataset identifier, from the target node. The first polynomial and the second polynomial are generated by the target node based on the homomorphic encrypted ciphertext. The first polynomial is obtained by processing the homomorphically encrypted dataset identifier, and the second polynomial is obtained by homomorphically encrypting the data in the dataset of the target node. The polynomial sending module is used to send the first polynomial and the second polynomial to the user query terminal of the anonymous query request, so that the user query terminal can determine whether the query object of the anonymous query request exists based on the decryption processing result of the first polynomial, and if the query object exists, the user query terminal can obtain the query object based on the decryption processing result of the second polynomial.
7. An electronic device, characterized in that, include: Memory, used to store computer program products; A processor is configured to execute a computer program product stored in the memory, wherein, when the computer program product is executed, it implements the method described in any one of claims 1-5.
8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1-5.