CN114726524B - Target data sorting method and device, electronic equipment and storage medium - Google Patents

Target data sorting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114726524B
CN114726524B CN202210618891.1A CN202210618891A CN114726524B CN 114726524 B CN114726524 B CN 114726524B CN 202210618891 A CN202210618891 A CN 202210618891A CN 114726524 B CN114726524 B CN 114726524B
Authority
CN
China
Prior art keywords
data
target
sorting
sequence number
number data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210618891.1A
Other languages
Chinese (zh)
Other versions
CN114726524A (en
Inventor
黄章成
王健宗
李泽远
肖京
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202210618891.1A priority Critical patent/CN114726524B/en
Publication of CN114726524A publication Critical patent/CN114726524A/en
Application granted granted Critical
Publication of CN114726524B publication Critical patent/CN114726524B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/06Arrangements for sorting, selecting, merging, or comparing data on individual record carriers
    • G06F7/08Sorting, i.e. grouping record carriers in numerical or other ordered sequence according to the classification of at least some of the information they carry
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/50Oblivious transfer

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application provides a method and a device for ordering target data, electronic equipment and a storage medium, and belongs to the field of information security. The method comprises the following steps: the method comprises the steps that a first target acquires key data, wherein the key data are shared keys between at least two first targets; encrypting the target data according to the key data to obtain ciphertext data, and sending the ciphertext data to a second target; receiving first sequence serial number data sent by a second target according to the ciphertext data; the method and the device for sequencing the target data can effectively improve the sequencing efficiency of the target data.

Description

Target data sorting method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of information security, and in particular, to a method and an apparatus for sorting target data, an electronic device, and a storage medium.
Background
In the related art, target data may be processed by an inadvertent Transfer (OT) in combination with a Garbled Circuits (GC). The mode mainly aims at two-party scenes, and for multi-party scenes, data needs to be converted into data between every two scenes for comparison and then data sorting is carried out, so that the efficiency of sorting the data is low.
Disclosure of Invention
The embodiment of the application mainly aims to provide a method and a device for sorting target data, electronic equipment and a storage medium, which can effectively improve the efficiency of sorting the target data.
In order to achieve the above object, a first aspect of the embodiments of the present application provides a method for sorting target data, which is applied to at least two first targets, where the first targets are provided with target data to be processed, and the method includes:
acquiring key data, wherein the key data is a shared key between at least two first targets;
encrypting the target data according to the key data to obtain ciphertext data, and sending the ciphertext data to a second target;
receiving first sequence serial number data sent by the second target according to the ciphertext data;
and acquiring original sequence number data corresponding to the target data, and calculating the first sequence number data and the original sequence number data to obtain target sequencing data corresponding to the first target.
In some embodiments, the target data is array data, and the array data comprises at least one element; the obtaining of the original sequence number data corresponding to the target data includes:
sequencing the elements in the array data to obtain ordered array data;
and taking the sequence serial number corresponding to each element in the ordered array data as original sequence serial number data.
In some embodiments, the calculating the first sequence number data and the original sequence number data to obtain target sorting data corresponding to the first target includes:
performing accumulation calculation on the first sequence number data to obtain accumulated sequencing number data;
and calculating the accumulated sequencing sequence number data and the original sequence number data to obtain target sequencing data corresponding to the first target.
In some embodiments, the calculating the accumulated sorting sequence number data and the original sequence number data to obtain target sorting data corresponding to the first target includes:
subtracting the accumulated sequencing sequence number data and the original sequence number data to obtain second sequence number data;
and performing division calculation on the second sequence number data and a preset value to obtain target sequencing data corresponding to the first target.
A second aspect of the embodiment of the present application provides a method for sorting target data, which is applied to a second target, and the method includes:
receiving ciphertext data sent by a first target according to the target data;
sequencing the ciphertext data to obtain initial sequencing data;
calculating the initial sequencing data to obtain first sequence serial number data corresponding to the ciphertext data;
and sending the first sequence serial number data to the corresponding first target, wherein the first sequence serial number data is used for calculating target sequencing data.
In some embodiments, the calculating the initial sorting data to obtain the first sequence number data corresponding to the ciphertext data includes:
carrying out sequence labeling processing on the initial sequencing data to obtain initial sequence number data;
and extracting first sequence serial number data corresponding to the ciphertext data from the initial sequence serial number data.
In order to achieve the above object, a third aspect of the embodiments of the present application provides an apparatus for sorting target data, which is applied to at least two first targets, where the first targets are provided with target data to be processed, and the apparatus includes:
the data acquisition module is used for acquiring key data, wherein the key data is a shared key between at least two first targets;
the data encryption module is used for encrypting the target data according to the key data to obtain ciphertext data and sending the ciphertext data to a second target;
the data receiving module is used for receiving first sequence serial number data sent by the second target according to the ciphertext data;
and the target sorting module is used for acquiring original sequence number data corresponding to the target data, and calculating the first sequence number data and the original sequence number data to obtain target sorting data corresponding to the first target.
In order to achieve the above object, a fourth aspect of the embodiments of the present application provides an apparatus for sorting object data, which is applied to a second object, and includes:
the data receiving module is used for receiving ciphertext data sent by the first target according to the target data;
the data sorting module is used for sorting the ciphertext data to obtain initial sorting data;
the data calculation module is used for calculating the initial sequencing data to obtain first sequence serial number data corresponding to the ciphertext data;
and the data sending module is used for sending the first sequence serial number data to the corresponding first target, wherein the first sequence serial number data is used for calculating target sequencing data.
In order to achieve the above object, a fifth aspect of embodiments of the present application provides an electronic device, which includes a memory, a processor, a program stored in the memory and operable on the processor, and a data bus for implementing connection communication between the processor and the memory, where the program, when executed by the processor, implements the method for sorting target data according to the first aspect or the method for sorting target data according to the second aspect.
In order to achieve the above object, a sixth aspect of the embodiments of the present application proposes a storage medium, which is a computer-readable storage medium for computer-readable storage, and stores one or more programs, which are executable by one or more processors, to implement the method for sorting target data according to the first aspect or the method for sorting target data according to the second aspect.
The method, the device, the electronic equipment and the storage medium for ordering the target data are characterized in that cipher key data are obtained, the cipher key data are shared between at least two first targets, the target data are encrypted according to the cipher key data to obtain cipher text data, the cipher text data are sent to a second target, the second target receives the cipher text data sent by the first target according to the target data, the second target orders the cipher text data to obtain initial ordering data, the initial ordering data are calculated to obtain first sequence number data corresponding to the cipher text data, and the first sequence number data are sent to the corresponding first targets; the first target receives first sequence serial number data sent by the second target, acquires original sequence serial number data corresponding to the target data, and calculates the first sequence serial number data and the original sequence serial number data to obtain target sequencing data corresponding to the first target. Compared with the related technology of data sorting after data comparison between every two data is needed, the method and the device for sorting the target data can effectively improve the sorting efficiency of the target data.
Drawings
Fig. 1 is a schematic flowchart of a method for sorting target data according to an embodiment of the present application;
FIG. 2 is a schematic sub-flow chart of step S104 in FIG. 1;
FIG. 3 is another sub-flowchart of step S104 in FIG. 1;
FIG. 4 is a schematic sub-flowchart of step S302 in FIG. 1;
FIG. 5 is a schematic flowchart of a method for sorting target data according to another embodiment of the present application;
FIG. 6 is a schematic structural diagram of an apparatus for sorting target data according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of an apparatus for sorting target data according to another embodiment of the present application;
fig. 8 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that although functional blocks are partitioned in a schematic diagram of an apparatus and a logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the partitioning of blocks in the apparatus or the order in the flowchart. The terms first, second and the like in the description and in the claims, and the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
First, several terms referred to in the present application are resolved:
artificial Intelligence (AI): the method is a new technical science for researching and developing theories, methods, technologies and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produces a new intelligent machine that can react in a manner similar to human intelligence, and research in this field includes robotics, language recognition, image recognition, natural language processing, and expert systems, among others. The artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results.
Oblivious Transfer (OT): the method is a mutual communication protocol which can protect the privacy, the privacy of a receiver is not known by a sender, and the communication parties can transmit the message in a selective fuzzification mode. Inadvertent transmission protocol is a basic protocol of cryptography that allows the recipient of a service to obtain certain messages entered by the sender of the service in an inadvertent manner, thus protecting the recipient's privacy from the sender's knowledge.
Garbled Circuits (GC): it is a cryptographic protocol in which the completing parties can compute a function that can be represented by a logic circuit without the parties knowing each other's data. The input of the circuit and the structure of the circuit are covered by encrypting the circuit, so that privacy information of each participant is kept secret, and the calculation of an objective function of secure multi-party calculation is realized through circuit calculation.
Order-Preserving Encryption (OPE): the order of the ciphertext matches the order of the corresponding plaintext.
In the related art, the target data may be processed by an inadvertent transmission in combination with the garbled circuit. Such as comparison sizes for privacy protection. The method mainly aims at two-party scenes, and for multi-party scenes, the data needs to be converted into data between every two scenes for comparison and then data sorting is carried out, so that the efficiency of sorting the data is low, and a large amount of communication and calculation expenses need to be consumed.
Based on this, the embodiment of the application provides a method and a device for sorting target data, an electronic device and a storage medium, which can effectively improve the efficiency of sorting the target data. By the method for sequencing the target data, the data can be sequenced without setting a trusted third party, so that the sequencing efficiency is higher and the confidentiality is higher.
It is understood that the target data provided by the embodiment of the present application may be private data or the like.
Specifically, the following embodiments are provided to explain a method, an apparatus, an electronic device, and a storage medium for sorting target data in an embodiment of the present application, and first describe the method for sorting target data in the embodiment of the present application.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence base technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The embodiment of the application provides a method for sequencing target data, and relates to the field of information security. The method for ordering the target data provided by the embodiment of the application can be applied to a terminal, a server side and software running in the terminal or the server side. In some embodiments, the terminal may be a smartphone, tablet, laptop, desktop computer, or the like; the server side can be configured into an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and cloud servers for providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (content delivery network) and big data and artificial intelligence platforms; the software may be an application or the like that implements a sorting method of target data, but is not limited to the above form.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The method for sequencing the target data is applied to at least two first targets, wherein the first targets are used for communicating with a second target, and the first targets are provided with target data to be processed;
it is to be understood that the embodiments of the present application are applicable in a multi-party scenario, for example, to at least two first targets and a second target. Each first target is used to communicate with a second target. The first target is the target to be sorted, and the second target can be used as a third party to process the data from the first target. It should be noted that the second target in the embodiment of the present application is also one of the targets to be sorted.
For example, in the related art, the target data may be protected by an Order Preserving Encryption (OPE) manner, which may retain plaintext sequence information, but because of a symmetric key, all parties need to send encrypted ciphertext to a third party without a key to perform data ordering, otherwise, plaintext may be leaked. Although efficient and fast, the above method requires a trusted third party, however, in many practical scenarios, it is not possible or difficult to set up a trusted third party.
Therefore, for the way of order-preserving encryption in the related art, the embodiment of the present application provides a method for ordering target data, where the related first target and the second target are both targets to be ordered, but the second target may serve as a third party between at least two first targets to process data from the first targets, for example, to order ciphertext data from at least two first targets, thereby implementing encryption ordering to prevent plaintext leakage. Compared with the related technology, the data sorting method and the data sorting device have the advantages that the trusted third-party server is not required to be arranged, and the data sorting cost is lower.
Specifically, referring to fig. 1, which is an optional flowchart of the method for sorting target data provided in the embodiment of the present application, the method in fig. 1 may include, but is not limited to, step S101 to step S104.
Step S101, key data are obtained, wherein the key data are shared keys between at least two first targets;
step S102, encrypting the target data according to the key data to obtain ciphertext data, and sending the ciphertext data to a second target;
step S103, receiving first sequence serial number data sent by a second target according to the ciphertext data;
step S104, original sequence number data corresponding to the target data are obtained, and the first sequence number data and the original sequence number data are calculated to obtain target sorting data corresponding to the first target.
In steps S101 to S104 of the embodiment of the present application, cipher text data is obtained by obtaining the key data and encrypting the target data according to the key data, and the cipher text data is sent to the second target. And the first target receives first sequence serial number data sent by the second target according to the ciphertext data, acquires original sequence serial number data corresponding to the target data, and calculates the first sequence serial number data and the original sequence serial number data to obtain target sequencing data corresponding to the first target. It can be understood that, after receiving ciphertext data sent by at least two first targets, the second target performs a sorting process on the at least two ciphertext data to obtain initial sorting data, calculates the initial sorting data to obtain first sequence number data corresponding to each ciphertext data, and sends the first sequence number data to the corresponding first target. Compared with the related technology of data sorting after data comparison between every two data needs to be converted, the method and the device for sorting the target data can effectively improve the sorting efficiency of the target data.
It is to be understood that the key data is a shared key between the at least two first objects, i.e. the key data is commonly held between the at least two first objects and is not shared/not held by the second object.
It should be noted that any one of the targets in the embodiments of the present application may be used as the second target, for example, it is assumed that three targets to be sorted, which are target a, target B, and target C, are provided in the embodiments of the present application. When the target A and the target B are used as first targets, the target C is used as a second target; when the target C and the target B are used as first targets, the target A is used as a second target; when the object A and the object C are used as the first object, the object B is used as the second object.
When the method and the device are applied to a multi-party scene, target data to be sorted are set for each target, privacy protection is needed to be carried out on the target data, for example, in some scenes, the target data such as deposit amount of a user in a certain regional bank need to be sorted, and the deposit amount of the user belongs to the privacy data and is not suitable for being disclosed outside, so privacy protection processing needs to be carried out on the deposit amount of the user, namely the target data. Specifically, before the target data to be sorted is subjected to overall data sorting, encryption processing needs to be performed on the target data. In step S102 of some embodiments, the first target encrypts the target data according to the key data to obtain ciphertext data, and sends the ciphertext data to the second target.
Since the key data is a shared key between at least two first objects, i.e. the second object does not share the key data. Thus, for the second target, the second target is a third party to which the at least two first targets correspond. The ciphertext data are sorted through the second target to obtain initial sorting data, the initial sorting data are calculated through the second target to obtain first sequence number data corresponding to the ciphertext data, and the first sequence number data are sent back to the corresponding first target.
And after the first target receives the first sequence serial number data from the second target, acquiring original sequence serial number data corresponding to the target data, and calculating the first sequence serial number data and the original sequence serial number data to obtain target sequencing data corresponding to the first target.
It will be appreciated that the key data is symmetric key data. Specifically, the embodiment of the present application adopts an Order Preserving Encryption (OPE) manner, and for the Order Preserving Encryption (OPE), symmetric key data may be included.
For example, the embodiment of the present application uses [ sabotage ] representation to encrypt the target data based on the symmetric key data key to obtain ciphertext data. Assuming that the target data is m and the target data is plaintext, [ m ] represents ciphertext data.
In some embodiments, [ m ]]=Enc key (m), which can be expressed as: and the first target performs homomorphic encryption processing on the target data according to the symmetric key data key to obtain ciphertext data. By adopting the homomorphic encryption processing method of the embodiment of the application, namely adopting an Order Preserving Encryption (OPE) mode, the current m can be ensured 1 <m 2 ,[m 1 ]<[m 2 ]. That is, the order of the ciphertext data obtained by encrypting the target data and the corresponding target data is kept the same.
Referring to FIG. 2, in some embodiments, the target data is array data, and the array data includes at least one element; the acquiring of the original sequence number data corresponding to the target data in step S104 includes:
step S201, sequencing elements in the array data to obtain ordered array data;
step S202, the sequence number corresponding to each element in the ordered array data is used as the original sequence number data.
It can be understood that, when the target data is array data, the embodiment of the present application needs to sort the array data, specifically, sort elements in the array data to obtain ordered array data. In some embodiments, a big-to-small ordering may be set, or a small-to-big ordering may be set. Because the embodiment of the application is in the order-preserving encryption mode, the finally obtained target ordering data can be correspondingly set to be in a big-to-small ordering mode or a small-to-big ordering mode.
It is understood that the original sequence number data is the sequence number corresponding to each element in the ordered array data. For example, there may be subscript data corresponding to each element in the ordered set of data.
Referring to fig. 3, in some embodiments, the calculating the first sequence number data and the original sequence number data in step S104 to obtain target sorting data corresponding to the first target includes:
step S301, accumulating the first sequence number data to obtain accumulated sequencing number data;
step S302, calculating the accumulated sequence number data and the original sequence number data to obtain target sequence data corresponding to the first target.
It can be understood that, in the embodiment of the present application, since at least two first targets are provided, and each target can be used as a second target, the second target performs a sorting process on ciphertext data from the first target to obtain initial sorting data, and calculates the initial sorting data to obtain first sequence number data, for the first target, at least two first sequence number data will be received. According to the method and the device, at least two first sequence serial number data are subjected to accumulation calculation to obtain accumulated sequencing serial number data, and then the accumulated sequencing serial number data and the original sequence serial number data are calculated to obtain target sequencing data corresponding to a first target, so that accurate target sequencing data can be obtained conveniently.
Referring to fig. 4, in some embodiments, step S302 includes:
step S401, subtraction calculation is carried out on the accumulated sequence number data and the original sequence number data to obtain second sequence number data;
step S402, performing division calculation on the second sequence number data and a preset numerical value to obtain target sequencing data corresponding to the first target.
It can be understood that, in the embodiment of the present application, the accumulated sorting sequence number data is subtracted from the original sequence number data corresponding to the target data to obtain the second sequence number data through calculation, and then the obtained second sequence number data is divided by the preset value to obtain the target sorting data corresponding to the first target through calculation.
In some embodiments, the preset value is calculated according to the number of the first target and the second target, for example, if the total number of the first target and the second target is n, the preset value may be n-2.
It is understood that the embodiments of the present application apply to at least two first and second targets, so n ≧ 3.
The method for sorting target data provided in this embodiment of the present application is applied to a second target, where the second target is used for communicating with at least two first targets, and specifically referring to fig. 5, is an optional flowchart of the method for sorting target data provided in this embodiment of the present application, and the method in fig. 5 may include, but is not limited to, steps S501 to S504.
Step S501, receiving ciphertext data sent by a first target according to target data;
step S502, carrying out sorting processing on the ciphertext data to obtain initial sorting data;
step S503, calculating the initial sequencing data to obtain first sequence serial number data corresponding to the ciphertext data;
step S504, sending the first sequence number data to the corresponding first target, where the first sequence number data is used to calculate target sorting data.
In steps S501 to S504 of the embodiment of the application, ciphertext data sent from the first target according to the target data is received by the second target. It can be understood that the ciphertext data is obtained by the first target through encrypting the target data according to the acquired key data, the key data is a shared key between at least two first targets, and the target data is set in the corresponding first targets. And then, the second target sequences the ciphertext data to obtain initial sequencing data, calculates the initial sequencing data to obtain first sequence serial number data corresponding to the ciphertext data, and sends the first sequence serial number data to the corresponding first target. It can be understood that the first sequence number data is used to calculate target sequence data, and specifically, the first target receives the first sequence number data from the second target, and after acquiring the original sequence number data corresponding to the target data, calculates the first sequence number data and the original sequence number data corresponding to the target data to obtain the target sequence data corresponding to the first target. Compared with the related technology of data sorting after data comparison between every two data is needed, the method and the device for sorting the target data can effectively improve the sorting efficiency of the target data.
It can be understood that, since the embodiment of the present application is provided with at least two first targets, each first target executes steps S101 to S104, that is, the second target receives ciphertext data sent by the at least two first targets according to the target data, respectively, so as to perform a sorting process on the at least two ciphertext data, so as to obtain initial sorting data. It should be noted that, in the embodiment of the present application, each target can be regarded as a first target or a second target, and specifically, the multi-party sorting manner can be implemented through step S101 to step S104, and step S501 to step S504, which is not described herein again.
The multi-party sequencing method based on the order-preserving encryption realizes multi-party sequencing of target data such as private data, and compared with the related technology of combining careless transmission with a garbled circuit, the sequencing efficiency of the target data is higher, and less communication transmission is realized; compared with the traditional order-preserving encryption mode, the method and the device do not need a trusted third-party server.
In some embodiments, calculating the initial sequencing data to obtain first sequence number data corresponding to the ciphertext data includes: carrying out sequence labeling processing on the initial sequencing data to obtain initial sequence number data; and extracting first sequence serial number data corresponding to the ciphertext data from the initial sequence serial number data.
It can be understood that, since the second target is used for communicating with the at least two first targets, the second target will receive the ciphertext data respectively sent from the at least two first targets, and perform the sorting process on the at least two ciphertext data through the second target, so as to obtain the initial sorting data. That is, the initial sorted data in the embodiment of the present application is the sorted result of all the ciphertext data of the first target, and the obtained initial sorted data is subjected to sequential labeling processing, for example, sequentially labeling each element in the initial sorted data in the order from small to large (1, 2,3 … …), so as to obtain initial sequence number data. It is to be understood that the initial sequence number data is the initial sorted data with the sequence index. Because the initial sequencing data are obtained by sequencing according to the ciphertext data of all the first targets, the first sequence serial number data corresponding to the ciphertext data can be extracted and obtained from the initial sequence serial number data, so that the first targets can further calculate the first sequence serial number data and the original sequence serial number data corresponding to the target data to obtain the target sequencing data corresponding to the first targets.
The following describes a method for sorting target data according to an embodiment of the present application.
In one embodiment, it is assumed that the present embodiment is provided with n targets to be sorted, for example, n =3, which are target a, target B, and target C, respectively. For the target a, the target B and the target C, each target is provided with corresponding target data, the target data is array data, and each array data comprises at least one element.
Respectively sorting the elements in each array data corresponding to the target A, the target B and the target C to obtain ordered array data
Figure 840576DEST_PATH_IMAGE001
Ordered array data
Figure 584410DEST_PATH_IMAGE002
Ordered array data
Figure 851443DEST_PATH_IMAGE003
Wherein, in the process,
Figure 315922DEST_PATH_IMAGE004
Figure 984801DEST_PATH_IMAGE005
and
Figure 243744DEST_PATH_IMAGE006
. By the target data sorting method of the embodiment of the application, the target sorting data corresponding to the target A can be finally obtained
Figure 139019DEST_PATH_IMAGE007
Target sorting data corresponding to target B
Figure 141610DEST_PATH_IMAGE008
Target ordering data corresponding to target C
Figure 360419DEST_PATH_IMAGE011
Specifically, symmetric key data key is obtained, symmetric key data which can be shared pairwise among a target A, a target B and a target C is defined, and the symmetric key data are keys respectively A,B 、key B,C 、key A,C . It can be understood that the key A,B Key data representing a shared key/common hold between the object A and the object B, the object A and the object B being the first object and the key A,B Is key data that target C does not share/hold, when target C is the second target. In the same way, key B,C Key data representing a shared key/common hold between the target B and the target C, the target B and the target C being the first target and the key B,C The target A does not share/hold the key data, and the target A is taken as a second target; key A,C Key data representing a shared key/common hold between the object A and the object C, the object A and the object C being the first object and the key A,C Is key data that target B does not share/hold, when target B is the second target.
When the object A and the object B are used as a first object and the object C is used as a second object, the shared key between the object A and the object B is key A,B . At this time, the target A acquires key data, i.e., key A,B According to the key data key A,B For corresponding ordered array data
Figure 602044DEST_PATH_IMAGE012
Performs encryption processing to obtain ciphertext data, i.e.
Figure 142747DEST_PATH_IMAGE013
And will be
Figure 176431DEST_PATH_IMAGE014
Sending to a second target, target C; target B obtains key data, i.e. key A,B According to key data key A,B For corresponding ordered array data
Figure 777176DEST_PATH_IMAGE015
Performs encryption processing to obtain ciphertext data, i.e.
Figure 240519DEST_PATH_IMAGE016
And will be
Figure 116071DEST_PATH_IMAGE016
Sending to a second target, target C;
the above encryption process, abbreviated as: target A according to key A,B Is encrypted to obtain
Figure 614048DEST_PATH_IMAGE014
And will be
Figure 120116DEST_PATH_IMAGE017
Sending the key to a target C, and sending the key to a target B A,B Is encrypted to obtain
Figure 742858DEST_PATH_IMAGE018
And will be
Figure 625364DEST_PATH_IMAGE016
And sending to the target C.
And (3) sequencing: target C as a second target, receiving the transmission from target A
Figure 977848DEST_PATH_IMAGE014
And receiving transmissions from target B
Figure 185975DEST_PATH_IMAGE018
. At this time, the target C pair
Figure 623910DEST_PATH_IMAGE019
And
Figure 310106DEST_PATH_IMAGE016
sequencing to obtain initial sequencing data
Figure 172889DEST_PATH_IMAGE020
And then, calculating first sequence serial number data corresponding to the target A and the target B through the target C. Specifically, target C pairs corresponding initial sorting data
Figure 211569DEST_PATH_IMAGE021
Carrying out sequence labeling processing to obtain initial sequence number data; extracting from the initial sequence number data
Figure 967035DEST_PATH_IMAGE022
Corresponding first sequence number data
Figure 294111DEST_PATH_IMAGE023
And the first sequence number data
Figure 578462DEST_PATH_IMAGE023
Sending back to the corresponding target A; the target C is extracted from the initial sequence number data
Figure 131934DEST_PATH_IMAGE024
Corresponding toFirst order sequence number data
Figure 159933DEST_PATH_IMAGE025
And the first sequence number data
Figure 341516DEST_PATH_IMAGE026
And sent back to the corresponding target B.
Similarly, when the target A and the target C are used as the first target and the target B is used as the second target, the shared key between the target A and the target C is key A,C . The encryption process at this time is: target A according to key A,C Is encrypted to obtain
Figure 327927DEST_PATH_IMAGE027
And will be
Figure 227749DEST_PATH_IMAGE027
Sending the key to a target B, and sending the key to a target C A,C Is encrypted to obtain
Figure 793860DEST_PATH_IMAGE028
And will be
Figure 485741DEST_PATH_IMAGE028
And sending the data to the target B.
And (3) sequencing: target B as a second target, receiving the transmission from target A
Figure 111895DEST_PATH_IMAGE027
And receiving transmissions from target C
Figure 233434DEST_PATH_IMAGE028
. At this time, the target B pair
Figure 134394DEST_PATH_IMAGE027
And
Figure 290569DEST_PATH_IMAGE028
sequencing to obtain initial sequencing data
Figure 87624DEST_PATH_IMAGE029
And then, calculating first sequence serial number data corresponding to the target A and the target C through the target B. Specifically, target B pairs corresponding to the initial ordering data
Figure 102984DEST_PATH_IMAGE030
Carrying out sequence labeling processing to obtain initial sequence number data; extracting from the initial sequence number data
Figure 10898DEST_PATH_IMAGE027
Corresponding first sequence number data
Figure 21579DEST_PATH_IMAGE031
And the first sequence number data
Figure 520693DEST_PATH_IMAGE032
Sending back to the corresponding target A; the target B is extracted from the initial sequence number data
Figure 616825DEST_PATH_IMAGE028
Corresponding first sequence number data
Figure 328429DEST_PATH_IMAGE033
And the first sequence number data
Figure 114989DEST_PATH_IMAGE033
Sent back to the corresponding target C.
Or, when the object B and the object C are taken as the first object and the object A is taken as the second object, the shared key between the object B and the object C is key B,C . The encryption process at this time is as follows: target B according to key B,C Is encrypted to obtain
Figure 253846DEST_PATH_IMAGE034
And will be
Figure 571695DEST_PATH_IMAGE034
Sending the data to a target A, and sending a target C according to the key B,C Is encrypted to obtain
Figure 618148DEST_PATH_IMAGE035
And will be
Figure 603422DEST_PATH_IMAGE035
And sending to the target A.
And (3) sequencing: target A as the second target, receiving the transmission from target B
Figure 913180DEST_PATH_IMAGE034
And receiving transmissions from target C
Figure 124850DEST_PATH_IMAGE035
. At this time, the target A pair
Figure 178257DEST_PATH_IMAGE036
And
Figure 18037DEST_PATH_IMAGE035
sequencing to obtain initial sequencing data
Figure 29855DEST_PATH_IMAGE037
And then, calculating first sequence serial number data corresponding to the target B and the target C through the target A. Specifically, target A pairs corresponding initial sorting data
Figure 587875DEST_PATH_IMAGE038
Carrying out sequence labeling processing to obtain initial sequence number data; extracting from the initial sequence number data
Figure 179394DEST_PATH_IMAGE039
Corresponding first sequence number data
Figure 795052DEST_PATH_IMAGE040
And the first sequence number data
Figure 446613DEST_PATH_IMAGE041
Sending back to the corresponding target B; the target A is extracted from the initial sequence number data
Figure 226350DEST_PATH_IMAGE042
Corresponding first sequence number data
Figure 152718DEST_PATH_IMAGE043
And the first sequence number data
Figure 967090DEST_PATH_IMAGE043
Sent back to the corresponding target C.
It will be appreciated that the above description has been made with
Figure 789553DEST_PATH_IMAGE044
Is an arbitrary ordering algorithm.
Thus, for target A, it will receive the transmission from target B
Figure 463111DEST_PATH_IMAGE032
And receiving transmissions from target C
Figure 662011DEST_PATH_IMAGE045
. Through target A pair
Figure 330889DEST_PATH_IMAGE031
Figure 855412DEST_PATH_IMAGE046
Accumulating to obtain accumulated sequence number data, and comparing the accumulated sequence number data with the original sequence number data corresponding to the target A
Figure 609741DEST_PATH_IMAGE047
Carrying out subtraction calculation to obtain second sequence serial number data; then, division calculation is carried out on the second sequence serial number data and a preset numerical value to obtain target sorting data corresponding to the target A
Figure 612332DEST_PATH_IMAGE048
In some embodiments of the present invention, the,
Figure 791510DEST_PATH_IMAGE049
(ii) a Wherein the content of the first and second substances,
Figure 955775DEST_PATH_IMAGE050
represents the target sorting data corresponding to the target A, n-2 represents a preset numerical value, and n of the embodiment of the application is 3,
Figure 197400DEST_PATH_IMAGE032
Figure 269261DEST_PATH_IMAGE046
each represents the first sequence number data corresponding to the target a.
Similarly, for target B, in some embodiments,
Figure 647153DEST_PATH_IMAGE051
(ii) a Wherein the content of the first and second substances,
Figure 654423DEST_PATH_IMAGE052
represents the target sorting data corresponding to the target B, n-2 represents a preset numerical value, and n in the embodiment of the application is 3,
Figure 117766DEST_PATH_IMAGE053
Figure 462159DEST_PATH_IMAGE054
each represents the first sequence number data corresponding to the target B.
Still alternatively, for C, in some embodiments,
Figure 225716DEST_PATH_IMAGE055
(ii) a Wherein the content of the first and second substances,
Figure 997363DEST_PATH_IMAGE056
representing target ordering data corresponding to target C, n-2 representing pre-targetGiven the numerical values, and n in the examples of the present application is 3,
Figure 948001DEST_PATH_IMAGE057
Figure 486299DEST_PATH_IMAGE058
each represents the first sequence number data corresponding to the target C.
By the method for sorting the target data, the target sorting data of each target corresponding to all the data can be obtained for each target to be sorted. According to the method and the device, the trusted third-party server is not required to be arranged, each target can be used as the second target, the second target is communicated with the at least two first targets, the encryption sequencing process is achieved, and the target data sequencing efficiency is improved while the confidentiality is guaranteed.
It will be appreciated that the target ranking data may be in the form of array data. For example, in some embodiments, ordered arrays of data corresponding to target A
Figure 838783DEST_PATH_IMAGE012
Corresponding to the obtained target sorting data
Figure 781331DEST_PATH_IMAGE059
The order of the elements in (1) can correspond to the ordered array data one by one respectively
Figure 750424DEST_PATH_IMAGE061
The order of the elements in (a). And target ordering data
Figure 436620DEST_PATH_IMAGE059
The elements in (1) can be expressed as ordered array data
Figure 643611DEST_PATH_IMAGE061
In the whole ordered array data
Figure 163585DEST_PATH_IMAGE012
Ordered array data
Figure 88816DEST_PATH_IMAGE015
Ordered array data
Figure 313124DEST_PATH_IMAGE062
The order in (1).
In another embodiment, assume that the embodiment of the present application has n targets to be sorted, which are targets respectively
Figure 171358DEST_PATH_IMAGE063
Each target is provided with corresponding target data which is array data, each array data comprises at least one element, and the target is determined by the data type of the target
Figure 190130DEST_PATH_IMAGE064
In other words, after the data of the array is sorted, the corresponding ordered array data can be obtained
Figure 602657DEST_PATH_IMAGE065
In the embodiment of the present application, n pieces of key data need to be obtained, which may be specifically expressed as
Figure 286448DEST_PATH_IMAGE066
. Wherein, the first and the second end of the pipe are connected with each other,
Figure 468030DEST_PATH_IMAGE067
denoted as n-1 targets (i.e. except for targets)
Figure 923283DEST_PATH_IMAGE068
Outer) to the user. It is understood that the key data is a secure encryption key.
In some embodiments, it is possible to let
Figure 88685DEST_PATH_IMAGE068
Generating
Figure 654795DEST_PATH_IMAGE069
I.e. by
Figure 956464DEST_PATH_IMAGE069
To get rid of the object
Figure 989142DEST_PATH_IMAGE068
Shared secret keys between the other n-1 targets; and let
Figure 110681DEST_PATH_IMAGE070
Generating
Figure 480483DEST_PATH_IMAGE071
I.e. by
Figure 167816DEST_PATH_IMAGE071
To get rid of the object
Figure 964871DEST_PATH_IMAGE070
Shared secret between the other n-1 targets.
For any two targets
Figure 573707DEST_PATH_IMAGE072
And
Figure 137412DEST_PATH_IMAGE073
Figure 148093DEST_PATH_IMAGE074
when the target is
Figure 116049DEST_PATH_IMAGE072
As a first target, a target
Figure 743340DEST_PATH_IMAGE073
When the target is the second target, the target
Figure 454944DEST_PATH_IMAGE072
According to key data
Figure 320132DEST_PATH_IMAGE075
Enter the corresponding ordered array dataLine encryption processing to obtain ciphertext data
Figure 448942DEST_PATH_IMAGE076
And combines the ciphertext data
Figure 964237DEST_PATH_IMAGE077
Sent to the target
Figure 215089DEST_PATH_IMAGE078
Target
Figure 524848DEST_PATH_IMAGE078
Will receive n-1 ciphertext data transmitted by other n-1 first targets
Figure 595572DEST_PATH_IMAGE079
And for n-1 pieces of cipher text data
Figure 316490DEST_PATH_IMAGE080
Sequencing to obtain initial sequencing data
Figure 156270DEST_PATH_IMAGE081
Then, the target
Figure 636930DEST_PATH_IMAGE078
To the initial ordering data
Figure 726109DEST_PATH_IMAGE082
Carrying out sequential labeling processing to obtain initial sequential serial number data, and extracting ciphertext data from the initial sequential serial number data
Figure 317627DEST_PATH_IMAGE079
First sequence number data corresponding to all elements in (1)
Figure 11913DEST_PATH_IMAGE083
And the first sequence number data
Figure 335579DEST_PATH_IMAGE084
Send back to
Figure 115316DEST_PATH_IMAGE085
Target
Figure 510525DEST_PATH_IMAGE085
According to the first sequence number data
Figure 856056DEST_PATH_IMAGE084
Calculating to obtain ordered array data
Figure 678518DEST_PATH_IMAGE086
Corresponding target ordering data
Figure 945551DEST_PATH_IMAGE087
. In some embodiments of the present invention, the,
Figure 800244DEST_PATH_IMAGE088
wherein, in the step (A),
Figure 469123DEST_PATH_IMAGE089
and is and
Figure 462486DEST_PATH_IMAGE090
represented as ordered array data
Figure 747974DEST_PATH_IMAGE086
Corresponding original sequential sequence number data, e.g. ordered array data
Figure 484986DEST_PATH_IMAGE086
Subscript data corresponding to each element in the list;
Figure 8371DEST_PATH_IMAGE087
representing objects
Figure 844740DEST_PATH_IMAGE085
Corresponding target ordering data, n-2 denotes PreThe numerical value is set, and the numerical value is set,
Figure 86366DEST_PATH_IMAGE084
representing objects
Figure 361489DEST_PATH_IMAGE085
Corresponding first sequence number data.
In some embodiments, the target is a target
Figure 536119DEST_PATH_IMAGE078
As a first target, a target
Figure 871285DEST_PATH_IMAGE085
When the target is the second target, the target
Figure 600207DEST_PATH_IMAGE085
Will receive n-1 ciphertext data transmitted by other n-1 first targets
Figure 334813DEST_PATH_IMAGE091
And for n-1 cipher text data
Figure 832791DEST_PATH_IMAGE091
Sequencing to obtain initial sequencing data
Figure 604438DEST_PATH_IMAGE092
This embodiment of the present application is not described in detail herein.
Specifically, according to the embodiment of the application, by acquiring key data which is a shared key between at least two first targets, encrypting the target data according to the key data to obtain ciphertext data, sending the ciphertext data to a second target, receiving the ciphertext data sent by the first target according to the target data by the second target, sequencing the ciphertext data by the second target to obtain initial sequencing data, calculating the initial sequencing data to obtain first sequence number data corresponding to the ciphertext data, and sending the first sequence number data to the corresponding first target; the first target receives first sequence serial number data sent by the second target according to the ciphertext data, acquires original sequence serial number data corresponding to the target data, and calculates the first sequence serial number data and the original sequence serial number data to obtain target sequencing data corresponding to the first target. Compared with the related technology of data sorting after data comparison between every two data is needed, the method and the device for sorting the target data can effectively improve the sorting efficiency of the target data. In addition, compared with the related technology that the order-preserving encryption of the trusted third party needs to be set, the method for ordering the target data is more efficient and faster without setting the trusted third party server.
Referring to fig. 6, an embodiment of the present application further provides a device for sorting target data, which can implement the method for sorting target data, and is applied to at least two first targets, where the first targets have target data to be processed, and the device includes:
a data obtaining module 601, configured to obtain key data, where the key data is a shared key between at least two first targets;
the data encryption module 602 is configured to encrypt the target data according to the key data to obtain ciphertext data, and send the ciphertext data to a second target;
a data receiving module 603, configured to receive first sequence number data sent according to the ciphertext data from the second target;
the target sorting module 604 is configured to obtain original sequence number data corresponding to the target data, and calculate the first sequence number data and the original sequence number data to obtain target sorting data corresponding to the first target.
Referring to fig. 7, an embodiment of the present application further provides a target data sorting apparatus, which can implement the above target data sorting method, and is applied to a second target, where the apparatus includes:
a data receiving module 701, configured to receive ciphertext data sent from the first target according to the target data;
a data sorting module 702, configured to sort the ciphertext data to obtain initial sorted data;
the data calculation module 703 is configured to calculate the initial sorting data to obtain first sequence number data corresponding to the ciphertext data;
a data sending module 704, configured to send the first sequence number data to a corresponding first target, where the first sequence number data is used to calculate target sorting data.
An embodiment of the present application further provides an electronic device, where the electronic device includes: the device comprises a memory, a processor, a program stored on the memory and capable of running on the processor, and a data bus for realizing connection communication between the processor and the memory, wherein the program realizes the ordering method of the target data when being executed by the processor. The electronic equipment can be any intelligent terminal including a tablet computer, a vehicle-mounted computer and the like.
Referring to fig. 8, fig. 8 illustrates a hardware structure of an electronic device according to another embodiment, where the electronic device includes:
the processor 801 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute a relevant program to implement the technical solution provided in the embodiment of the present Application;
the Memory 802 may be implemented in the form of a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a Random Access Memory (RAM). The memory 802 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present disclosure is implemented by software or firmware, the relevant program codes are stored in the memory 802, and the processor 801 calls the sorting method for executing the target data of the embodiments of the present disclosure;
an input/output interface 803 for realizing input and output of information;
the communication interface 804 is used for realizing communication interaction between the device and other devices, and can realize communication in a wired manner (such as USB, network cable, and the like) or in a wireless manner (such as mobile network, WIFI, bluetooth, and the like);
a bus 805 that transfers information between the various components of the device (e.g., the processor 801, memory 802, input/output interfaces 803, and communication interface 804);
wherein the processor 801, the memory 802, the input/output interface 803 and the communication interface 804 are communicatively connected to each other within the device via a bus 805.
The embodiments of the present application further provide a storage medium, which is a computer-readable storage medium for computer-readable storage, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the foregoing method for sorting target data.
The memory, as a non-transitory computer-readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer-executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The method for sorting the target data, the device for sorting the target data, the electronic device and the storage medium of the embodiment of the application acquire the key data, wherein the key data is a shared key between at least two first targets, encrypt the target data according to the key data to obtain ciphertext data, send the ciphertext data to a second target, receive the ciphertext data sent by the at least two first targets according to the target data respectively, so that the second target sorts the at least two ciphertext data to obtain initial sorting data, calculate the initial sorting data to obtain first sequence number data corresponding to the ciphertext data, and send the first sequence number data to the corresponding first targets; the first target receives first sequence serial number data sent by the second target, acquires original sequence serial number data corresponding to the target data, and calculates the first sequence serial number data and the original sequence serial number data to obtain target sequencing data corresponding to the first target. Compared with the related technology of data sorting after data comparison between every two data needs to be converted, the method and the device for sorting the target data can effectively improve the sorting efficiency of the target data.
The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation to the technical solutions provided in the embodiments of the present application, and it is obvious to those skilled in the art that the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems with the evolution of technology and the emergence of new application scenarios.
It will be appreciated by those skilled in the art that the embodiments shown in fig. 1-5 are not limiting of the embodiments of the present application and may include more or fewer steps than those shown, or some of the steps may be combined, or different steps may be included.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like (if any) in the description of the present application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that, in this application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the above-described division of units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product stored in a storage medium, which includes multiple instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing programs, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and the scope of the claims of the embodiments of the present application is not limited thereto. Any modifications, equivalents and improvements that may occur to those skilled in the art without departing from the scope and spirit of the embodiments of the present application are intended to be within the scope of the claims of the embodiments of the present application.

