Quantile search method, device and system, electronic equipment and computer program product
By using the secure multi-party computing protocol in the multi-party joint statistical scenario, the joint quantile search sorting index information is generated and the required privacy data is read, which solves the problem that the security compliance joint quantile search cannot be achieved in the multi-party joint statistical scenario, and efficient and secure feature data screening is achieved.
Patent Information
- Application Number
- CN202411723281.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-07
AI Technical Summary
In the multi-party joint statistical scenario, the existing technology cannot effectively realize joint quantile search for safety and compliance, and the need to filter feature data has not been met.
By using the first data node and the second data node as both nodes of the secure multi-party computing protocol, the numerical relationship between their local privacy data is compared, the joint quantile search sorting index information is generated, and the required privacy data is read from the local privacy data according to the index.
It realizes security compliance joint quantile search in multi-party joint statistical scenarios, reduces the risks of third-party intermediate nodes, simplifies the quantile search process, improves efficiency, and effectively protects the privacy of sensitive data.
Smart Images

Figure CN119577859A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a bitwise search method, device, system, electronic device, non-volatile storage medium and computer program product. Background Art
[0002] Privacy computing is a collection of technologies that implement data analysis and computing while protecting the data from external disclosure, so as to make the data available but invisible. It can transform and release the value of data while fully protecting data and privacy security. Currently, related technologies cannot solve the needs of users to implement joint quantile search to filter feature data in multi-party joint statistical scenarios.
[0003] In view of this, meeting the needs of users to achieve safe and compliant joint quantile search is a technical problem that people in this field need to solve.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The present application provides a quantile search method, device, system, electronic device, non-volatile storage medium and computer program product, which can realize safe and compliant joint quantile search for required feature data in a multi-party joint statistical scenario.
[0006] In order to solve the above technical problems, this application provides the following technical solutions:
[0007] On one hand, the present application provides a quantile search method, comprising:
[0008] The first data node and the second data node are used as both nodes of the secure multi-party computing protocol, and the joint quantile search sorting index information is generated by comparing the numerical relationship between the first local private data of the first data node and the second local private data of the second data node; the joint quantile search sorting index information is used to represent the numerical relationship between each numerical value of the first local private data and the second local private data;
[0009] Determine an index in the joint quantile search sorting index information corresponding to the quantile search parameter, and read the required private data from the first local private data and / or the second local private data according to the index.
[0010] Exemplarily, before comparing the numerical relationship between the first local private data of the first data node and the second local private data of the second data node, the method further includes:
[0011] Based on the target characteristic attribute corresponding to the joint quantile search requirement, the first data node sorts the data belonging to the target characteristic attribute in the first local privacy data, and the second data node sorts the data belonging to the target characteristic attribute in the second local privacy data.
[0012] Exemplarily, the method of using the first data node and the second data node as both parties' nodes of a secure multi-party computing protocol includes:
[0013] If the number of first data rows of the first local privacy data is less than the number of second data rows of the second local privacy data, the first data node is used as a collaborator and the second data node is used as an initiator to form two nodes of a secure multi-party computing protocol.
[0014] Exemplarily, determining that the quantile search parameter corresponds to an index in the joint quantile search sort index information includes:
[0015] If the quantile search demander and the generator of the joint quantile search sorting index information belong to the same data node, a joint sorting data queue is generated according to the joint quantile search sorting index information and the local private data; the joint sorting data queue is generated after replacing the corresponding index value with the local private data;
[0016] A target index position of the quantile in the joint quantile search sorting index information is calculated according to the quantile search parameter, and corresponding private data is read from the joint sorting data queue according to the target index position.
[0017] Exemplarily, determining that the quantile search parameter corresponds to an index in the joint quantile search sort index information includes:
[0018] Calculate the sum of the total number of first data belonging to the target characteristic attribute corresponding to the joint quantile search requirement in the first local private data and the total number of second data belonging to the target characteristic attribute in the second local private data;
[0019] An index position of the quantile in the joint quantile search sorting index information is determined according to the quantile search parameter and the data sum.
[0020] Exemplarily, the generating the joint quantile search sorting index information by comparing the numerical relationship between the first local private data of the first data node and the second local private data of the second data node includes:
[0021] If the number of first data rows of the first local private data is less than the number of second data rows of the second local private data, then select a data from the first target data group of the target characteristic attribute corresponding to the joint quantile search requirement from the first local private data as the target data, and compare the numerical value relationship between the target data and the data to be compared in the second target data group of the target characteristic attribute in the second local private data; update the position of the target data, the first target data group and the second target data group in the index array to be sorted according to the numerical value comparison result; the index array to be sorted is the index position corresponding to the data of the first target data group and the second target data group;
[0022] Select one data from the first target data group as the target data again, compare the numerical value relationships between the target data and each data to be compared in the second target data group, and update the index array to be sorted again according to the numerical value comparison result, repeat the above process until each data of the first target data is used as the target data to perform the above operation, and use the final index array to be sorted as the joint quantile search sorting index information.
[0023] On the other hand, the present application provides a location search device, comprising:
[0024] An index generation module, configured to use a first data node and a second data node as two nodes of a secure multi-party computing protocol, and to generate joint quantile search sorting index information by comparing the numerical relationship between the first local private data of the first data node and the second local private data of the second data node; the joint quantile search sorting index information is used to represent the numerical relationship between the numerical values of the first local private data and the second local private data;
[0025] A quantile search module is used to determine the index of the quantile search parameter corresponding to the joint quantile search sort index information, and read the required privacy data from the first local privacy data and / or the second local privacy data according to the index.
[0026] The present application also provides an electronic device, comprising a processor, wherein the processor is configured to implement the steps of the quantile search method as described in any of the preceding items when executing a computer program stored in a memory.
[0027] The present application also provides a non-volatile storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the quantile search method described in any of the preceding items are implemented.
[0028] The present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the quantile search method as described in any of the preceding items.
[0029] Finally, the present application also provides a quantile search system, including a first data node and a second data node;
[0030] The first data node includes a first memory and a first processor, the first memory stores first local private data; the second data node includes a second memory and a second processor, the second memory stores second local private data;
[0031] The first processor is used to execute the computer program stored in the first memory to implement the steps performed by the first data node in the quantile search method as described in any of the previous items; the second processor is used to execute the computer program stored in the second memory to implement the steps performed by the second data node in the quantile search method as described in any of the previous items.
[0032] The advantage of the technical solution provided by the present application is that, in the scenario of multi-party joint statistical joint quantile search to screen feature data, only the two nodes of the data owner complete the joint statistical quantile search under the privacy calculation, without involving the assistance of third-party intermediate nodes, effectively reducing the risk of insecurity of third-party intermediate nodes, and without the need for the complex process of third-party nodes proving their innocence, not only realizing safe and compliant joint quantile search, but also effectively simplifying the quantile search process, which is conducive to improving the efficiency of quantile search. Furthermore, under the protection of the secure multi-party computing protocol, both parties of the data perform privacy calculations, effectively protecting the privacy content such as sensitive data and feature attributes, avoiding the exposure of feature data in the form of plain text calculations, causing security, compliance and other privacy leakage problems, further improving the security of privacy data, and efficiently and accurately performing privacy comparison operations without leaking security and privacy, effectively improving the efficiency of quantile search.
[0033] In addition, the present application also provides corresponding implementation devices, systems, electronic devices, non-volatile storage media and computer program products for the quantile search method, which further makes the method more practical, and the devices, systems, electronic devices, non-volatile storage media and computer program products have corresponding advantages.
[0034] The technical features mentioned above, the technical features to be mentioned below, and the technical features shown separately in the drawings can be combined with each other arbitrarily, as long as the combined technical features are not contradictory. All feasible feature combinations are technical contents clearly recorded in this application. Any of the multiple sub-features contained in the same sentence can be applied independently, and does not have to be applied together with other sub-features.
[0035] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0037] Figure 1 A flowchart of a quantile search method provided in this application;
[0038] Figure 2 A flowchart of another quantile search method provided in this application;
[0039] Figure 3 A structural diagram of a specific implementation of the position search device provided in this application;
[0040] Figure 4 A structural diagram of a specific implementation of the electronic device provided by this application;
[0041] Figure 5 A structural diagram of a specific implementation of the quantile search system provided in this application;
[0042] Figure 6 A schematic diagram of the processing flow between the data nodes of a location-based search system for an exemplary application scenario provided in this application. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Among them, the terms "first", "second", etc. in the specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations of the two are intended to cover non-exclusive inclusions. The term "exemplary" means "used as an example, embodiment or illustrative". Any embodiment described here as "exemplary" is not necessarily interpreted as being superior or better than other embodiments.
[0044] With the development of privacy computing technology, as an indispensable part of enabling data circulation, it will become the underlying infrastructure of data circulation services, creating conditions for data circulation and protecting data privacy and security. Privacy computing, such as federated learning, secure multi-party computing, and trusted computing, is a technology or platform for joint computing by two or more participants. The participants conduct joint machine learning and joint analysis through collaboration without exposing the original data. Under the privacy computing framework, the data of the participants will not be exported locally in plain text, and multi-source data cross-domain cooperation can be achieved while protecting data security, which can solve the problem of data protection and integrated application.
[0045] At present, when implementing privacy computing, related technologies often only focus on the richness of application scenarios of machine learning algorithms in federated learning, ease of use in business directions, and optimization of overall performance. Machine learning algorithms include logistic regression algorithms, tree model algorithms, neural network algorithms, and large models that integrate current popular models in horizontal and vertical federated learning. In addition, related technologies use paillier (the name of homomorphic encryption algorithm) homomorphic encryption or MPC (Secure Multi-Party Computation) technology in joint statistics to achieve joint statistical computing. In addition, privacy computing in related technologies is usually used to solve security computing problems in multiple scenarios such as the Internet of Things and finance, such as the determination of quantiles and prediction methods. However, such methods require certain assumptions about security during implementation, such as trusting the central node and treating it as a trusted central node. The application has certain limitations, and there is also the possibility that the trusted central node becomes a malicious node. Some of these methods are still local plaintext computing methods, and there are data security and privacy leakage issues in multi-party data joint computing. It can be seen from this that relevant technologies only focus on the implementation and application of federated learning algorithms. However, for federated learning algorithms, privacy computing joint statistics are important and necessary. Without privacy computing joint statistics, joint quantile search operations cannot be performed before training the federated learning algorithm, and feature attribute data with low importance or invalid cannot be eliminated, thereby improving the computational efficiency of model training and the accuracy of model expression.
[0046] In view of this, the present invention, in the scenario of joint statistics for privacy computing, starts from the ease of use, efficiency, compliance, and security of the implementation of joint statistics for privacy computing, and constructs a safe, compliant, efficient, and easy-to-use method suitable for the joint quantile search demand scenario of privacy computing, thereby realizing the safe and compliant joint quantile search for the required feature data. After introducing the technical solution of the present application, various non-limiting implementation methods of the present application are described in detail below. In order to better illustrate the present application, numerous specific details are given in the specific implementation methods below. Those skilled in the art should understand that the present application can also be implemented without these specific details. In some other examples, the methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.
[0047] First see Figure 1 , Figure 1 A flowchart of a quantile search method provided in this application, which may include the following contents:
[0048] S101: The first data node and the second data node are used as the two-party nodes of the secure multi-party computing protocol, and the joint quantile search sorting index information is generated by comparing the numerical relationship between the first local private data of the first data node and the second local private data of the second data node.
[0049] Among them, the present invention is applicable to the first data node and the second data node in a privacy computing scenario with no third party involved, where the first data node and the second data node perform a joint quantile search for required feature data. The privacy computing scenario can be, for example, federated learning, secure multi-party computing, and trusted computing. The required feature data can be the local data of the first data node, which is defined as the first local privacy data for the convenience of description, or the local data of the second data node, which is defined as the second local privacy data for the convenience of description. In order to ensure the security of the entire joint quantile search process, the present invention places the first data node and the second data node under the protection of the secure multi-party computing protocol, that is, the first data node and the second data node are the two-party computing nodes of the secure multi-party computing protocol. The numerical relationship refers to the comparison of the size relationship between the first local privacy data and the second local privacy data. The joint quantile search sorting index information is used to represent the numerical size relationship between the various values of the first local privacy data and the second local privacy data. In other words, the joint quantile search sorting index information can reflect the size order between the various data contained in the first local privacy data and the second local privacy data.
[0050] S102: Determine an index in the joint quantile search sorting index information corresponding to the quantile search parameter, and read required private data from the first local private data and / or the second local private data according to the index.
[0051] In this embodiment, the quantile search parameter is a parameter given by the joint quantile search demander, the joint quantile search demander can be the first data node or the second data node, the joint quantile search sorting index information can be generated by the first data node or the second data node, if the joint quantile search sorting index information and the joint quantile search demander are not the same node, then the joint quantile search demander can send the quantile search parameter to the owner of the joint quantile search sorting index information, of course, the owner of the joint quantile search sorting index information can send the joint quantile search sorting index information to the joint quantile search demander, in short, the data node that owns the quantile search parameter and the joint quantile search sorting index information determines the index position corresponding to the quantile search parameter in the joint quantile search sorting index information. When the index position is determined, the location of the data can be determined according to the index position, that is, whether the object of the joint quantile search is the content of the first local private data or the content of the second local private data, and then the party that owns the index position and the index corresponding data reads the corresponding data, of course, if the index position and the index corresponding data are not owned by one party at the same time, one of the information can be sent to the other information owner according to actual needs. If the reader is not the joint quantile search demander, the read data will be sent to the joint quantile search demander. If the reader is the joint quantile search demander, no sending operation is required.
[0052] In the technical solution provided in this application, for the scenario of multi-party joint statistical joint quantile search to screen feature data, only the two nodes of the data owner complete the joint statistical quantile search under the privacy calculation, without involving the assistance of third-party intermediate nodes, effectively reducing the risk of insecurity of third-party intermediate nodes, and without the need for the complex process of third-party nodes proving their innocence, not only realizing safe and compliant joint quantile search, but also effectively simplifying the quantile search process, which is conducive to improving the efficiency of quantile search. Furthermore, under the protection of the secure multi-party computing protocol, both parties of the data perform privacy calculations, effectively protecting the privacy content such as sensitive data and feature attributes, avoiding the exposure of feature data in the form of plain text calculations, causing security, compliance and other privacy leakage problems, further improving the security of privacy data, and efficiently and accurately performing privacy comparison operations without leaking security and privacy, effectively improving the efficiency of quantile search.
[0053] In order to further improve the efficiency of the quantile search, based on the above embodiment, the present invention may also sort the local data before performing the quantile search operation, which may include the following contents:
[0054] Based on the target characteristic attribute corresponding to the joint quantile search requirement, the first data node sorts the data belonging to the target characteristic attribute in the first local private data, and the second data node sorts the data belonging to the target characteristic attribute in the second local private data.
[0055] In this embodiment, if Figure 2 As shown, the target characteristic attribute is a characteristic attribute for quantile search, the first data node sorts its local data, and the second data node sorts its local data. The sorting can be from small to large or from large to small, which does not affect the implementation of the present invention. Exemplarily, this embodiment can sort the local data in order from small to large, and the sorting method can adopt any sorting method recorded in the relevant technology, such as pre-storing a computer program with a sorting function or using a sorting function such as a sort function, which does not affect the implementation of the present invention. For example, the first data node locally represents the target characteristic attribute data that requires two parties to perform a joint quantile search in the form of a data column, and the target characteristic attribute is the mth characteristic attribute. The data belonging to the target characteristic attribute in the first local privacy data are sorted in order from small to large to generate the following X matrix:
[0056] .
[0057] in, The superscript m represents the mth characteristic attribute of the first local privacy data, and the subscript n represents the nth characteristic attribute value of the first local privacy data.
[0058] The second data node locally represents the target feature attribute data that requires two parties to perform joint quantile search in the form of data columns, and sorts the data belonging to the target feature attribute in the second local private data from small to large to generate the following Y matrix:
[0059] .
[0060] in, The superscript m represents the mth characteristic attribute of the second local private data, and the subscript k represents the kth characteristic attribute value of the second local private data.
[0061] As can be seen from the above, in this embodiment, before performing privacy comparison calculation on local private data, the data owner will first sort its local private data, so that the size relationship between the data can be quickly located in the subsequent privacy comparison calculation, effectively improving the efficiency of quantile search.
[0062] Since the present application does not involve a third party, the execution subject of the above process can be either the first data node or the second data node, which does not affect the implementation of the present invention. In order to further reduce the computing resources required for the joint quantile search, based on the above embodiment, the present invention also provides the following content:
[0063] If the number of first data rows of the first local private data is less than the number of second data rows of the second local private data, the first data node is used as a collaborator and the second data node is used as an initiator to form two nodes of a secure multi-party computing protocol.
[0064] In this embodiment, the first data node and the second data node may also perform statistics on the amount of their respective local private data. When the local private data is represented in a data column format, the amount of data may be determined by counting the number of rows. Figure 2 As shown, the two nodes each calculate the number of data rows for their sorted local data sets, the first data node calculates the size of the local data rows as X_count, and the second data node calculates the size of the local data rows as Y_count. In this embodiment, the first data node can be pre-specified to perform data size comparison, that is, the second data node sends the size of the data rows Y_count to the first data node, and the first data node obtains the size of the other party's data rows Y_count and compares it with the size of the local data rows X_count to determine which party's data has a larger number of data rows. According to the comparison result of the number of data rows, the first data node and the second data node use the party with a smaller number of data rows as the initiator of the privacy comparison, and the party with a larger number of data rows as the collaborator. Then the party with a smaller number of data rows and the party with a larger number of data rows form two computing nodes of the secure multi-party computing protocol, thereby ensuring that the data owners can safely and efficiently perform privacy comparison calculations. Further, in order to improve the security of subsequent privacy comparison calculations, the first data node and the second data node are initialized using the cheetah secure multi-party computing protocol and form two computing nodes for secure multi-party computing.
[0065] As can be seen from the above, in the process of privacy computing combined with statistical quantile search operation in this embodiment, the first data node and the second data node need to perform privacy comparison operation on the data of both parties. By comparing the number of rows of data of both parties, the party with the smaller number of rows of data is selected as the initiator, and a certain sorted characteristic attribute column data of the initiator is used for iteration. Each iteration is compared with all the data of the collaborating parties under the secure multi-party computing protocol for privacy, so as to achieve the minimum number of iterations and the minimum communication overhead, improve the overall communication efficiency, and at the same time ensure data security and avoid privacy leakage. Furthermore, in the operation scenario of privacy computing combined with statistical quantile search, the high-performance protocol cheetah can be used, so that in the privacy comparison operation scenario of quantile search, data privacy and security can be guaranteed, and the efficiency of privacy comparison can be greatly improved, making the overall process safe, compliant and efficient.
[0066] In the above embodiment, there is no limitation on how to perform the privacy data comparison. Based on the above embodiment, the present invention further provides an exemplary privacy data comparison implementation method, which may include the following contents:
[0067] If the number of first data rows of the first local privacy data is less than the number of second data rows of the second local privacy data, then select a data from the first target data group belonging to the target characteristic attribute corresponding to the joint quantile search requirement from the first local privacy data as the target data, and compare the numerical size relationship between the target data and each data to be compared in the second target data group belonging to the target characteristic attribute in the second local privacy data; update the position of the target data, the first target data group and the second target data group in the index array to be sorted according to the numerical size comparison result; the index array to be sorted is the index position corresponding to each data of the first target data group and the second target data group; select the second value from the first target data group as the target data, compare the numerical size relationship between the target data and each data to be compared in the second target data group, and update the index array to be sorted again according to the numerical size comparison result, repeat the above process until each data of the first target data is used as the target data to perform the above operation, and use the final index array to be sorted as the sorting index information for the joint quantile search.
[0068] In this embodiment, in order to improve the efficiency of privacy comparison operations and reduce communication overhead while ensuring privacy in a secure multi-party computing protocol, the minimum number of iterations and the minimum communication overhead are ensured. According to the comparison result of the data volume of the first data node and the second data node, the party with less data volume is used as the execution subject to perform privacy comparison operations. Exemplarily, this embodiment uses data columns to represent local privacy data, and the data volume can be represented by the number of data rows. The first value of a sorted feature attribute column of the current party is compared with all values of the corresponding feature attribute column of the party with a larger number of data rows. Assuming that the party with a smaller number of data rows is the first data node, and the party with a larger number of data rows is the second data node, the feature attribute column that needs to be jointly searched is the mth column, then the first round of privacy comparison is: < ,Compare If the comparison result is larger, true is returned, otherwise false is returned. The comparison result is based on the position and number of true and false values [false, false, ...false, ...true]. How many numbers in the array are greater than The value is less than or equal to Since the mth columns of the first data node and the second data node have been sorted locally from small to large, we can judge based on the position and number of true and false At the position of n+k array size. For example, there are g false values returned, 0<=g<=k, then There are g less than or equal to , kg is larger than that, then the value of the first g position in the array of size n+k is ,Then Follow closely After that, belong The position area after that, but the specific position cannot be determined, that is, the position determined in the n+k array is: [ , ], where the box " " indicates an empty position in the array that has not been filled with data; at this point, the first round of iteration ends. After the first round of iteration ends, the second round of iteration is performed, using the second value of the mth column of the first data node data The privacy comparison is performed with all the values of the mth column of the second data node data in turn, so the second round of privacy comparison is: < ,Compare If the comparison result is larger, true is returned, otherwise false is returned. The comparison result is based on the position and number of true and false values [false, false, ...false, ...true] How many numbers in the array are greater than The value is less than or equal to For example, if there are h false values returned, and 0<=h<=k, then there are h values in k that are less than or equal to , kh ratio Large, due to the position and The positions are already sorted, so we only need to find out hg. This part of the data represents the data that needs to be sorted. Afterwards and Previous data, , ..., belong The position area after that, but the specific position cannot be determined; that is, the determined order in the a+b array is: [ ]; At this point, the second round of iteration ends. After the second round of iteration ends, Three rounds of iterations were carried out; after the third round of iterations, Carry out the fourth round of iteration; repeat the above process until the end of the nth round of iteration Finally, each value of the mth column of the first local privacy data of the first data node is privacy-compared with all values of the mth column of the second local privacy data of the second data node, and the joint quantile search sorting index information represented in array form is generated, that is, the joint quantile search sorting index array. In order to facilitate subsequent search efficiency, it can be returned to the party that needs to perform quantile search.
[0069] From the above, it can be seen that in the process of privacy computing and joint statistical quantile search operation in this embodiment, the first data node and the second data node need to perform privacy comparison operation on the data of both parties. By comparing the number of data rows of both parties, the party with the smaller number of data rows is selected as the initiator, and each data of the initiator is used for iteration. Each iteration is compared with all the data of the collaborating parties for privacy under the secure multi-party computing protocol to achieve the minimum number of iterations and the minimum communication overhead, thereby improving the overall communication efficiency, while ensuring data security and avoiding privacy leakage.
[0070] In the above embodiment, there is no limitation on how to perform the privacy data comparison. Based on the above embodiment, the present invention further provides an exemplary privacy data comparison implementation method, which may include the following contents:
[0071] If the party demanding quantile search and the party generating the joint quantile search sorting index information belong to the same data node, a joint sorting data queue is generated based on the joint quantile search sorting index information and local privacy data; the joint sorting data queue is generated after replacing the corresponding index value with the local privacy data; the target index position of the quantile in the joint quantile search sorting index information is calculated based on the quantile search parameters, and the corresponding privacy data is read from the joint sorting data queue based on the target index position.
[0072] Among them, the quantile search parameter refers to the parameter used when searching for quantiles, which is usually used to determine the value of a specific position in a data set. The quantile is the key value that divides the data set into several equal parts. Common quantiles include quartiles, such as 25%, 50%, and 75% quantiles. After obtaining the joint quantile search sorting index information, the party that needs to perform quantile search can generate a joint sorting queue, and then calculate the index in the joint sorting queue according to the given quantile search parameter, and then take the value in the sorting queue according to the index. If the index is the current party's index, the value corresponding to the index is directly returned; if it is the collaborating party's index, this index needs to be sent to the collaborating party, and the collaborating party takes the value according to the index and returns it to the current party. If a joint quantile search is required and the demander is the first data node, and the first data node is the generator of the joint quantile search sorting index information, in order to further improve the efficiency of the quantile search, considering that the first data node knows its own local sorting data, that is, the first private local data, the first data node can fill in the index of the first data node in the joint quantile search sorting index information with a specific value to generate a joint sorting queue. For the sake of ease of description, it can be defined as a joint sorting data queue.
[0073] Exemplarily, the total number of first data of the target characteristic attribute corresponding to the joint quantile search requirement in the first local privacy data and the total number of second data of the target characteristic attribute in the second local privacy data can be calculated first; then, according to the quantile search parameter and the data sum, the index position of the quantile in the joint quantile search sorting index information is determined. As an efficient calculation method, the index position calculation relationship i=(n+k)*(p / q) can be pre-stored, where i represents the index position, n is the total number of first data, k is the total number of second data, and p / q is the quantile search parameter. If i is not an integer, i is rounded off as the final result. Then, the specific value v in the joint sorting queue is calculated based on i; if the index i is the index of the first data node, v is returned directly. If the index i is the index of the second data node, the index of the second data node corresponding to i in the joint sorting queue needs to be taken out and sent to the second data node. The second data node takes out the corresponding value according to the index and returns it to the first data node. At this point, the joint quantile search is completed.
[0074] It should be noted that there is no strict order of execution between the steps in this application. As long as they comply with the logical order, these steps can be executed simultaneously or in a certain preset order. Figure 1 and Figure 2 This is just a schematic and does not mean that this is the only execution order.
[0075] The present application also provides a corresponding device for the quantile search method, which further makes the method more practical. Among them, the device can be described from the perspective of functional modules and hardware. The quantile search device provided by the present application is introduced below. The device is used to implement the quantile search method provided by the present application. In this embodiment, the quantile search device may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to complete the quantile search method disclosed in Example 1. The program module referred to in this application refers to a series of computer program instruction segments that can perform specific functions, which is more suitable for describing the execution process of the quantile search device in the storage medium than the program itself. The following description will specifically introduce the functions of each program module of this embodiment. The quantile search device described below and the quantile search method described above can be referenced to each other.
[0076] From the perspective of functional modules, see Figure 3 , Figure 3 This is a structural diagram of a quantile search device provided by the present application in a specific implementation manner. The device may include:
[0077] The index generation module 301 is used to use the first data node and the second data node as the two nodes of the secure multi-party computing protocol, and to generate joint quantile search sorting index information by comparing the numerical relationship between the first local private data of the first data node and the second local private data of the second data node; the joint quantile search sorting index information is used to represent the numerical relationship between the values of the first local private data and the second local private data.
[0078] The quantile search module 302 is used to determine the index in the joint quantile search sort index information corresponding to the quantile search parameter, and read the required private data from the first local private data and / or the second local private data according to the index.
[0079] Optionally, in some implementations of the present embodiment, the above-mentioned device may further include a sorting module, which is used to: based on the target feature attribute corresponding to the joint quantile search requirement, the first data node sorts the data belonging to the target feature attribute in the first local privacy data, and the second data node sorts the data belonging to the target feature attribute in the second local privacy data.
[0080] Optionally, in some other implementations of this embodiment, the above-mentioned index generation module 301 can also be used for: if the number of first data rows of the first local privacy data is less than the second number of data rows of the second local privacy data, the first data node is used as a collaborator and the second data node is used as an initiator to form two nodes of the secure multi-party computing protocol.
[0081] Optionally, in some other implementations of the present embodiment, the above-mentioned quantile search module 302 can also be used for: if the quantile search demander and the generator of the joint quantile search sorting index information belong to the same data node, a joint sorting data queue is generated according to the joint quantile search sorting index information and local privacy data; the joint sorting data queue is generated after replacing the local privacy data with the corresponding index value; the target index position of the quantile in the joint quantile search sorting index information is calculated according to the quantile search parameters, and the corresponding privacy data is read from the joint sorting data queue according to the target index position.
[0082] Optionally, in some other implementations of the present embodiment, the above-mentioned quantile search module 302 can also be used to: calculate the total number of first data of the target feature attribute corresponding to the joint quantile search requirement in the first local privacy data and the total number of second data of the target feature attribute in the second local privacy data; determine the index position of the quantile in the joint quantile search sorting index information according to the quantile search parameters and the data sum.
[0083] Optionally, in some other implementations of this embodiment, the above-mentioned quantile search module 302 can also be used for: if the number of first data rows of the first local privacy data is less than the number of second data rows of the second local privacy data, then select a data from the first target data group belonging to the target characteristic attribute corresponding to the joint quantile search requirement from the first local privacy data as the target data, and compare the numerical value relationship between the target data and each data to be compared in the second target data group belonging to the target characteristic attribute in the second local privacy data; update the position of the target data, the first target data group and the second target data group in the to-be-sorted index array according to the numerical value comparison result; the to-be-sorted index array is the index position corresponding to each data of the first target data group and the second target data group; select another data from the first target data group as the target data, compare the numerical value relationship between the target data and each data to be compared in the second target data group, and update the to-be-sorted index array again according to the numerical value comparison result, repeat the above process until each data of the first target data is used as the target data to perform the above operation, and use the final to-be-sorted index array as the sorting index information for the joint quantile search.
[0084] The bitwise search device mentioned above is described from the perspective of a functional module. Furthermore, the present application also provides an electronic device, which is described from the perspective of hardware. Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application in one implementation manner. Figure 4 As shown, the electronic device includes a memory 40 for storing a computer program; and a processor 41 for implementing the steps of the quantile search method mentioned in any of the above embodiments when executing the computer program.
[0085] Among them, the processor 41 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the processor 41 may also be a controller, a microcontroller, a microprocessor or other data processing chip. The processor 41 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 41 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 41 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 41 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0086] The memory 40 may include one or more computer-readable storage media, which may be non-transitory. The memory 40 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the memory 40 may be an internal storage unit of an electronic device, such as a hard disk of a server. In other embodiments, the memory 40 may also be an external storage device of an electronic device, such as a plug-in hard disk equipped on a server, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. Further, the memory 40 may also include both an internal storage unit and an external storage device of an electronic device. The memory 40 may not only be used to store application software and various types of data installed in the electronic device, such as: the code of the program in the process of executing the quantile search method, etc., but also be used to temporarily store data that has been output or is to be output. In this embodiment, the memory 40 is at least used to store the following computer program 401, wherein, after the computer program is loaded and executed by the processor 41, the relevant steps of the quantile search method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 40 may also include an operating system 402 and data 403, and the storage method may be temporary storage or permanent storage. The operating system 402 may include Windows, Unix, Linux, etc. The data 403 may include but is not limited to data corresponding to the quantile search result.
[0087] In some embodiments, the electronic device may further include a display screen 42, an input / output interface 43, a communication interface 44 or a network interface, a power supply 45 and a communication bus 46. Among them, the display screen 42 and the input / output interface 43 such as a keyboard belong to the user interface, and the optional user interface may also include a standard wired interface, a wireless interface, etc. 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) touch device, etc. 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. The communication interface 44 may optionally include a wired interface and / or a wireless interface, such as a WI-FI interface, a Bluetooth interface, etc., which is usually used to establish a communication connection between the electronic device and other electronic devices. The communication bus 46 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0088] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than those shown in the figure, for example, it may also include a sensor 47 for realizing various functions.
[0089] It is understandable that if the bitwise search method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes but is not limited to: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electrically erasable programmable ROM, register, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes. Based on this, the present invention also provides a non-volatile storage medium on which a computer program is stored, and when the computer program is executed by a processor, the bitwise search steps recorded in any of the above embodiments are performed.
[0090] It is understandable that if the quantile search method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, the computer software product does not need to be stored in a physical storage medium. For example, it can be directly transmitted to a computer or other device with information processing capabilities through a wired network or a wireless network to perform all or part of the steps of the methods of each embodiment of the present invention. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product. Based on this, the present invention also provides a computer program product that stores a computer program. When the computer program is executed by a processor, the quantile search steps recorded in any of the above embodiments are performed.
[0091] This application also provides a quantile search system, see Figure 5 , may include a first data node 51 and a second data node 52; the first data node 51 includes a first memory and a first processor, the first memory stores first local privacy data; the second data node 52 includes a second memory and a second processor, the second memory stores second local privacy data; the first processor is used to execute the computer program stored in the first memory to implement the steps performed by the first data node 51 in any of the above-mentioned quantile search method embodiments, and the second processor is used to execute the computer program stored in the second memory to implement the steps performed by the second data node 52 in any of the above-mentioned quantile search method embodiments. Figure 6For example, when the first processor executes the computer program stored in the first memory, it implements the sorting operation on the first local privacy data, the calculation of the number of local rows, and the initialization of the multi-party security protocol operation. When the second processor executes the computer program stored in the second memory, it implements the sorting operation on the second local privacy data, the calculation of the number of local rows, and the initialization of the multi-party security protocol operation. As for the comparison of the size of the first local privacy data and the second local privacy data, the privacy comparison operation, and the generation of the joint quantile search sorting index information, it can be determined according to the actual configuration. In order to reduce the communication overhead, the privacy comparison operation and the joint quantile search sorting index information generation operation can be performed on the side with smaller data volume. Considering resource balance, the comparison of data volume size can be performed on the side with larger data volume.
[0092] From the above, it can be seen that this embodiment is aimed at the privacy computing joint statistics scenario, and completes the quantile search operation of the privacy computing joint statistics based on the two nodes of the data owner, without involving the assistance of a third-party intermediate node, reducing the risks of malicious behavior and privacy leakage that may be caused by the need for third-party intermediate nodes, and reducing the complex process of third-party nodes needing to prove their innocence, simplifying the quantile search operation process, and improving the overall computing efficiency, so as to achieve safety, compliance and efficiency.
[0093] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the hardware disclosed in the embodiments, including devices and electronic devices, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.
[0094] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0095] The above is a detailed introduction to a bitwise search method, device, system, electronic device, non-volatile storage medium and computer program product provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that based on the embodiments in the present application, for ordinary technicians in this technical field, all other embodiments obtained without creative work are within the scope of protection of the present application. Without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.
Claims
1. A quantile search method, characterized in that: include: The first data node and the second data node are used as both nodes of the secure multi-party computing protocol, and the joint quantile search sorting index information is generated by comparing the numerical relationship between the first local private data of the first data node and the second local private data of the second data node; the joint quantile search sorting index information is used to represent the numerical relationship between each numerical value of the first local private data and the second local private data; Determine an index in the joint quantile search sorting index information corresponding to the quantile search parameter, and read the required private data from the first local private data and / or the second local private data according to the index.
2. The method for searching for a position according to claim 1, characterized in that: Before comparing the numerical relationship between the first local private data of the first data node and the second local private data of the second data node, the method further includes: Based on the target characteristic attribute corresponding to the joint quantile search requirement, the first data node sorts the data belonging to the target characteristic attribute in the first local privacy data, and the second data node sorts the data belonging to the target characteristic attribute in the second local privacy data.
3. The method for searching for a position according to claim 1, characterized in that: The method of using the first data node and the second data node as both parties' nodes of a secure multi-party computing protocol includes: If the number of first data rows of the first local privacy data is less than the number of second data rows of the second local privacy data, the second data node is used as a collaborator and the first data node is used as an initiator to form two nodes of a secure multi-party computing protocol.
4. The method for searching for a position according to claim 1, characterized in that: The determining that the quantile search parameter corresponds to an index in the joint quantile search sort index information includes: If the quantile search demander and the generator of the joint quantile search sorting index information belong to the same data node, a joint sorting data queue is generated according to the joint quantile search sorting index information and the local private data; the joint sorting data queue is generated after replacing the corresponding index value with the local private data; A target index position of the quantile in the joint quantile search sorting index information is calculated according to the quantile search parameter, and corresponding private data is read from the joint sorting data queue according to the target index position.
5. The method for searching for a quantile according to claim 1, characterized in that: The determining that the quantile search parameter corresponds to an index in the joint quantile search sort index information includes: Calculate the sum of the total number of first data belonging to the target characteristic attribute corresponding to the joint quantile search requirement in the first local private data and the total number of second data belonging to the target characteristic attribute in the second local private data; An index position of the quantile in the joint quantile search sorting index information is determined according to the quantile search parameter and the data sum.
6. The method for searching for a position according to any one of claims 1 to 5, characterized in that: The generating joint quantile search sorting index information by comparing the numerical relationship between the first local private data of the first data node and the second local private data of the second data node includes: If the number of first data rows of the first local privacy data is less than the number of second data rows of the second local privacy data, then select a data from the first target data group of the target characteristic attribute corresponding to the joint quantile search requirement from the first local privacy data as the target data, and compare the numerical value relationship between the target data and the data to be compared in the second target data group of the target characteristic attribute in the second local privacy data; update the position of the target data, the second target data group and the data of the first target data group in the to-be-sorted index array according to the numerical value comparison result; the to-be-sorted index array is the index position corresponding to the data of the first target data group and the second target data group; Select one data from the first target data group as the target data again, compare the numerical value relationships between the target data and each data to be compared in the second target data group, and update the index array to be sorted again according to the numerical value comparison result, repeat the above process until each data of the first target data is used as the target data to perform the above operation, and use the final index array to be sorted as the joint quantile search sorting index information.
7. A position search device, characterized in that: include: An index generation module, configured to use a first data node and a second data node as two nodes of a secure multi-party computing protocol, and to generate joint quantile search sorting index information by comparing the numerical relationship between the first local private data of the first data node and the second local private data of the second data node; the joint quantile search sorting index information is used to represent the numerical relationship between the numerical values of the first local private data and the second local private data; A quantile search module is used to determine the index of the quantile search parameter corresponding to the joint quantile search sort index information, and read the required privacy data from the first local privacy data and / or the second local privacy data according to the index.
8. An electronic device, characterized in that: It comprises a processor and a memory, wherein the processor is used to implement the steps of the quantile search method as claimed in any one of claims 1 to 6 when executing the computer program stored in the memory.
9. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the quantile search method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the quantile search method described in any one of claims 1 to 6 are implemented.
11. A position search system, characterized in that: including a first data node and a second data node; The first data node includes a first memory and a first processor, the first memory stores first local private data; the second data node includes a second memory and a second processor, the second memory stores second local private data; The first processor is used to execute the computer program stored in the first memory to implement the steps performed by the first data node in the quantile search method as described in any one of claims 1 to 6; the second processor is used to execute the computer program stored in the second memory to implement the steps performed by the second data node in the quantile search method as described in any one of claims 1 to 6.