CN110765238A - Data encryption query method and device - Google Patents

Data encryption query method and device Download PDF

Info

Publication number
CN110765238A
CN110765238A CN201910968294.XA CN201910968294A CN110765238A CN 110765238 A CN110765238 A CN 110765238A CN 201910968294 A CN201910968294 A CN 201910968294A CN 110765238 A CN110765238 A CN 110765238A
Authority
CN
China
Prior art keywords
data
encrypted
query
field value
encryption
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.)
Pending
Application number
CN201910968294.XA
Other languages
Chinese (zh)
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910968294.XA priority Critical patent/CN110765238A/en
Publication of CN110765238A publication Critical patent/CN110765238A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/338Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a data encryption query method and a device, wherein the method comprises the following steps: acquiring data to be encrypted, encrypting the data to be encrypted according to preset linear encryption parameters, and generating encrypted target data; receiving a range query instruction, and acquiring a first field value and a second field value, wherein the first field value and the second field value are used for determining a query range; and calculating the first field value and the second field value according to the linear encryption parameters, acquiring the mapped query parameters, and determining a range query result according to the query parameters and the target data. Therefore, range finding can be achieved based on the encrypted data, and the problem that a searchable encryption mode in the related technology cannot well support range finding is solved.

Description

Data encryption query method and device
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a data encryption query method and apparatus.
Background
With the development of cloud computing, more and more users choose to migrate local data to a cloud server. In order to ensure data security and user privacy, data is usually stored in a cloud server in a ciphertext form, but users encounter a difficult problem how to search on the ciphertext. For the application scenario, a Searchable Encryption (SE) technology is available.
The searchable encryption in the related art includes two types, namely, Symmetric Searchable Encryption (SSE) and Asymmetric Searchable Encryption (ASE), and is used to solve different requirements, however, the above solutions cannot support a scenario of range finding well, and a solution for implementing range finding for encrypted data is needed at present.
Disclosure of Invention
The disclosure provides a data encryption query method and device, which can solve the problem that a searchable encryption mode in the related art cannot well support range search.
Therefore, a first object of the present disclosure is to provide a data encryption query method, which can implement range finding based on encrypted data.
A second object of the present disclosure is to provide a data encryption query device.
A third object of the present disclosure is to provide an electronic device.
A fourth object of the present disclosure is to provide a computer-readable storage medium.
An embodiment of a first aspect of the present disclosure provides a data encryption query method, including:
acquiring data to be encrypted, encrypting the data to be encrypted according to preset linear encryption parameters, and generating encrypted target data;
receiving a range query instruction, and acquiring a first field value and a second field value, wherein the first field value and the second field value are used for determining a query range;
and calculating the first field value and the second field value according to the linear encryption parameters to obtain mapped query parameters, and determining a range query result according to the query parameters and the target data.
According to the data encryption query method, the data to be encrypted is obtained, and the data to be encrypted is encrypted according to the preset linear encryption parameters, so that the encrypted target data is generated. Furthermore, a range query instruction is received, and a first field value and a second field value are obtained, wherein the first field value and the second field value are used for determining a query range. Further, the first field value and the second field value are calculated according to the linear encryption parameters, the mapped query parameters are obtained, and the range query result is determined according to the query parameters and the target data. Therefore, range query can be realized based on the encrypted data, the problem that a searchable encryption mode in the related technology cannot well support range query is solved, and product functions are expanded.
In addition, the data encryption query method according to the above embodiment of the present disclosure may further have the following additional technical features:
optionally, the type of the data to be encrypted is an integer, the encrypting the data to be encrypted according to a preset linear encryption parameter, and the generating the encrypted target data includes: determining the encrypted target data by the following formula: and f (x) ax + b, wherein x is the data to be encrypted, a and b are the linear encryption parameters, and f (x) is the target data.
Optionally, the type of the data to be encrypted is a floating point number, the encrypting the data to be encrypted according to a preset linear encryption parameter, and the generating of the encrypted target data includes: converting the data to be encrypted into integers according to a preset conversion factor; and encrypting the converted data according to the linear encryption parameters to generate encrypted target data.
Optionally, the type of the data to be encrypted is a character string, the encrypting the data to be encrypted according to a preset linear encryption parameter, and the generating the encrypted target data includes: presetting a corresponding relation between a character string and an integer, and converting the data to be encrypted into the integer according to the corresponding relation; and encrypting the converted data according to the linear encryption parameters to generate encrypted target data.
Optionally, after generating the encrypted target data, the method further includes: receiving a query instruction, and acquiring data to be queried; and calculating the data to be inquired according to the linear encryption parameters, and determining an inquiry result according to a calculation result and the target data.
An embodiment of a second aspect of the present disclosure provides a data encryption query apparatus, including:
the encryption module is used for acquiring data to be encrypted, encrypting the data to be encrypted according to preset linear encryption parameters and generating encrypted target data;
the device comprises a receiving module, a query module and a query module, wherein the receiving module is used for receiving a range query instruction and acquiring a first field value and a second field value, and the first field value and the second field value are used for determining a query range;
and the query module is used for calculating the first field value and the second field value according to the linear encryption parameters, acquiring the mapped query parameters and determining a range query result according to the query parameters and the target data.
The data encryption inquiry device of the embodiment of the disclosure can realize range inquiry based on encrypted data, solves the problem that a searchable encryption mode in the related art cannot well support range inquiry, and expands product functions.
In addition, the data encryption inquiry device according to the above embodiment of the present disclosure may further have the following additional technical features:
optionally, the type of the data to be encrypted is an integer, and the encryption module is specifically configured to: determining the encrypted target data by the following formula: and f (x) ax + b, wherein x is the data to be encrypted, a and b are the linear encryption parameters, and f (x) is the target data.
Optionally, the type of the data to be encrypted is a floating point number, and the encryption module is specifically configured to: converting the data to be encrypted into integers according to a preset conversion factor; and encrypting the converted data according to the linear encryption parameters to generate encrypted target data.
Optionally, the type of the data to be encrypted is a character string, and the encryption module is specifically configured to: presetting a corresponding relation between a character string and an integer, and converting the data to be encrypted into the integer according to the corresponding relation; and encrypting the converted data according to the linear encryption parameters to generate encrypted target data.
Optionally, the apparatus further comprises: the processing module is used for receiving the query instruction and acquiring the data to be queried; and calculating the data to be inquired according to the linear encryption parameters, and determining an inquiry result according to a calculation result and the target data.
An embodiment of a third aspect of the present disclosure provides an electronic device, including: a processor and a memory; wherein the memory is to store executable program code; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the data encryption query method according to the embodiment of the first aspect.
A fourth aspect of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the data encryption query method according to the first aspect.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The foregoing and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a data encryption query method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of another data encryption query method provided in the embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a data encryption query apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of another data encryption query apparatus provided in the embodiment of the present disclosure;
FIG. 5 illustrates a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure;
fig. 6 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure.
The following describes a data encryption query method and apparatus according to an embodiment of the present disclosure with reference to the drawings.
Fig. 1 is a schematic flow chart of a data encryption query method provided in an embodiment of the present disclosure, as shown in fig. 1, the method includes:
step 101, acquiring data to be encrypted, encrypting the data to be encrypted according to a preset linear encryption parameter, and generating encrypted target data.
In the embodiment of the present disclosure, the execution subject is an electronic device, including but not limited to a personal computer, a smart phone, a wearable device, and other devices having a data processing function.
In practical applications, data is generally stored in encrypted form in the server in order to ensure data security and user privacy. According to the scene of searching the encrypted data, in the embodiment of the present disclosure, the data to be encrypted may be obtained first, the data to be encrypted is encrypted according to the preset linear encryption parameter, the encrypted target data is generated, and the target data is stored in the database. The types of data to be encrypted include, but are not limited to, integers, floating point numbers, and character strings, the linear encryption parameter is used for performing linear change processing on the data to realize data encryption, and the linear encryption parameter can be set as required.
The following explains the encryption process by taking different types of data to be encrypted as an example.
In one embodiment of the present disclosure, the type of the data to be encrypted is an integer, and the encrypted target data is determined by the following formula: and f (x) ax + b, wherein x is data to be encrypted, a and b are linear encryption parameters, and f (x) is encrypted target data.
In one embodiment of the present disclosure, the type of data to be encrypted is a floating point number, and the linear encryption parameters are a and b in f (x) ax + b. After the floating-point data type to-be-encrypted data are obtained, the to-be-encrypted data can be converted into integers according to a preset conversion factor, and then the converted data are encrypted according to the linear encryption parameters to generate encrypted target data. The conversion factor is used to convert a floating point number into an integer, for example, calculate x' ═ x × F and perform rounding, and then determine the encrypted target data according to the following formula: f (x ') -ax ' + b, F is the conversion factor, x is the data to be encrypted, a and b are the linear encryption parameters, and F (x ') is the encrypted target data.
In an embodiment of the present disclosure, the type of the data to be encrypted is a character string, a corresponding relationship between the character string and an integer may be preset, the data to be encrypted of the character string type is converted into the integer according to the corresponding relationship, and then the converted data is encrypted according to the linear encryption parameter to generate encrypted target data. For example, an integer x "corresponding to a character string is preset for the enumerable character string, and a mapped value is calculated by f (x") ═ ax "+ b and stored in a database, where x is data to be encrypted, a and b are linear encryption parameters, and f (x") is encrypted target data.
Step 102, receiving a range query instruction, and acquiring a first field value and a second field value, wherein the first field value and the second field value are used for determining a query range.
In the embodiment of the disclosure, after the data to be encrypted is encrypted to obtain the target data, the range query can be performed based on the encrypted target data, so as to meet the requirements of data security and data range query. Receiving a range query instruction through the electronic equipment, and acquiring a range to be queried, wherein the query range is determined by a first field value and a second field value. For example, the data to be encrypted is an integer of 1 to 10, the user wants to query the range of integers of 1 to 5, and the first field value and the second field value are input to be 1 and 5, respectively.
And 103, calculating the first field value and the second field value according to the linear encryption parameters, acquiring the mapped query parameters, and determining a range query result according to the query parameters and the target data.
In the embodiment of the disclosure, after receiving the range query instruction and acquiring the first field value and the second field value, the first field value and the second field value may be calculated according to the linear encryption parameter to obtain a mapped value, which is used as a query parameter, so as to match with the target data according to the query parameter, thereby determining the range query result. The calculation mode of mapping the first field value and the second field value according to the linear encryption parameter is the same as the mode of encrypting the data to be encrypted according to the linear encryption parameter.
In one embodiment of the present disclosure, the type of data to be encrypted is an integer, and the first field value and the second field value are integers. When the query range is between a first field value x1 and a second field value x2, mapped values f (x1) and f (x2) are calculated as f (x1) ═ ax1+ b and f (x2) ═ ax2+ b to serve as query parameters, range retrieval is performed in a database according to the query parameters, f (x1) and f (x2) are matched with target data stored in the database, and target data between f (x1) and f (x2) are acquired to serve as a range query result.
In one embodiment of the present disclosure, the type of data to be encrypted is a floating point number, and the first field value and the second field value are floating point numbers. When the query range is between a first field value x1 and a second field value x2, the first field value and the second field value are converted into integers according to a preset conversion factor, and then the converted integers are mapped and calculated according to linear encryption parameters to obtain query parameters. For example, x1'═ x1 × F is calculated and rounded, and x2' ═ x2 × F is calculated and rounded, as follows. Further, the mapped values f (x1') and f (x2') are calculated as query parameters f (x1') -ax 1' + b, and f (x2') -ax 2' + b, and range search is performed in the database according to the query parameters, and f (x1') and f (x2') are matched with target data stored in the database, and target data between f (x1') and f (x2') is acquired as a range query result.
According to the data encryption query method, the data to be encrypted is obtained, and the data to be encrypted is encrypted according to the preset linear encryption parameters, so that the encrypted target data is generated. Furthermore, a range query instruction is received, and a first field value and a second field value are obtained, wherein the first field value and the second field value are used for determining a query range. Further, the first field value and the second field value are calculated according to the linear encryption parameters, the mapped query parameters are obtained, and the range query result is determined according to the query parameters and the target data. Therefore, range query can be realized based on the encrypted data, the problem that a searchable encryption mode in the related technology cannot well support range query is solved, and product functions are expanded. And the data encryption performance is high by adopting a linear change mode.
Based on the above embodiment, further, accurate matching can be performed based on the encrypted data, so as to realize data query.
Fig. 2 is a schematic flow chart of another data encryption query method provided in the embodiment of the present disclosure, and as shown in fig. 2, the method includes:
step 201, acquiring data to be encrypted, encrypting the data to be encrypted according to a preset linear encryption parameter, and generating encrypted target data.
The type of data to be encrypted includes, but is not limited to, integer, floating point, and character string.
The explanation of the embodiment that the data to be encrypted is encrypted according to the preset linear encryption parameter to generate the target data is also applicable to the embodiment of the present disclosure, and is not described herein again.
Step 202, receiving a query instruction, and acquiring data to be queried.
In the embodiment of the disclosure, after the data to be encrypted is encrypted to obtain the target data, the query can be performed based on the encrypted target data, so as to meet the requirements of data security and data query. And receiving the query instruction through the electronic equipment, and acquiring the data to be queried. For example, the data to be encrypted is an integer of 1 to 10, and if the user wishes to query the integer 1, the input data to be queried is 1.
And 203, calculating the data to be queried according to the linear encryption parameters, and determining a query result according to the calculation result and the target data.
In the embodiment of the disclosure, after receiving the query instruction and acquiring the data to be queried, the data to be queried may be calculated according to the linear encryption parameter to obtain the mapped value, so as to match the calculation result with the target data, thereby determining the query result. The calculation mode for mapping the data to be queried according to the linear encryption parameters is the same as the mode for encrypting the data to be encrypted according to the linear encryption parameters.
In an embodiment of the present disclosure, the type of the data to be encrypted is an integer, the data to be queried is x, the mapped value f (x) is calculated by the following method f (x) ═ ax + b, and is retrieved in the database according to the calculation result f (x), matching f (x) with the target data stored in the database, and acquiring the target data consistent with f (x) as the query result.
In an embodiment of the present disclosure, the type of the data to be encrypted is a floating point number, the data to be queried is x, the data to be queried is converted into an integer according to a preset conversion factor, and then the converted integer is mapped and calculated according to the linear encryption parameter to obtain a calculation result. For example, x' x F is first calculated and rounded as follows. Further, the mapped value f (x ') is calculated such that f (x ') is ax ' + b, a range search is performed in the database based on the calculation result f (x '), and the target data matching f (x ') with the target data stored in the database is acquired as a query result.
In an embodiment of the present disclosure, the type of the data to be encrypted is a character string, the data to be queried is x, the data to be encrypted of the character string type can be converted into an integer according to a preset corresponding relationship between the character string and the integer according to the corresponding relationship, and then the converted data is calculated according to the linear encryption parameter. For example, the character string x is converted into a corresponding integer x "according to the correspondence, the mapped value is calculated by the following method f (x") ═ ax "+ b, range search is performed in the database according to the calculation result f (x"), f (x ") is matched with target data stored in the database, and the target data matching with f (x") is acquired as a query result.
Optionally, after encrypting the data to be encrypted according to the preset linear encryption parameter and generating the encrypted target data, the target data may be further sequenced. For example, the encrypted target data may be sorted in a descending order or a descending order, thereby implementing a sorting function based on the encrypted data.
According to the data encryption query method, the data to be encrypted is obtained, and the data to be encrypted is encrypted according to the preset linear encryption parameters, so that the encrypted target data is generated. And then receiving the query instruction, acquiring data to be queried, calculating the data to be queried according to the linear encryption parameters, and determining a query result according to the calculation result and the target data. Therefore, accurate matching and sequencing of the encrypted data can be supported, and the problems of searching and sequencing based on the ciphertext are solved. And the data encryption performance is high by adopting a linear change mode.
The disclosure also provides a data encryption inquiry device.
Fig. 3 is a schematic structural diagram of a data encryption query apparatus according to an embodiment of the present disclosure, as shown in fig. 3, the apparatus includes: the system comprises an encryption module 10, a receiving module 20 and a query module 30.
The encryption module 10 is configured to obtain data to be encrypted, encrypt the data to be encrypted according to a preset linear encryption parameter, and generate encrypted target data.
The receiving module 20 is configured to receive a range query instruction, and obtain a first field value and a second field value, where the first field value and the second field value are used to determine a query range.
And the query module 30 is configured to calculate the first field value and the second field value according to the linear encryption parameter, obtain the mapped query parameter, and determine a range query result according to the query parameter and the target data.
On the basis of fig. 3, the apparatus shown in fig. 4 further includes: a processing module 40.
The processing module 40 is configured to receive a query instruction and obtain data to be queried; and calculating the data to be queried according to the linear encryption parameters, and determining a query result according to the calculation result and the target data.
Optionally, the type of the data to be encrypted is an integer, and the encryption module 10 is specifically configured to: determining the encrypted target data by the following formula: and f (x) ax + b, wherein x is data to be encrypted, a and b are linear encryption parameters, and f (x) is target data.
Optionally, the type of the data to be encrypted is a floating point number, and the encryption module 10 is specifically configured to: converting data to be encrypted into integers according to a preset conversion factor; and encrypting the converted data according to the linear encryption parameters to generate encrypted target data.
Optionally, the type of the data to be encrypted is a character string, and the encryption module 10 is specifically configured to: presetting a corresponding relation between a character string and an integer, and converting data to be encrypted into the integer according to the corresponding relation; and encrypting the converted data according to the linear encryption parameters to generate encrypted target data.
It should be noted that the explanation of the data encryption query method in the foregoing embodiment is also applicable to the data encryption query device in the embodiment of the present disclosure, and details are not repeated here.
According to the data encryption inquiry device, the data to be encrypted is obtained, and the data to be encrypted is encrypted according to the preset linear encryption parameters, so that the encrypted target data is generated. Furthermore, a range query instruction is received, and a first field value and a second field value are obtained, wherein the first field value and the second field value are used for determining a query range. Further, the first field value and the second field value are calculated according to the linear encryption parameters, the mapped query parameters are obtained, and the range query result is determined according to the query parameters and the target data. Therefore, range query can be realized based on the encrypted data, the problem that a searchable encryption mode in the related technology cannot well support range query is solved, and product functions are expanded. And the data encryption performance is high by adopting a linear change mode.
In order to implement the above embodiments, the present disclosure further provides an electronic device.
Referring now to FIG. 5, a block diagram of an electronic device 800 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device 800 may include a processing means (e.g., central processing unit, graphics processor, etc.) 801 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the electronic apparatus 800 are also stored. The processing apparatus 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 5 illustrates an electronic device 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 809, or installed from the storage means 808, or installed from the ROM 802. The computer program, when executed by the processing apparatus 801, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
In order to implement the above embodiments, the present disclosure also proposes a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the slide generation method as described in the foregoing embodiments.
Fig. 6 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. As shown in fig. 6, a computer-readable storage medium 300 having non-transitory computer-readable instructions 310 stored thereon according to an embodiment of the present disclosure. The non-transitory computer readable instructions 310, when executed by a processor, perform all or a portion of the steps of the slide generation method of the embodiments of the present disclosure previously described.
To implement the above embodiments, the present disclosure also proposes a computer program product, in which instructions, when executed by a processor, implement the slide generation method as described in the foregoing embodiments.
Although embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure, and that changes, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present disclosure.