Claims (10)

1. A method for sorting object data, applied to at least two first objects provided with object data to be processed, the method comprising:
acquiring key data, wherein the key data is a shared key between at least two first targets;
encrypting the target data according to the key data to obtain ciphertext data, and sending the ciphertext data to a second target;
receiving first sequence serial number data sent by the second target according to the ciphertext data;
and acquiring original sequence number data corresponding to the target data, and calculating the first sequence number data and the original sequence number data to obtain target sequencing data corresponding to the first target.
2. The method according to claim 1, wherein the target data is array data, and the array data comprises at least one element; the obtaining of the original sequence number data corresponding to the target data includes:
sequencing the elements in the array data to obtain ordered array data;
and taking the sequence serial number corresponding to each element in the ordered array data as original sequence serial number data.
3. The method for sorting target data according to claim 1 or 2, wherein the calculating the first sequence number data and the original sequence number data to obtain target sorting data corresponding to the first target includes:
performing accumulation calculation on the first sequence number data to obtain accumulated sequencing number data;
and calculating the accumulated sequencing sequence number data and the original sequence number data to obtain target sequencing data corresponding to the first target.
4. The method of claim 3, wherein the calculating the accumulated sorted sequence number data and the original sequence number data to obtain the target sorted data corresponding to the first target comprises:
subtracting the accumulated sequencing sequence number data and the original sequence number data to obtain second sequence number data;
and performing division calculation on the second sequence number data and a preset value to obtain target sequencing data corresponding to the first target.
5. A method for ordering object data, applied to a second object, the method comprising:
receiving ciphertext data sent by a first target according to the target data;
sequencing the ciphertext data to obtain initial sequencing data;
calculating the initial sequencing data to obtain first sequence serial number data corresponding to the ciphertext data;
and sending the first sequence serial number data to the corresponding first target, wherein the first sequence serial number data is used for calculating target sorting data.
6. The method for sorting target data according to claim 5, wherein the step of calculating the initial sorting data to obtain first sequential serial number data corresponding to the ciphertext data includes:
carrying out sequence labeling processing on the initial sequencing data to obtain initial sequence number data;
and extracting first sequence serial number data corresponding to the ciphertext data from the initial sequence serial number data.
7. An apparatus for sorting object data, applied to at least two first objects provided with object data to be processed, the apparatus comprising:
the data acquisition module is used for acquiring key data, wherein the key data is a shared key between at least two first targets;
the data encryption module is used for encrypting the target data according to the key data to obtain ciphertext data and sending the ciphertext data to a second target;
the data receiving module is used for receiving first sequence serial number data sent by the second target according to the ciphertext data;
and the target sorting module is used for acquiring original sequence number data corresponding to the target data, and calculating the first sequence number data and the original sequence number data to obtain target sorting data corresponding to the first target.
8. An apparatus for sorting object data, applied to a second object, the apparatus comprising:
the data receiving module is used for receiving ciphertext data sent by the first target according to the target data;
the data sorting module is used for sorting the ciphertext data to obtain initial sorting data;
the data calculation module is used for calculating the initial sequencing data to obtain first sequence serial number data corresponding to the ciphertext data;
and the data sending module is used for sending the first sequence serial number data to the corresponding first target, wherein the first sequence serial number data is used for calculating target sequencing data.
9. An electronic device, characterized in that the electronic device comprises a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for implementing a connection communication between the processor and the memory, the program, when executed by the processor, implementing the steps of the method of sorting target data according to any one of claims 1 to 4, or the steps of the method of sorting target data according to any one of claims 5 to 6.
10. A storage medium which is a computer-readable storage medium for computer-readable storage, characterized in that the storage medium stores one or more programs which are executable by one or more processors to implement the steps of the method of sorting target data according to any one of claims 1 to 4 or the steps of the method of sorting target data according to any one of claims 5 to 6.
CN202210618891.1A 2022-06-02 2022-06-02 Target data sorting method and device, electronic equipment and storage medium Active CN114726524B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210618891.1A CN114726524B (en) 2022-06-02 2022-06-02 Target data sorting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210618891.1A CN114726524B (en) 2022-06-02 2022-06-02 Target data sorting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114726524A CN114726524A (en) 2022-07-08
CN114726524B true CN114726524B (en) 2022-08-19