Claims (12)

1. A data encryption query method is characterized by comprising the following steps:
acquiring data to be encrypted, encrypting the data to be encrypted according to preset linear encryption parameters, and generating encrypted target data;
receiving a range query instruction, and acquiring a first field value and a second field value, wherein the first field value and the second field value are used for determining a query range;
and calculating the first field value and the second field value according to the linear encryption parameters to obtain mapped query parameters, and determining a range query result according to the query parameters and the target data.
2. The method according to claim 1, wherein the type of the data to be encrypted is an integer, and the encrypting the data to be encrypted according to the preset linear encryption parameter to generate the encrypted target data comprises:
determining the encrypted target data by the following formula:
and f (x) ax + b, wherein x is the data to be encrypted, a and b are the linear encryption parameters, and f (x) is the target data.
3. The method according to claim 1, wherein the type of the data to be encrypted is a floating point number, the encrypting the data to be encrypted according to a preset linear encryption parameter includes:
converting the data to be encrypted into integers according to a preset conversion factor;
and encrypting the converted data according to the linear encryption parameters to generate encrypted target data.
4. The method according to claim 1, wherein the type of the data to be encrypted is a character string, the encrypting the data to be encrypted according to a preset linear encryption parameter includes:
presetting a corresponding relation between a character string and an integer, and converting the data to be encrypted into the integer according to the corresponding relation;
and encrypting the converted data according to the linear encryption parameters to generate encrypted target data.
5. The method of claim 1, after generating the encrypted target data, further comprising:
receiving a query instruction, and acquiring data to be queried;
and calculating the data to be inquired according to the linear encryption parameters, and determining an inquiry result according to a calculation result and the target data.
6. A data encryption inquiry apparatus, comprising:
the encryption module is used for acquiring data to be encrypted, encrypting the data to be encrypted according to preset linear encryption parameters and generating encrypted target data;
the device comprises a receiving module, a query module and a query module, wherein the receiving module is used for receiving a range query instruction and acquiring a first field value and a second field value, and the first field value and the second field value are used for determining a query range;
and the query module is used for calculating the first field value and the second field value according to the linear encryption parameters, acquiring the mapped query parameters and determining a range query result according to the query parameters and the target data.
7. The apparatus according to claim 6, wherein the type of the data to be encrypted is an integer, and the encryption module is specifically configured to:
determining the encrypted target data by the following formula:
and f (x) ax + b, wherein x is the data to be encrypted, a and b are the linear encryption parameters, and f (x) is the target data.
8. The apparatus of claim 6, wherein the type of data to be encrypted is a floating point number, and wherein the encryption module is specifically configured to:
converting the data to be encrypted into integers according to a preset conversion factor;
and encrypting the converted data according to the linear encryption parameters to generate encrypted target data.
9. The apparatus according to claim 6, wherein the type of the data to be encrypted is a character string, and the encryption module is specifically configured to:
presetting a corresponding relation between a character string and an integer, and converting the data to be encrypted into the integer according to the corresponding relation;
and encrypting the converted data according to the linear encryption parameters to generate encrypted target data.
10. The apparatus of claim 6, further comprising:
the processing module is used for receiving the query instruction and acquiring the data to be queried;
and calculating the data to be inquired according to the linear encryption parameters, and determining an inquiry result according to a calculation result and the target data.
11. An electronic device comprising a processor and a memory;
wherein the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory for implementing the data encryption query method according to any one of claims 1 to 5.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a data encryption query method according to any one of claims 1 to 5.
CN201910968294.XA 2019-10-12 2019-10-12 Data encryption query method and device Pending CN110765238A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910968294.XA CN110765238A (en) 2019-10-12 2019-10-12 Data encryption query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910968294.XA CN110765238A (en) 2019-10-12 2019-10-12 Data encryption query method and device

Publications (1)

Publication Number Publication Date
CN110765238A true CN110765238A (en) 2020-02-07

Family

ID=69331731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910968294.XA Pending CN110765238A (en) 2019-10-12 2019-10-12 Data encryption query method and device

Country Status (1)

Country Link
CN (1) CN110765238A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581236A (en) * 2020-04-02 2020-08-25 中国邮政储蓄银行股份有限公司 Data query method and device
CN112434231A (en) * 2020-11-05 2021-03-02 北京奇艺世纪科技有限公司 Data processing method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027509A (en) * 2016-05-13 2016-10-12 成都镜杰科技有限责任公司 Cloud platform data computing method in ERP environment
CN106934030A (en) * 2016-12-08 2017-07-07 戴林 The ciphertext index method and Ku Nei encryption systems of a kind of data base-oriented encryption
CN108595554A (en) * 2018-04-11 2018-09-28 湖南大学 A kind of more range of attributes querying methods based on cloud environment
CN108768651A (en) * 2018-04-20 2018-11-06 南京搜文信息技术有限公司 That supports the inquiry of multidimensional interval range can search for public key encryption method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027509A (en) * 2016-05-13 2016-10-12 成都镜杰科技有限责任公司 Cloud platform data computing method in ERP environment
CN106934030A (en) * 2016-12-08 2017-07-07 戴林 The ciphertext index method and Ku Nei encryption systems of a kind of data base-oriented encryption
CN108595554A (en) * 2018-04-11 2018-09-28 湖南大学 A kind of more range of attributes querying methods based on cloud environment
CN108768651A (en) * 2018-04-20 2018-11-06 南京搜文信息技术有限公司 That supports the inquiry of multidimensional interval range can search for public key encryption method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
崔艳荣: "字符型密码随机加密与解密算法的设计与实现", 《计算机工程与设计》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581236A (en) * 2020-04-02 2020-08-25 中国邮政储蓄银行股份有限公司 Data query method and device
CN112434231A (en) * 2020-11-05 2021-03-02 北京奇艺世纪科技有限公司 Data processing method and device and electronic equipment
CN112434231B (en) * 2020-11-05 2023-09-08 北京奇艺世纪科技有限公司 Data processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN110634047B (en) Method and device for recommending house resources, electronic equipment and storage medium
CN110222775B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN110413812B (en) Neural network model training method and device, electronic equipment and storage medium
CN111368519B (en) Method, device, equipment and storage medium for editing online form
CN112256275B (en) Code confusion method, device, electronic equipment and medium
CN110765238A (en) Data encryption query method and device
CN110188782B (en) Image similarity determining method and device, electronic equipment and readable storage medium
CN110852720A (en) Document processing method, device, equipment and storage medium
CN111241137B (en) Data processing method, device, electronic equipment and storage medium
CN113391860B (en) Service request processing method and device, electronic equipment and computer storage medium
CN111262907B (en) Service instance access method and device and electronic equipment
CN113157695B (en) Data processing method and device, readable medium and electronic equipment
CN113420400B (en) Routing relation establishment method, request processing method, device and equipment
CN111143355B (en) Data processing method and device
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN111680754A (en) Image classification method and device, electronic equipment and computer-readable storage medium
CN111240657A (en) Method and device for generating SDK and electronic equipment
CN111782895A (en) Retrieval processing method and device, readable medium and electronic equipment
CN111597439A (en) Information processing method and device and electronic equipment
CN111753238A (en) Data mapping method and device and electronic equipment
CN110619218B (en) Method and apparatus for generating information
CN111291199B (en) Information query method and device
CN116820354B (en) Data storage method, data storage device and data storage system
CN116128415B (en) Power equipment information sending method and device, electronic equipment and computer medium
CN112668033B (en) Data processing method and device and electronic equipment

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