Family

ID=82232370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210618891.1A Active CN114726524B (en) 2022-06-02 2022-06-02 Target data sorting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114726524B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116522366B (en) * 2023-06-26 2023-09-19 三未信安科技股份有限公司 Multiparty data processing method suitable for big data, storage medium and product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014138754A2 (en) * 2013-03-04 2014-09-12 Thomson Licensing A method and system for privacy-preserving recommendation based on matrix factorization and ridge regression
CN111177739A (en) * 2019-10-28 2020-05-19 腾讯云计算(北京)有限责任公司 Data processing method, information interaction system and computer storage medium
CN113179150A (en) * 2021-04-26 2021-07-27 杭州宇链科技有限公司 Homomorphic privacy set intersection method based on order preserving function
CN113660197A (en) * 2021-07-02 2021-11-16 西安电子科技大学广州研究院 Obfuscated data aggregation privacy protection method, system, device, medium and terminal
CN114255037A (en) * 2021-12-22 2022-03-29 上海阵方科技有限公司 Multi-party combined sorting method and data processing method under privacy protection

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200167661A1 (en) * 2019-07-01 2020-05-28 Alibaba Group Holding Limited Performing data processing based on decision tree

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014138754A2 (en) * 2013-03-04 2014-09-12 Thomson Licensing A method and system for privacy-preserving recommendation based on matrix factorization and ridge regression
CN111177739A (en) * 2019-10-28 2020-05-19 腾讯云计算(北京)有限责任公司 Data processing method, information interaction system and computer storage medium
CN113179150A (en) * 2021-04-26 2021-07-27 杭州宇链科技有限公司 Homomorphic privacy set intersection method based on order preserving function
CN113660197A (en) * 2021-07-02 2021-11-16 西安电子科技大学广州研究院 Obfuscated data aggregation privacy protection method, system, device, medium and terminal
CN114255037A (en) * 2021-12-22 2022-03-29 上海阵方科技有限公司 Multi-party combined sorting method and data processing method under privacy protection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Secure Multi-party Sorting Protocol Based on Distributed Oblivious Transfer";Motahareh Dehghan等;《10th International Conference Computer and Knowledge Engineering 》;20201030;全文 *
"密文数据保序编码方法的研究与改进";曾橙焜等;《信息安全技术》;20170816;全文 *

Also Published As

Publication number Publication date
CN114726524A (en) 2022-07-08

Similar Documents

Publication Publication Date Title
US11843687B2 (en) Systems, devices, and processes for homomorphic encryption
Avudaiappan et al. Medical image security using dual encryption with oppositional based optimization algorithm
US10972251B2 (en) Secure web browsing via homomorphic encryption
CN112906044B (en) Multi-party security calculation method, device, equipment and storage medium
CN111553483A (en) Gradient compression-based federated learning method, device and system
CN113343305B (en) Intersection calculating method, device, equipment and storage medium of privacy data
CN110765473A (en) Data processing method, data processing device, computer equipment and storage medium
CN111143862B (en) Data processing method, query method, device, electronic equipment and system
CN113505882A (en) Data processing method based on federal neural network model, related equipment and medium
CN111783129A (en) Data processing method and system for protecting privacy
CN113542228A (en) Data transmission method and device based on federal learning and readable storage medium
CN114448598A (en) Ciphertext compression method, ciphertext decompression method, device, equipment and storage medium
CN114726524B (en) Target data sorting method and device, electronic equipment and storage medium
CN114726512B (en) Data processing method and device
CN107317669B (en) Noiseless full homomorphism public key encryption method based on binary Representation theorem ring
CN111159730B (en) Data processing method, query method, device, electronic equipment and system
CN116010678B (en) Method, device and equipment for inquiring trace
CN114726580B (en) Data processing method and device
CN116681141A (en) Federal learning method, terminal and storage medium for privacy protection
CN114726511B (en) Data processing method and device
CN110598427A (en) Data processing method, system and storage medium
CN114285575B (en) Image encryption and decryption method and device, storage medium and electronic device
CN115333775A (en) Data processing method and device based on privacy calculation, equipment and storage medium
CN110874479B (en) Method, system, data terminal and processing terminal for safely processing decision tree model
CN113645022A (en) Method and device for determining privacy set intersection, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant