CN112989365B - Data processing method, device, equipment and storage medium - Google Patents

Data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112989365B
CN112989365B CN201911292075.0A CN201911292075A CN112989365B CN 112989365 B CN112989365 B CN 112989365B CN 201911292075 A CN201911292075 A CN 201911292075A CN 112989365 B CN112989365 B CN 112989365B
Authority
CN
China
Prior art keywords
data
geographic coordinate
coordinate data
preprocessed
quotient
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
CN201911292075.0A
Other languages
Chinese (zh)
Other versions
CN112989365A (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.)
China Mobile Communications Group Co Ltd
China Mobile Group Tianjin Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Tianjin 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 China Mobile Communications Group Co Ltd, China Mobile Group Tianjin Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201911292075.0A priority Critical patent/CN112989365B/en
Publication of CN112989365A publication Critical patent/CN112989365A/en
Application granted granted Critical
Publication of CN112989365B publication Critical patent/CN112989365B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Storage Device Security (AREA)
  • Time Recorders, Dirve Recorders, Access Control (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the application discloses a data processing method, a device, equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data, preprocessing the first geographic coordinate data by utilizing a plurality of second geographic coordinate data in the encrypted auxiliary data, converting the preprocessed first geographic coordinate data into a plurality of characteristic data by utilizing preset numerical values in the encrypted auxiliary data through a quotient obtaining processing mode and a remainder obtaining processing mode, and generating ciphertext data corresponding to the first geographic coordinate data according to each characteristic data. According to the embodiment of the application, the geographic coordinate data to be encrypted can be simply and quickly encrypted, and the problem that the existing data encryption algorithm is complex in implementation process is solved.

Description

Data processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, apparatus, device, and storage medium.
Background
In the present society, geographic coordinate data is widely applied in many industries, and particularly for the communication industry, longitude and latitude information of a base station site is always regarded as important basic information by operators, and the data accuracy and the confidentiality during data transmission are more and more emphasized. At present, when geographical coordinate data are transmitted, the geographical coordinate data are mostly encrypted in a coordinate system shifting and horizontal rotating mode, and the method is adopted to encrypt the geographical coordinate data in a WGS-84 original coordinate system and a GCJ-02 coordinate system. However, such an encryption algorithm has a problem of a complicated implementation process.
Disclosure of Invention
The embodiment of the application provides a data processing method, a data processing device, data processing equipment and a storage medium, which can simply and quickly encrypt geographical coordinate data to be encrypted and solve the problem that the existing data encryption algorithm is complex in implementation process.
In order to solve the technical problem, the embodiment of the application adopts the following technical scheme:
an embodiment of the present application provides a data processing method, including:
acquiring first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data; the encrypted auxiliary data comprises a plurality of second geographic coordinate data and a preset value, and the geographic position corresponding to the first geographic coordinate data is located in a geographic range formed by the plurality of second geographic coordinate data;
preprocessing the first geographic coordinate data by utilizing the plurality of second geographic coordinate data according to a preset data preprocessing rule to obtain preprocessed first geographic coordinate data;
based on the preset numerical value, converting the preprocessed first geographic coordinate data into a plurality of characteristic data in a manner of quotient-taking processing and remainder-taking processing;
and generating ciphertext data corresponding to the first geographic coordinate data according to the characteristic data.
Another embodiment of the present application provides a data processing apparatus, including:
the data acquisition module is used for acquiring first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data; the encrypted auxiliary data comprises a plurality of second geographic coordinate data and a preset numerical value, and the geographic position corresponding to the first geographic coordinate data is located in a geographic range formed by the plurality of second geographic coordinate data;
the preprocessing module is used for preprocessing the first geographic coordinate data by utilizing the plurality of second geographic coordinate data according to a preset data preprocessing rule to obtain preprocessed first geographic coordinate data;
the quotient and remainder taking module is used for converting the preprocessed first geographic coordinate data into a plurality of feature data in a quotient taking processing and remainder taking processing mode based on the preset numerical value;
and the ciphertext generating module is used for generating ciphertext data corresponding to the first geographic coordinate data according to the characteristic data.
Another embodiment of the present application provides a data processing apparatus, including: a processor; and a memory arranged to store computer executable instructions which, when executed, cause the processor to carry out the steps of the data processing method described above.
Another embodiment of the present application provides a storage medium for storing computer-executable instructions, which when executed, implement the steps of the data processing method described above.
In the embodiment of the application, first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data are obtained, then the first geographic coordinate data are preprocessed by utilizing a plurality of second geographic coordinate data in the encrypted auxiliary data, the preprocessed first geographic coordinate data are converted into a plurality of characteristic data in a quotient obtaining processing and remainder obtaining processing mode based on preset numerical values in the encrypted auxiliary data, and finally ciphertext data corresponding to the first geographic coordinate data are generated according to the characteristic data. Therefore, through the embodiment of the application, the ciphertext data corresponding to the first geographic coordinate data can be obtained based on various simple data processing modes such as data preprocessing, quotient obtaining processing and remainder obtaining processing, so that the geographic coordinate data to be encrypted can be simply and quickly encrypted, and the problem that the existing data encryption algorithm is complex in implementation process is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of first geographic coordinate data and second geographic coordinate data provided in an embodiment of the present application;
FIG. 3 is a schematic flow chart of a cyclic quotient derivation process according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a data processing method according to another embodiment of the present application;
fig. 5 is a schematic flowchart illustrating a process of solving the preprocessed first geographic coordinate data according to an embodiment of the present application;
fig. 6 is a schematic block diagram of a data processing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a data processing 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 technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
An embodiment of the present application provides a data processing method, which can be applied to a server side and executed by the server. Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present application, and as shown in fig. 1, the flow chart includes the following steps:
step S102, acquiring first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data; the encrypted auxiliary data comprises a plurality of second geographic coordinate data and a preset numerical value, and the geographic position corresponding to the first geographic coordinate data is located in a geographic range formed by the plurality of second geographic coordinate data;
step S104, preprocessing the first geographic coordinate data by utilizing a plurality of second geographic coordinate data according to a preset data preprocessing rule to obtain preprocessed first geographic coordinate data;
step S106, based on the preset numerical value, converting the preprocessed first geographic coordinate data into a plurality of characteristic data in a manner of quotient-taking processing and remainder-taking processing;
and S108, generating ciphertext data corresponding to the first geographic coordinate data according to the characteristic data.
In the embodiment of the application, first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data are obtained, then the first geographic coordinate data are preprocessed by utilizing a plurality of second geographic coordinate data in the encrypted auxiliary data, the preprocessed first geographic coordinate data are converted into a plurality of characteristic data in a quotient obtaining processing and remainder obtaining processing mode based on preset numerical values in the encrypted auxiliary data, and finally ciphertext data corresponding to the first geographic coordinate data are generated according to the characteristic data. Therefore, through the embodiment of the application, the ciphertext data corresponding to the first geographic coordinate data can be obtained based on various simple data processing modes such as data preprocessing, quotient obtaining processing and remainder obtaining processing, so that the geographic coordinate data to be encrypted can be simply and quickly encrypted, and the problem that the existing data encryption algorithm is complex in implementation process is solved.
In this embodiment, the geographic coordinate data may be longitude and latitude data, or may be coordinate data based on a preset coordinate system, which is not limited herein. In the step S102, after the first geographic coordinate data to be encrypted is obtained, the encryption auxiliary data corresponding to the first geographic coordinate data is also obtained. The encryption auxiliary data includes a plurality of second geographic coordinate data and a preset value. The plurality of second geographic coordinate data can form a geographic range, and the geographic position corresponding to the first geographic coordinate data is located in the geographic range. The preset value may be, for example, 21, 31, 41, etc. The preset value can be set according to the requirement.
Fig. 2 is a schematic diagram of first geographic coordinate data and second geographic coordinate data provided in an embodiment of the present application, in a specific embodiment, the number of the second geographic coordinate data is 4, and the second geographic coordinate data are respectively: (longitude 116.67400, latitude 38.53132), (longitude 116.67400, latitude 40.28164), (longitude 118.11221, latitude 38.53132), (longitude 118.11221, latitude 40.28164). The four second geographic coordinate data form a quadrilateral geographic area, and the first geographic coordinate data are as follows: (longitude 117.23405, latitude 38.99803), and the geographic position corresponding to the first geographic coordinate data is located inside the geographic area of the quadrangle.
After the first geographic coordinate data to be encrypted and the encrypted auxiliary data corresponding to the first geographic coordinate data are obtained, in step S104, the first geographic coordinate data are preprocessed by using a plurality of second geographic coordinate data in the encrypted auxiliary data according to a preset data preprocessing rule, so as to obtain preprocessed first geographic coordinate data. In this embodiment, the first geographic coordinate data and the second geographic coordinate data both include first dimension data and second dimension data, for example, the first geographic coordinate data and the second geographic coordinate data are both longitude and latitude data, or both are two-dimensional coordinate data in the same preset coordinate system. Based on this, the specific process of step S104 includes:
(a1) selecting first target data with the minimum value and second target data with the maximum value from a plurality of first dimensional data included in a plurality of second geographic coordinate data, and selecting third target data with the minimum value from a plurality of second dimensional data included in a plurality of second geographic coordinate data;
(a2) performing data unit normalization processing on the first geographic coordinate data, the first target data, the second target data and the third target data;
(a3) calculating a first difference value between second dimension data in the normalized first geographic coordinate data and normalized third target data, calculating a second difference value between the normalized second target data and the normalized first target data, and calculating a third difference value between the first dimension data in the normalized first geographic coordinate data and the normalized first target data;
(a4) and obtaining the preprocessed first geographic coordinate data according to the first difference, the second difference and the third difference.
First, through the above-described operation (a1), the first target data having the smallest value and the second target data having the largest value are selected from the plurality of first dimensional data included in the plurality of second geographic coordinate data, and the third target data having the smallest value is selected from the plurality of second dimensional data included in the plurality of second geographic coordinate data. In the above example, the second geographic coordinate data are: (longitude 116.67400, latitude 38.53132), (longitude 116.67400, latitude 40.28164), (longitude 118.11221, latitude 38.53132), (longitude 118.11221, latitude 40.28164). If the first dimension data is longitude data and the second dimension data is latitude data, the first target data is 116.67400, the second target data is 118.11221, and the third target data is 38.53132 through the above operation (a 1).
Secondly, considering that the first geographic coordinate data and the second geographic coordinate data both include first dimension data and second dimension data, and the first dimension data and the second dimension data both may include decimal points, which is inconvenient for calculation, the data unit normalization processing is performed on the first geographic coordinate data, the first target data, the second target data, and the third target data through the above-mentioned action (a 2). In the above example, the first geographic coordinate data is: (longitude 117.23405, latitude 38.99803), the first target data is 116.67400, the second target data is 118.11221, and the third target data is 38.53132. In this example, the first geographical coordinate data, the first target data, the second target data, and the third target data are each enlarged by 10 ten thousand times to eliminate decimal points by unit normalization. After normalization, the first geographic coordinate data is: (first dimension data 11723405, second dimension data 3899803), the first target data is 11667400, the second target data is 11811221, and the third target data is 3853132.
Then, in the above-mentioned action (a3), a first difference value between the second dimension data in the normalized first geographic coordinate data and the normalized third target data is calculated, a second difference value between the normalized second target data and the normalized first target data is calculated, and a third difference value between the first dimension data in the normalized first geographic coordinate data and the normalized first target data is calculated. In the above example, the first difference is calculated as (3899803-. In this embodiment, the difference between the two values may be set to be a positive value obtained by subtracting a smaller value from a larger value.
Finally, in the act (a4), preprocessed first geographical coordinate data is obtained according to the first difference, the second difference, and the third difference. Assuming that the preprocessed first geographic coordinate data is num, in this embodiment, num may be set as the first difference a, the second difference B and the third difference C, and then, in the following example, the preprocessed first geographic coordinate data num is (3899803-.
After the preprocessed first geographic coordinate data num is obtained through calculation, in the step S106, the preprocessed first geographic coordinate data is converted into a plurality of feature data through a quotient obtaining process and a remainder obtaining process based on the preset numerical value. The step may specifically be:
(b1) taking the preprocessed first geographic coordinate data as a divisor, taking a preset numerical value as a dividend, calculating a quotient obtaining result of the divisor relative to the dividend in a quotient obtaining processing mode, and judging whether the value of the quotient obtaining result is smaller than the preset numerical value or not;
(b2) if not, updating the divisor by using the quotient obtaining result, continuously calculating the quotient obtaining result of the divisor relative to the dividend, returning to the step of judging whether the value of the quotient obtaining result is smaller than the preset numerical value or not, circularly executing until the value of the quotient obtaining result is smaller than the preset numerical value, and recording the quotient obtaining result smaller than the preset numerical value as the quotient obtaining result generated at the last time;
(b3) and taking the preprocessed first geographic coordinate data and each quotient obtaining result as a divisor, taking a preset numerical value as a dividend, respectively calculating the remainder obtaining results of each divisor relative to the dividend in a remainder obtaining processing mode, and taking the remainder obtaining results as characteristic data.
Fig. 3 is a schematic flowchart of a cyclic quotient obtaining process according to an embodiment of the present application, and as shown in fig. 3, the process specifically includes: step S302, using the preprocessed first geographic coordinate data as a divisor, using a preset numerical value as a dividend, calculating a quotient result of the divisor with respect to the dividend, and then performing step S304. In step S304, it is determined whether the quotient obtaining result is smaller than a predetermined value, and if not, step S306 is executed. In step S306, the divisor is updated by the quotient result, the quotient result of the divisor relative to the dividend is continuously calculated, and the step S304 is executed again, until the value of the quotient result is smaller than the preset value, step S308 is executed, the quotient result smaller than the preset value is recorded as the quotient result generated at the last time, and then the process is ended and the quotient obtaining process is stopped. Specifically, the divisor is updated by using the quotient result, and the quotient result is used as the updated divisor.
For convenience of explanation, the above example is continued, in the above example, where the preprocessed first geographic coordinate data num is 6712325896, and assuming that the preset value in this example is 31, the specific quotient process is: the quotient obtaining process of 6712325896 is performed by using 31, that is, 6712325896 performs quotient obtaining with respect to 31, the obtained quotient obtaining result is 216526641, since 216526641 is greater than 31, 216526641 continues quotient obtaining with respect to 31, and 6984730 is obtained, since 6984730 is greater than 31, the quotient obtaining process with respect to 31 is continuously performed until the quotient obtaining result is less than 31, the quotient obtaining result less than the preset value of 31 is recorded as the quotient obtaining result generated at the last time, and the flow is ended and the quotient obtaining process is stopped. In this flow, the quotient result generated last time is less than 31.
After the quotient obtaining process is performed for a plurality of times, through the above action (b3), the preprocessed first geographic coordinate data and each quotient obtaining result are used as divisors, the preset numerical value is used as dividends, the remainder obtaining results of each divisor relative to the dividends are respectively calculated through the manner of the remainder obtaining process, and the remainder obtaining results are used as feature data.
In the above example, the preprocessed first geographic coordinate data num is 6712325896, in this example, the preset value is 31, first, a remainder is performed on 6712325896 by 31, that is, a remainder is performed on 6712325896 with respect to 31 to obtain 25, then, a remainder is performed on 216526641 by 31, that is, a remainder is performed on 216526641 with respect to 31 to obtain 11, then, a remainder is performed on 6984730 by 31, that is, a remainder is performed on 6984730 with respect to 31 to obtain 27, and the steps are sequentially performed until a remainder is performed on 31 by using the last generated quotient result, and since the last generated quotient result is smaller than the preset value 31, the last generated quotient result is equal to the last generated remainder result.
Since there is a chronological order in generating the quotient result through the above-described actions (b1) to (b3), the quotient result may be sequentially subjected to remainder processing in accordance with the chronological order, and the remainder processing may be preferentially performed on the preprocessed first geographical coordinate data. For example, in the above example, the surplus processing may be preferentially performed on the preprocessed first geographic coordinate data, and then the surplus processing may be sequentially performed on each quotient result according to the sequence of the generation time of each quotient result, so as to determine the sequence of the generation time of each surplus result, where the sequence of the generation time of each surplus result is the sequence of the generation time of each feature data.
After the remainder processing is completed, each remainder result is used as feature data to obtain a plurality of feature data, and further, in step S108, ciphertext data corresponding to the first geographic coordinate data is generated according to each feature data. The method specifically comprises the following steps:
(c1) acquiring a character corresponding relation table; the character corresponding relation table records a plurality of predetermined natural numbers and ciphertext characters corresponding to each natural number; the values of a plurality of natural numbers are sequentially increased by 1 from 0, and the maximum value of the plurality of natural numbers is equal to the value obtained by subtracting 1 from the preset value;
(c2) converting each feature data into a corresponding ciphertext character according to a character corresponding relation table;
(c3) and generating ciphertext data corresponding to the first geographic coordinate data based on each ciphertext character obtained through conversion.
In this embodiment, a character correspondence table is pre-established, and the character correspondence table is configured to convert each feature data into a corresponding ciphertext character, that is, convert each remainder taking result into a corresponding ciphertext character, where each remainder taking result is a remainder taking result relative to a preset numerical value, so that each remainder taking result is greater than or equal to 0 and less than or equal to the preset numerical value minus 1, and each remainder taking result is a positive number, so that values of a plurality of natural numbers recorded in the character correspondence table are sequentially incremented by 1 from 0, and a maximum value of the plurality of natural numbers is equal to a value obtained by subtracting 1 from the preset numerical value. Meanwhile, the corresponding relation table of characters also records the corresponding cipher text characters of each natural number. In the above example, the preset value is 31, and the character mapping table is as follows:
TABLE 1
Ming dynasty 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Secret key O I Z 3 4 S 6 7 8 9 A B C D E F
Ming dynasty 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Secret key G H J K L M N P Q R T V W X Y
Table 1 is a schematic diagram of a character correspondence table according to an embodiment of the present application. As shown in fig. 1, ciphertext characters corresponding to the remainder 0-30 are shown.
The character correspondence table can express the effect of updating the key by forming a new correspondence by converting the order of correspondence of characters, for example, converting 23 to P and 24 to Q, and converting 23 to Q and 24 to P. Moreover, the character corresponding relation table is easy to store and realize in a computer system, no redundant resource is consumed, and the safety of ciphertext data is enhanced through the disordered sequence after conversion.
When generating the character corresponding relation table, the confusable numbers and letters can be removed, which comprises the following steps:
"numeral 0" and "letter O", excluding "numeral 0"; i.e. the letter O replaces the number 0;
the number 1 and the letter I are removed, and the number 1 is removed; i.e. the number 1 is replaced by the letter I;
the number 2 and the letter Z are removed, and the number 2 is removed; i.e. the letter Z replaces the number 2;
the number 5 and the letter S are removed, and the number 5 is removed; i.e. the number 5 is replaced by the letter S;
the letter U and the letter V are eliminated; namely, the letter V is adopted by the letter U and the letter V;
therefore, the final result formed by the encryption coding has confusion resistance, the difficulty for memorizing and recording is reduced, and errors are not easy to occur.
In the above-described operation (c2), each feature data (i.e., each remainder result) is converted into a corresponding ciphertext character according to the character correspondence table. In the ciphertext character conversion, the conversion may be performed according to the generation time sequence of each remainder result, and the arrangement sequence of each ciphertext character is determined according to the generation time sequence of each remainder result, for example, in the above example, the first remainder result is 25, the character is converted into R, the second remainder result is 11, the character is converted into B, the third remainder result is 27, the character is converted into V, and the arrangement sequence of each ciphertext character from left to right is set as RBV. In the above example, the complete ciphertext character obtained by conversion is: RBVSEH 7.
In the above example, the surplus processing may be preferentially performed on the preprocessed first geographic coordinate data, and then the surplus processing may be sequentially performed on each quotient result according to the sequence of the generation time of each quotient result, so as to determine the sequence of the generation time of each surplus result. In the above example, the remaining 7 times can be taken to obtain 7-bit ciphertext characters, if the geographic range corresponding to the second geographic coordinate data is larger, the number of ciphertext characters can be obtained more, and the precision of the geographic range which can be represented by the ciphertext characters obtained through conversion is the same as that of the first geographic coordinate data, and is 1 meter.
(c3) And generating ciphertext data corresponding to the first geographic coordinate data based on each ciphertext character obtained through conversion.
In act (c3), each of the ciphertext characters obtained by the conversion may be directly used as ciphertext data corresponding to the first geographical coordinate data. For example, in the above example, it is determined that the ciphertext characters obtained by conversion are arranged from left to right or from right to left according to the time sequence of the first generation and the second generation of the remainder result, and the arranged ciphertext characters are used as ciphertext data corresponding to the first geographical coordinate data, for example, RBVSEH7 or 7HESVBR is used as ciphertext data corresponding to the first geographical coordinate data in the above example. Or, on the basis of the completion of ciphertext permutation, generating ciphertext data corresponding to the first geographic coordinate data in a manner of increasing segmentation identifiers every other preset bit character, for example, generating RBVS-EH7 as ciphertext data, or generating 7HES-VBR as ciphertext data. The ciphertext data can be conveniently memorized and input by adding the segmentation identification, so that the accuracy of data transmission is ensured in the process of transmitting the ciphertext data.
Through the steps S102 to S108, the ciphertext data corresponding to the first geographic coordinate data is obtained. In the above process, the ciphertext data is determined and obtained mainly by means of data quotient taking processing and data remainder taking processing. When the first geographic coordinate data comprises the decimal point rear multi-bit number, through the process, a series of data with the decimal point rear multi-bit number can be converted into a series of ciphertext data, so that the readability of the data is improved, and the method is fundamentally different from a data encryption technology utilizing coordinate system offset and rotation. Meanwhile, the data acquisition quotient processing and the data acquisition remainder processing are computer operations which are easy to realize and understand in the field of computers, have strong operability and can be realized without very strong computing power, so that the whole encryption algorithm is easier to realize in a computer system. The data quoting process and the data remainder process are also called rounding process and modulus process in the computer system.
In this embodiment, the plurality of second geographic coordinate data are used to preprocess the first geographic coordinate data, which is a first duplicate data encryption process, based on the preset numerical value, the preprocessed first geographic coordinate data are converted into the plurality of feature data in a manner of quotient-taking processing and remainder-taking processing, which is a second duplicate data encryption process, the feature data are converted by using the character correspondence table, which is a third duplicate encryption process, the converted ciphertext characters are arranged and the separators are added, which is a fourth duplicate encryption process, and by using the multiple encryption process, the confidentiality and the anti-hacking performance of the data can be effectively improved.
Fig. 4 is a schematic flowchart of a data processing method according to another embodiment of the present application, and as shown in fig. 4, on the basis of fig. 1, the flowchart further includes the following steps:
step S110, deciphering ciphertext data corresponding to the first geographic coordinate data to obtain each feature data;
step S112, based on each feature data and the preset numerical value, calculating in a product and sum mode to obtain preprocessed first geographic coordinate data;
and step S114, according to a preset data reverse preprocessing rule, utilizing a plurality of second geographic coordinate data to perform reverse processing on the preprocessed first geographic coordinate data to obtain the first geographic coordinate data to be encrypted.
In the step S110, the ciphertext data corresponding to the first geographic coordinate data is decrypted to obtain each feature data, that is, each remainder result obtained by each remainder processing is obtained. In one case, each ciphertext character obtained by the conversion is directly used as ciphertext data corresponding to the first geographic coordinate data, in this case, each ciphertext character obtained by the conversion is obtained from the ciphertext data corresponding to the first geographic coordinate data, and each ciphertext character is converted by using the character correspondence table to obtain each feature data. For example, the ciphertext data corresponding to the first geographic coordinate data is RBVSEH7, and RBVSEH7 is converted according to the correspondence table, so as to obtain each feature data.
In another case, the ciphertext data corresponding to the first geographic coordinate data includes each ciphertext character obtained by the conversion and the division identifier located between the ciphertext characters, in this case, the division identifier is removed from the ciphertext data corresponding to the first geographic coordinate data to obtain each remaining ciphertext character, and then each remaining ciphertext character is converted by using the character correspondence table to obtain each piece of feature data. For example, the ciphertext data corresponding to the first geographic coordinate data is RBVS-EH7, the segmentation identifier "-" is removed, and then RBVSEH7 is converted according to the correspondence table, so as to obtain each feature data.
In the step S112, based on each feature data and the preset value, the operation is performed in a product-sum-summing manner to obtain the preprocessed first geographic coordinate data, which specifically includes:
(d1) according to the sequence of the generation time of each feature data from back to front, the feature data generated last and the feature data generated last time are obtained, the last feature data is multiplied by a preset numerical value, the obtained product is added with the feature data generated last time, and a sum value is obtained;
(d2) judging whether feature data which is not acquired exists or not, if so, acquiring feature data generated again in the previous time, multiplying the sum by a preset numerical value, and adding the obtained product to the feature data generated again in the previous time to update the sum;
(d3) and returning to the step of judging whether the feature data which is not acquired exists or not, executing in a circulating manner until the feature data which is not acquired does not exist, and taking the sum value obtained by final updating as the preprocessed first geographical coordinate data.
Fig. 5 is a schematic flowchart of a process for solving the preprocessed first geographic coordinate data according to an embodiment of the present application, where as shown in fig. 5, the process specifically includes: step S502, according to the sequence of the generation time of each feature data from back to front, the last generated feature data and the feature data generated at the previous time are obtained, the last feature data is multiplied by a preset numerical value, the obtained product is added with the feature data generated at the previous time to obtain a sum value, then step S504 is executed to judge whether feature data which is not obtained exists, if the feature data exists, step S506 is executed to obtain feature data generated at the previous time, the sum value is multiplied by the preset numerical value, the obtained product is added with the feature data generated at the previous time to update the sum value, step S504 is executed to return to after step S506 is executed, if the judgment result of step S504 is not existed, step S508 is executed to take the finally updated sum value as the first geographical coordinate data after the preprocessing, and finally the process is ended.
First, in act (d1), the feature data generated last and the feature data generated last are acquired in the order of generation time of each feature data (feature data, i.e., each of the above-described remainder results). In the above example, the ciphertext data corresponding to the first geographic coordinate data is RBVSEH7, and each ciphertext character is converted according to the character correspondence table, so that each remainder result obtained by each remainder processing, that is, each feature data can be obtained, where the feature data generated last and the feature data generated last are 7 and 17, respectively, where 7 corresponds to "7" in the ciphertext data, and 17 corresponds to "H" in the ciphertext data. Then, the final feature data is multiplied by a preset value, and the obtained product is added to the previous feature data to obtain a sum, and in the above example, 7 × 31+17 is calculated as 234.
It should be noted that, in the above example, the surplus processing may be preferentially performed on the preprocessed first geographic coordinate data, and then the surplus processing may be sequentially performed on each quotient result according to the sequence of the generation time of each quotient result, so as to determine the sequence of the generation time of each surplus result, where the sequence of the generation time of each surplus result is the sequence of the generation time of each feature data.
Then, in the above-described operation (d2), it is determined whether or not there is any feature data that has not been acquired, and if there is any feature data that has not been acquired, the feature data that has been generated again before is acquired, the sum value is multiplied by a preset numerical value, and the sum value is updated by adding the obtained product to the feature data that has been generated again before. In the above example, the feature data generated again in the previous time is 14, and 14 corresponds to "E" in the ciphertext data, the calculation process is as follows: 234 × 31+14 is 7268, 7268 is the updated sum.
Finally, by the above-described operation (d3), the step of returning to the step of determining whether or not there is any feature data that has not been acquired is executed in a loop until there is no feature data that has not been acquired, and the sum value obtained by the final update is used as the preprocessed first geographical coordinate data, in the above example, the preprocessed first geographical coordinate data obtained by the final calculation is 6712325896.
At this point, the preprocessed first geographic coordinate data is restored according to the ciphertext data corresponding to the first geographic coordinate data, and then, in step S114, the preprocessed first geographic coordinate data is subjected to inverse processing by using a plurality of second geographic coordinate data according to a preset data inverse preprocessing rule, so as to obtain the first geographic coordinate data to be encrypted.
The specific process of step S114 is:
(e1) selecting first target data with the minimum value and second target data with the maximum value from a plurality of first dimension data included in a plurality of second geographic coordinate data, and selecting third target data with the minimum value from a plurality of second dimension data included in a plurality of second geographic coordinate data;
(e2) performing data unit normalization processing on the preprocessed first geographic coordinate data, the preprocessed first target data, the preprocessed second target data and the preprocessed third target data;
(e3) taking the normalized first geographic coordinate data as a divisor, taking a difference value between the normalized second target data and the normalized first target data as a dividend, and calculating a quotient obtaining result and a remainder obtaining result of the divisor relative to the dividend;
(e4) and obtaining second dimension data in the first geographic coordinate data to be encrypted according to the quotient result and the normalized third target data, and obtaining first dimension data in the first geographic coordinate data to be encrypted according to the remainder result and the normalized first target data.
The process of the above-described action (e1) is the same as that of the above-described action (a1), and is not repeated here. In the above-mentioned action (e2), the preprocessed first geographical coordinate data, first target data, second target data, and third target data are normalized by data units, for example, if the preprocessed first geographical coordinate data is 6712325896, the first target data is 116.67400, the second target data is 118.11221, and the third target data is 38.53132, the first target data, the second target data, and the third target data are all enlarged by 10 ten thousand times, so as to obtain the normalized first geographical coordinate data of 6712325896, the normalized first target data of 11667400, the normalized second target data of 11811221, and the normalized third target data of 3853132.
In the above-described operation (e3), the normalized first geographical coordinate data is subjected to the quotient obtaining process and the remainder obtaining process, respectively, using the difference between the normalized second target data and the normalized first target data. For the above example, the difference between the normalized second target data and the normalized first target data is first calculated as (11811221-: 6712325896 the quotient 46671 of (11811221-: 6712325896 for (11811221-. In this embodiment, when the first latitude data is longitude data and the second latitude data is latitude data, the quotient result may be called a latitude difference, and the remainder result may be called a longitude difference.
In the action (e4), the second dimension data in the first geographic coordinate data to be encrypted is obtained according to the quotient obtaining result obtained by the quotient obtaining process and the normalized third target data. For example, in the above example, the quotient result and the normalized third target data are added, and the sum is subjected to inverse normalization processing to obtain the second-dimension data in the first geographic coordinate data to be encrypted, where the second-dimension data in the first geographic coordinate data to be encrypted is, for example, 46671+3853132 is 3899803, and after the inverse normalization processing, the second-dimension data in the first geographic coordinate data to be encrypted is 389.9803. And obtaining first dimension data in the first geographic coordinate data to be encrypted according to the remainder result obtained by the remainder processing and the normalized first target data. For example, in the above example, the remainder result obtained by the remainder processing is added to the normalized first target data, and the addition is subjected to inverse normalization processing to obtain the first dimension data in the first geographic coordinate data to be encrypted, for example, 56005+11667400 is 11723405, and after the inverse normalization processing, the first dimension data in the first geographic coordinate data to be encrypted is 117.23405. Since the quotient result and the remainder result are both obtained based on the normalized data result, the addition needs to be denormalized.
In summary, the present embodiment has the following beneficial effects:
(1) the local longitude and latitude information can be encrypted and converted, and encryption is completed by flexibly setting a secret key.
(2) The encryption is carried out for many times in a multiple key mode, so that the encryption degree is higher, the safety and the anti-counterfeiting performance of data are ensured in the data presentation, transmission and storage processes, and the anti-cracking performance is stronger.
(3) The method has the advantages that the simple and general algorithm is utilized to carry out quick coding, the coding is easy to realize through the programming of a computer system, the core algorithm adopts the circular residue-taking and quotient-taking operation, and the calculation expense is greatly saved.
(4) When the longitude and latitude data are encrypted, the encrypted and converted longitude and latitude data are not two numbers recorded to five digits after decimal point, but a string of short codes, and the precision of 1 meter can be usually achieved.
(5) By reasonably increasing the interval symbols (namely the segmentation marks), the encrypted codes are easier to memorize.
(6) In the character setting, the confusable characters are removed as far as possible, and the confusable characters are not easy to lose in the memory and recording process.
Fig. 6 is a schematic block diagram of a data processing apparatus according to an embodiment of the present application, and as shown in fig. 6, the apparatus includes:
the data acquisition module 61 is configured to acquire first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data; the encrypted auxiliary data comprises a plurality of second geographic coordinate data and a preset numerical value, and the geographic position corresponding to the first geographic coordinate data is located in a geographic range formed by the plurality of second geographic coordinate data;
the preprocessing module 62 is configured to preprocess the first geographic coordinate data by using the plurality of second geographic coordinate data according to a preset data preprocessing rule, so as to obtain the preprocessed first geographic coordinate data;
a quotient and remainder taking module 63, configured to convert the preprocessed first geographic coordinate data into a plurality of feature data in a quotient taking and remainder taking manner based on the preset numerical value;
and a ciphertext generating module 64, configured to generate ciphertext data corresponding to the first geographic coordinate data according to each feature data.
Optionally, the first geographic coordinate data and the second geographic coordinate data each comprise first dimension data and second dimension data; the preprocessing module 62 is specifically configured to: selecting first target data with the minimum value and second target data with the maximum value from a plurality of first dimensional data included in the plurality of second geographic coordinate data, and selecting third target data with the minimum value from a plurality of second dimensional data included in the plurality of second geographic coordinate data; performing data unit normalization processing on the first geographic coordinate data, the first target data, the second target data and the third target data; calculating a first difference value between second dimension data in the normalized first geographic coordinate data and the normalized third target data, calculating a second difference value between the normalized second target data and the normalized first target data, and calculating a third difference value between the first dimension data in the normalized first geographic coordinate data and the normalized first target data; and obtaining the preprocessed first geographic coordinate data according to the first difference, the second difference and the third difference.
Optionally, the quotient and remainder module 63 is specifically configured to: taking the preprocessed first geographic coordinate data as a divisor, taking the preset numerical value as a dividend, calculating a quotient obtaining result of the divisor relative to the dividend in a quotient obtaining processing mode, and judging whether the value of the quotient obtaining result is smaller than the preset numerical value or not; if not, updating the divisor by using the quotient obtaining result, continuously calculating the quotient obtaining result of the divisor relative to the dividend, returning to the step of judging whether the value of the quotient obtaining result is smaller than the preset numerical value or not, circularly executing until the value of the quotient obtaining result is smaller than the preset numerical value, and recording the quotient obtaining result smaller than the preset numerical value as a last generated quotient obtaining result; taking the preprocessed first geographic coordinate data and each quotient taking result as divisors, taking the preset numerical value as dividends, respectively calculating the remainder taking results of the divisors relative to the dividends in a manner of remainder taking processing, and taking the remainder taking results as the feature data.
Optionally, the ciphertext generating module 64 is specifically configured to: acquiring a character corresponding relation table; the character corresponding relation table records a plurality of predetermined natural numbers and ciphertext characters corresponding to each natural number; the values of the natural numbers are sequentially increased by 1 from 0, and the maximum value of the natural numbers is equal to the value obtained by subtracting 1 from the preset value; converting each feature data into the corresponding ciphertext character according to the character corresponding relation table; and generating ciphertext data corresponding to the first geographic coordinate data based on each ciphertext character obtained through conversion.
Optionally, the apparatus further comprises: the deciphering module is used for deciphering the ciphertext data to obtain each characteristic data; the operation module is used for performing operation in a product and sum mode based on the feature data and the preset numerical value to obtain the preprocessed first geographic coordinate data; and the anti-preprocessing module is used for performing anti-processing on the preprocessed first geographic coordinate data by using the plurality of second geographic coordinate data according to a preset data anti-preprocessing rule to obtain the first geographic coordinate data to be encrypted.
Optionally, the operation module is specifically configured to: according to the sequence of the generation time of each feature data from the back to the front, the feature data generated last and the feature data generated last time are obtained, the last feature data is multiplied by the preset numerical value, and the obtained product is added with the feature data generated last time to obtain a sum value; judging whether the feature data which is not acquired exists or not, if so, acquiring the feature data generated again in the previous time, multiplying the sum by the preset numerical value, and adding the obtained product to the feature data generated again in the previous time to update the sum; and returning to the step of judging whether the feature data which is not acquired exists or not, executing in a circulating manner until the feature data which is not acquired does not exist, and taking the sum value obtained by final updating as the first geographical coordinate data after preprocessing.
Optionally, the first geographic coordinate data and the second geographic coordinate data each comprise first dimension data and second dimension data; the anti-preprocessing module is specifically configured to: selecting first target data with the minimum value and second target data with the maximum value from a plurality of first dimensional data included in the plurality of second geographic coordinate data, and selecting third target data with the minimum value from a plurality of second dimensional data included in the plurality of second geographic coordinate data; performing data unit normalization processing on the preprocessed first geographic coordinate data, the preprocessed first target data, the preprocessed second target data and the preprocessed third target data; taking the normalized first geographic coordinate data as a divisor, taking a difference value between the normalized second target data and the normalized first target data as a dividend, and calculating a quotient taking result and a remainder taking result of the divisor relative to the dividend; and obtaining the second dimension data in the first geographic coordinate data to be encrypted according to the quotient obtaining result and the normalized third target data, and obtaining the first dimension data in the first geographic coordinate data to be encrypted according to the remainder obtaining result and the normalized first target data.
In the embodiment of the application, first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data are obtained, then the first geographic coordinate data are preprocessed by utilizing a plurality of second geographic coordinate data in the encrypted auxiliary data, the preprocessed first geographic coordinate data are converted into a plurality of characteristic data in a quotient obtaining processing and remainder obtaining processing mode based on preset numerical values in the encrypted auxiliary data, and finally ciphertext data corresponding to the first geographic coordinate data are generated according to the characteristic data. Therefore, through the embodiment of the application, the ciphertext data corresponding to the first geographic coordinate data can be obtained based on various simple data processing modes such as data preprocessing, quotient obtaining processing and remainder obtaining processing, so that the geographic coordinate data to be encrypted can be simply and quickly encrypted, and the problem that the existing data encryption algorithm is complex in implementation process is solved.
It should be noted that the data processing apparatus in this embodiment can implement the respective flows of the foregoing data processing method, and achieve the same functions and effects, which are not repeated here.
Further, an embodiment of the present application further provides a data processing apparatus, and fig. 7 is a schematic structural diagram of the data processing apparatus provided in the embodiment of the present application, as shown in fig. 7, the apparatus includes: memory 701, processor 702, bus 703, and communication interface 704. The memory 701, processor 702, and communication interface 704 communicate via bus 703. the communication interface 704 may include input and output interfaces including, but not limited to, a keyboard, mouse, display, microphone, and the like.
In fig. 7, the memory 701 has stored thereon computer-executable instructions executable on the processor 702, and when executed by the processor 702, the computer-executable instructions implement the following procedures:
acquiring first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data; the encrypted auxiliary data comprises a plurality of second geographic coordinate data and a preset numerical value, and the geographic position corresponding to the first geographic coordinate data is located in a geographic range formed by the plurality of second geographic coordinate data;
preprocessing the first geographic coordinate data by utilizing the plurality of second geographic coordinate data according to a preset data preprocessing rule to obtain preprocessed first geographic coordinate data;
based on the preset numerical value, converting the preprocessed first geographic coordinate data into a plurality of characteristic data in a manner of quotient-taking processing and remainder-taking processing;
and generating ciphertext data corresponding to the first geographic coordinate data according to the characteristic data.
Optionally, the computer executable instructions, when executed by the processor, each of the first and second geographic coordinate data comprises first and second dimensional data; according to a preset data preprocessing rule, preprocessing the first geographic coordinate data by using the plurality of second geographic coordinate data to obtain preprocessed first geographic coordinate data, and the method comprises the following steps:
selecting first target data with the minimum value and second target data with the maximum value from a plurality of first dimensional data included in the plurality of second geographic coordinate data, and selecting third target data with the minimum value from a plurality of second dimensional data included in the plurality of second geographic coordinate data;
performing data unit normalization processing on the first geographic coordinate data, the first target data, the second target data and the third target data;
calculating a first difference value between second dimension data in the normalized first geographic coordinate data and the normalized third target data, calculating a second difference value between the normalized second target data and the normalized first target data, and calculating a third difference value between the first dimension data in the normalized first geographic coordinate data and the normalized first target data;
and obtaining the preprocessed first geographic coordinate data according to the first difference, the second difference and the third difference.
Optionally, when executed by the processor, the computer-executable instructions convert the preprocessed first geographic coordinate data into a plurality of feature data by way of quotient-taking processing and remainder-taking processing based on the preset numerical value, and include:
taking the preprocessed first geographic coordinate data as a divisor, taking the preset numerical value as a dividend, calculating a quotient obtaining result of the divisor relative to the dividend in a quotient obtaining processing mode, and judging whether the value of the quotient obtaining result is smaller than the preset numerical value or not;
if not, updating the divisor by using the quotient obtaining result, continuously calculating the quotient obtaining result of the divisor relative to the dividend, returning to the step of judging whether the value of the quotient obtaining result is smaller than the preset numerical value or not, circularly executing until the value of the quotient obtaining result is smaller than the preset numerical value, and recording the quotient obtaining result smaller than the preset numerical value as a last generated quotient obtaining result;
taking the preprocessed first geographic coordinate data and each quotient obtaining result as a divisor, taking the preset numerical value as a dividend, respectively calculating the remainder obtaining result of each divisor relative to the dividend in a remainder obtaining processing mode, and taking the remainder obtaining result as the feature data.
Optionally, when executed by the processor, the computer-executable instructions generate ciphertext data corresponding to the first geographic coordinate data according to each piece of feature data, and include:
acquiring a character corresponding relation table; the character corresponding relation table records a plurality of predetermined natural numbers and ciphertext characters corresponding to each natural number; the values of the natural numbers are sequentially increased by 1 from 0, and the maximum value of the natural numbers is equal to the value obtained by subtracting 1 from the preset value;
converting each feature data into the corresponding ciphertext character according to the character corresponding relation table;
and generating ciphertext data corresponding to the first geographic coordinate data based on each ciphertext character obtained through conversion.
Optionally, when the computer-executable instructions are executed by the processor, the method further comprises:
cracking the ciphertext data to obtain each feature data;
calculating in a product and sum mode based on each feature data and the preset numerical value to obtain the preprocessed first geographic coordinate data;
and according to a preset data reverse preprocessing rule, utilizing the plurality of second geographic coordinate data to perform reverse processing on the preprocessed first geographic coordinate data to obtain the first geographic coordinate data to be encrypted.
Optionally, when executed by the processor, the computer-executable instructions perform operations in a product-sum summation manner based on the feature data and the preset numerical value, so as to obtain the preprocessed first geographic coordinate data, including:
according to the sequence of the generation time of each feature data from back to front, the feature data generated last and the feature data generated last time are obtained, the last feature data is multiplied by the preset numerical value, the obtained product is added with the feature data generated last time, and a sum value is obtained;
judging whether the feature data which is not acquired exists or not, if so, acquiring the feature data generated again in the previous time, multiplying the sum by the preset numerical value, and adding the obtained product to the feature data generated again in the previous time to update the sum;
and returning to the step of judging whether the feature data which is not acquired exists or not, executing in a circulating manner until the feature data which is not acquired does not exist, and taking the sum value obtained by final updating as the preprocessed first geographical coordinate data.
Optionally, the computer executable instructions, when executed by the processor, each of the first and second geographic coordinate data comprises first and second dimensional data; according to a preset data inverse preprocessing rule, inversely processing the preprocessed first geographic coordinate data by using the plurality of second geographic coordinate data to obtain the first geographic coordinate data to be encrypted, and the method comprises the following steps:
selecting first target data with the minimum value and second target data with the maximum value from a plurality of first dimensional data included in the plurality of second geographic coordinate data, and selecting third target data with the minimum value from a plurality of second dimensional data included in the plurality of second geographic coordinate data;
performing data unit normalization processing on the preprocessed first geographic coordinate data, the preprocessed first target data, the preprocessed second target data and the preprocessed third target data;
taking the normalized first geographic coordinate data as a divisor, taking a difference value between the normalized second target data and the normalized first target data as a dividend, and calculating a quotient taking result and a remainder taking result of the divisor relative to the dividend;
and obtaining the second dimension data in the first geographic coordinate data to be encrypted according to the quotient obtaining result and the normalized third target data, and obtaining the first dimension data in the first geographic coordinate data to be encrypted according to the remainder obtaining result and the normalized first target data.
In the embodiment of the application, first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data are obtained, then the first geographic coordinate data are preprocessed by utilizing a plurality of second geographic coordinate data in the encrypted auxiliary data, the preprocessed first geographic coordinate data are converted into a plurality of characteristic data in a quotient obtaining processing and remainder obtaining processing mode based on preset numerical values in the encrypted auxiliary data, and finally ciphertext data corresponding to the first geographic coordinate data are generated according to the characteristic data. Therefore, through the embodiment of the application, the ciphertext data corresponding to the first geographic coordinate data can be obtained based on various simple data processing modes such as data preprocessing, quotient taking processing and remainder taking processing, so that the geographic coordinate data to be encrypted can be simply and quickly encrypted, and the problem that the existing data encryption algorithm is complex in implementation process is solved.
It should be noted that the data processing apparatus in this embodiment can implement each flow of the foregoing data processing method and achieve the same functions and effects, which are not repeated here.
Further, another embodiment of the present specification also provides a computer-readable storage medium for storing computer-executable instructions, which when executed by a processor implement the following process:
acquiring first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data; the encrypted auxiliary data comprises a plurality of second geographic coordinate data and a preset numerical value, and the geographic position corresponding to the first geographic coordinate data is located in a geographic range formed by the plurality of second geographic coordinate data;
preprocessing the first geographic coordinate data by utilizing the plurality of second geographic coordinate data according to a preset data preprocessing rule to obtain preprocessed first geographic coordinate data;
based on the preset numerical value, converting the preprocessed first geographic coordinate data into a plurality of characteristic data in a manner of quotient-taking processing and remainder-taking processing;
and generating ciphertext data corresponding to the first geographic coordinate data according to the characteristic data.
Optionally, the computer executable instructions, when executed by a processor, the first and second geographic coordinate data each comprise first and second dimensional data; according to a preset data preprocessing rule, preprocessing the first geographic coordinate data by using the plurality of second geographic coordinate data to obtain the preprocessed first geographic coordinate data, and the method comprises the following steps:
selecting first target data with the minimum value and second target data with the maximum value from a plurality of first dimensional data included in the plurality of second geographic coordinate data, and selecting third target data with the minimum value from a plurality of second dimensional data included in the plurality of second geographic coordinate data;
performing data unit normalization processing on the first geographic coordinate data, the first target data, the second target data and the third target data;
calculating a first difference value between second dimension data in the normalized first geographic coordinate data and the normalized third target data, calculating a second difference value between the normalized second target data and the normalized first target data, and calculating a third difference value between the first dimension data in the normalized first geographic coordinate data and the normalized first target data;
and obtaining the preprocessed first geographic coordinate data according to the first difference, the second difference and the third difference.
Optionally, when executed by the processor, the computer-executable instructions convert the preprocessed first geographic coordinate data into a plurality of feature data by way of quotient and remainder processing based on the preset numerical value, and include:
taking the preprocessed first geographic coordinate data as a divisor, taking the preset numerical value as a dividend, calculating a quotient obtaining result of the divisor relative to the dividend in a quotient obtaining processing mode, and judging whether the value of the quotient obtaining result is smaller than the preset numerical value or not;
if not, updating the divisor by using the quotient obtaining result, continuously calculating the quotient obtaining result of the divisor relative to the dividend, returning to the step of judging whether the value of the quotient obtaining result is smaller than the preset numerical value or not, circularly executing until the value of the quotient obtaining result is smaller than the preset numerical value, and recording the quotient obtaining result smaller than the preset numerical value as the quotient obtaining result generated at the last time;
taking the preprocessed first geographic coordinate data and each quotient obtaining result as a divisor, taking the preset numerical value as a dividend, respectively calculating the remainder obtaining result of each divisor relative to the dividend in a remainder obtaining processing mode, and taking the remainder obtaining result as the feature data.
Optionally, when executed by a processor, the computer-executable instructions generate ciphertext data corresponding to the first geographic coordinate data according to each piece of feature data, and include:
acquiring a character corresponding relation table; the character corresponding relation table records a plurality of predetermined natural numbers and ciphertext characters corresponding to each natural number; the values of the natural numbers are sequentially increased by 1 from 0, and the maximum value of the natural numbers is equal to the value obtained by subtracting 1 from the preset value;
converting each feature data into the corresponding ciphertext character according to the character corresponding relation table;
and generating ciphertext data corresponding to the first geographic coordinate data based on each ciphertext character obtained through conversion.
Optionally, when the computer executable instructions are executed by a processor, the method further comprises:
cracking the ciphertext data to obtain each feature data;
calculating in a product and sum mode based on each feature data and the preset numerical value to obtain the preprocessed first geographic coordinate data;
and according to a preset data reverse preprocessing rule, utilizing the plurality of second geographic coordinate data to perform reverse processing on the preprocessed first geographic coordinate data to obtain the first geographic coordinate data to be encrypted.
Optionally, when being executed by the processor, the computer-executable instructions perform operations in a product-sum summation manner based on the feature data and the preset numerical value, so as to obtain the preprocessed first geographic coordinate data, where the operations include:
according to the sequence of the generation time of each feature data from the back to the front, the feature data generated last and the feature data generated last time are obtained, the last feature data is multiplied by the preset numerical value, and the obtained product is added with the feature data generated last time to obtain a sum value;
judging whether the feature data which is not acquired exists or not, if so, acquiring the feature data generated again in the previous time, multiplying the sum by the preset numerical value, and adding the obtained product to the feature data generated again in the previous time to update the sum;
and returning to the step of judging whether the feature data which is not acquired exists or not, executing in a circulating manner until the feature data which is not acquired does not exist, and taking the sum value obtained by final updating as the preprocessed first geographical coordinate data.
Optionally, the computer executable instructions, when executed by a processor, the first and second geographic coordinate data each comprise first and second dimensional data; according to a preset data inverse preprocessing rule, the preprocessed first geographic coordinate data are inversely processed by the plurality of second geographic coordinate data, and the first geographic coordinate data to be encrypted are obtained, and the method comprises the following steps:
selecting first target data with the minimum value and second target data with the maximum value from a plurality of first dimensional data included in the plurality of second geographic coordinate data, and selecting third target data with the minimum value from a plurality of second dimensional data included in the plurality of second geographic coordinate data;
performing data unit normalization processing on the preprocessed first geographic coordinate data, the preprocessed first target data, the preprocessed second target data and the preprocessed third target data;
taking the normalized first geographic coordinate data as a divisor, taking a difference value between the normalized second target data and the normalized first target data as a dividend, and calculating a quotient taking result and a remainder taking result of the divisor relative to the dividend;
and obtaining the second dimensional data in the first geographic coordinate data to be encrypted according to the quotient result and the normalized third target data, and obtaining the first dimensional data in the first geographic coordinate data to be encrypted according to the remainder result and the normalized first target data.
In the embodiment of the application, first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data are obtained, then the first geographic coordinate data are preprocessed by utilizing a plurality of second geographic coordinate data in the encrypted auxiliary data, the preprocessed first geographic coordinate data are converted into a plurality of characteristic data in a quotient obtaining processing and remainder obtaining processing mode based on preset numerical values in the encrypted auxiliary data, and finally ciphertext data corresponding to the first geographic coordinate data are generated according to the characteristic data. Therefore, through the embodiment of the application, the ciphertext data corresponding to the first geographic coordinate data can be obtained based on various simple data processing modes such as data preprocessing, quotient obtaining processing and remainder obtaining processing, so that the geographic coordinate data to be encrypted can be simply and quickly encrypted, and the problem that the existing data encryption algorithm is complex in implementation process is solved.
It should be noted that the storage medium in this embodiment can implement the respective flows of the foregoing data processing method and achieve the same functions and effects, which are not repeated here.
The computer-readable storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (9)

1. A data processing method, comprising:
acquiring first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data; the encrypted auxiliary data comprises a plurality of second geographic coordinate data and a preset numerical value, and the geographic position corresponding to the first geographic coordinate data is located in a geographic range formed by the plurality of second geographic coordinate data;
preprocessing the first geographic coordinate data by utilizing the plurality of second geographic coordinate data according to a preset data preprocessing rule to obtain preprocessed first geographic coordinate data;
based on the preset numerical value, converting the preprocessed first geographic coordinate data into a plurality of characteristic data in a manner of quotient-taking processing and remainder-taking processing;
generating ciphertext data corresponding to the first geographic coordinate data according to the characteristic data;
the first geographic coordinate data and the second geographic coordinate data both comprise first dimension data and second dimension data; according to a preset data preprocessing rule, preprocessing the first geographic coordinate data by using the plurality of second geographic coordinate data to obtain the preprocessed first geographic coordinate data, and the method comprises the following steps:
selecting first target data with the minimum value and second target data with the maximum value from a plurality of first dimensional data included in the plurality of second geographic coordinate data, and selecting third target data with the minimum value from a plurality of second dimensional data included in the plurality of second geographic coordinate data;
performing data unit normalization processing on the first geographic coordinate data, the first target data, the second target data and the third target data;
calculating a first difference value between second dimension data in the normalized first geographic coordinate data and the normalized third target data, calculating a second difference value between the normalized second target data and the normalized first target data, and calculating a third difference value between the first dimension data in the normalized first geographic coordinate data and the normalized first target data;
and obtaining the preprocessed first geographic coordinate data according to the first difference, the second difference and the third difference.
2. The method according to claim 1, wherein converting the preprocessed first geographic coordinate data into a plurality of feature data by way of a quotient process and a remainder process based on the preset numerical value comprises:
taking the preprocessed first geographic coordinate data as a divisor, taking the preset numerical value as a dividend, calculating a quotient obtaining result of the divisor relative to the dividend in a quotient obtaining processing mode, and judging whether the value of the quotient obtaining result is smaller than the preset numerical value or not;
if not, updating the divisor by using the quotient obtaining result, continuously calculating the quotient obtaining result of the divisor relative to the dividend, returning to the step of judging whether the value of the quotient obtaining result is smaller than the preset numerical value or not, circularly executing until the value of the quotient obtaining result is smaller than the preset numerical value, and recording the quotient obtaining result smaller than the preset numerical value as the quotient obtaining result generated at the last time;
taking the preprocessed first geographic coordinate data and each quotient taking result as divisors, taking the preset numerical value as dividends, respectively calculating the remainder taking results of the divisors relative to the dividends in a manner of remainder taking processing, and taking the remainder taking results as the feature data.
3. The method according to claim 1, wherein generating ciphertext data corresponding to the first geographic coordinate data according to each feature data comprises:
acquiring a character corresponding relation table; the character corresponding relation table records a plurality of predetermined natural numbers and ciphertext characters corresponding to each natural number;
converting each feature data into the corresponding ciphertext character according to the character corresponding relation table;
and generating ciphertext data corresponding to the first geographic coordinate data based on each ciphertext character obtained through conversion.
4. The method according to any one of claims 1 to 3, further comprising:
cracking the ciphertext data to obtain each feature data;
calculating in a product and sum mode based on each feature data and the preset numerical value to obtain the preprocessed first geographic coordinate data;
and according to a preset data reverse preprocessing rule, utilizing the plurality of second geographic coordinate data to perform reverse processing on the preprocessed first geographic coordinate data to obtain the first geographic coordinate data to be encrypted.
5. The method according to claim 4, wherein performing an operation by a product-sum summation based on each of the feature data and the preset value to obtain the preprocessed first geographic coordinate data comprises:
according to the sequence of the generation time of each feature data from back to front, the feature data generated last and the feature data generated last time are obtained, the last feature data is multiplied by the preset numerical value, the obtained product is added with the feature data generated last time, and a sum value is obtained;
judging whether the feature data which is not acquired exists or not, if so, acquiring the feature data generated again in the previous time, multiplying the sum by the preset numerical value, and adding the obtained product to the feature data generated again in the previous time to update the sum;
and returning to the step of judging whether the feature data which is not acquired exists or not, executing in a circulating manner until the feature data which is not acquired does not exist, and taking the sum value obtained by final updating as the first geographical coordinate data after preprocessing.
6. The method of claim 4, wherein the first geographic coordinate data and the second geographic coordinate data each comprise first dimensional data and second dimensional data; according to a preset data inverse preprocessing rule, inversely processing the preprocessed first geographic coordinate data by using the plurality of second geographic coordinate data to obtain the first geographic coordinate data to be encrypted, and the method comprises the following steps:
selecting first target data with the minimum value and second target data with the maximum value from a plurality of first dimensional data included in the plurality of second geographic coordinate data, and selecting third target data with the minimum value from a plurality of second dimensional data included in the plurality of second geographic coordinate data;
performing data unit normalization processing on the preprocessed first geographic coordinate data, the preprocessed first target data, the preprocessed second target data and the preprocessed third target data;
taking the normalized first geographic coordinate data as a divisor, taking a difference value between the normalized second target data and the normalized first target data as a dividend, and calculating a quotient taking result and a remainder taking result of the divisor relative to the dividend;
and obtaining the second dimension data in the first geographic coordinate data to be encrypted according to the quotient obtaining result and the normalized third target data, and obtaining the first dimension data in the first geographic coordinate data to be encrypted according to the remainder obtaining result and the normalized first target data.
7. A data processing apparatus, comprising:
the data acquisition module is used for acquiring first geographic coordinate data to be encrypted and encrypted auxiliary data corresponding to the first geographic coordinate data; the encrypted auxiliary data comprises a plurality of second geographic coordinate data and a preset numerical value, and the geographic position corresponding to the first geographic coordinate data is located in a geographic range formed by the plurality of second geographic coordinate data;
the preprocessing module is used for preprocessing the first geographic coordinate data by utilizing the plurality of second geographic coordinate data according to a preset data preprocessing rule to obtain the preprocessed first geographic coordinate data;
the quotient and remainder taking module is used for converting the preprocessed first geographic coordinate data into a plurality of feature data in a quotient taking processing and remainder taking processing mode based on the preset numerical value;
the ciphertext generating module is used for generating ciphertext data corresponding to the first geographic coordinate data according to the feature data;
the first geographic coordinate data and the second geographic coordinate data both comprise first dimension data and second dimension data; the preprocessing module is specifically configured to: selecting first target data with the minimum value and second target data with the maximum value from a plurality of first dimensional data included in the plurality of second geographic coordinate data, and selecting third target data with the minimum value from a plurality of second dimensional data included in the plurality of second geographic coordinate data; performing data unit normalization processing on the first geographic coordinate data, the first target data, the second target data and the third target data; calculating a first difference value between second dimension data in the normalized first geographic coordinate data and the normalized third target data, calculating a second difference value between the normalized second target data and the normalized first target data, and calculating a third difference value between the first dimension data in the normalized first geographic coordinate data and the normalized first target data; and obtaining the preprocessed first geographic coordinate data according to the first difference, the second difference and the third difference.
8. A data processing apparatus comprising: a processor; and a memory arranged to store computer-executable instructions, wherein the computer-executable instructions, when executed, cause the processor to implement the steps of the data processing method of any of the preceding claims 1 to 6.
9. A storage medium storing computer-executable instructions, which when executed perform the steps of the data processing method of any one of claims 1 to 6.
CN201911292075.0A 2019-12-16 2019-12-16 Data processing method, device, equipment and storage medium Active CN112989365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911292075.0A CN112989365B (en) 2019-12-16 2019-12-16 Data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911292075.0A CN112989365B (en) 2019-12-16 2019-12-16 Data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112989365A CN112989365A (en) 2021-06-18
CN112989365B true CN112989365B (en) 2022-09-06

Family

ID=76343070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911292075.0A Active CN112989365B (en) 2019-12-16 2019-12-16 Data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112989365B (en)

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8942373B2 (en) * 2010-11-29 2015-01-27 Beijing Z & W Technology Consulting Co., Ltd. Data encryption and decryption method and apparatus
CN102012993B (en) * 2010-11-29 2012-07-11 北京卓微天成科技咨询有限公司 Methods and devices for selectively encrypting and decrypting data
CN106599702B (en) * 2016-12-08 2020-02-07 武汉斗鱼网络科技有限公司 File encryption and decryption method and device
EP3386141B1 (en) * 2017-04-07 2019-12-18 Bayerische Motoren Werke Aktiengesellschaft Encryption method and system for coordinates
CN107194744A (en) * 2017-06-21 2017-09-22 微梦创科网络科技(中国)有限公司 A kind of method and device for determining user place commercial circle
CN107832623B (en) * 2017-10-13 2020-05-08 微梦创科网络科技(中国)有限公司 Method and system for encrypting and decrypting coordinate track
CN108306871A (en) * 2018-01-23 2018-07-20 北京都在哪智慧城市科技有限公司 Address processing method and system, address determine method, server and terminal
CN108717422B (en) * 2018-04-23 2019-03-08 中国水产科学研究院渔业工程研究所 A kind of data processing method and device
CN109547441B (en) * 2018-11-27 2021-05-14 上海炬宏信息技术有限公司 Method for encrypting longitude and latitude coordinates

Also Published As

Publication number Publication date
CN112989365A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
US11159305B2 (en) Homomorphic data decryption method and apparatus for implementing privacy protection
Al Badawi et al. Implementation and performance evaluation of RNS variants of the BFV homomorphic encryption scheme
JP6682041B2 (en) Processing method of fully homomorphic encryption based on modulo arithmetic
CN110262773B (en) Computer data processing method and device
CN107276744B (en) File storage encryption method and system
CN106131139B (en) A kind of encryption of the floating data of cloud relational database and querying method
EP2991264B1 (en) Encrypted text matching system, method and program
Moon et al. An Efficient Encrypted Floating‐Point Representation Using HEAAN and TFHE
Zheng Modern Cryptography Volume 1: A Classical Introduction to Informational and Mathematical Principle
CN112948895A (en) Data watermark embedding method, watermark tracing method and device
CN112231718B (en) Data encryption processing method, device, computer equipment and storage medium
CN104636673A (en) Safe data storage method under big data background
CN112989365B (en) Data processing method, device, equipment and storage medium
CN111970237B (en) Encryption and decryption method, system and medium based on water depth measurement data
CN108809619B (en) Precision control and accumulative error elimination method for completely homomorphic encryption
CN113132078B (en) Block chain privacy protection method and block chain system based on homomorphism promise
CN114124469B (en) Data processing method, device and equipment
CN115529120A (en) Secret computing system
CN113515769B (en) Big data rediscovery method and device based on hidden data
CN112182593A (en) Data processing method and device and electronic equipment
JP5858938B2 (en) Calculation apparatus, calculation system, calculation method
KR20200054117A (en) Server and method for logarithm calculation of data encrypted with homomorphic encryption technique
US20240187210A1 (en) Encryption processing apparatus and encryption processing method
Aremu et al. RNS based on Shannon fano coding for data encoding and decoding using {2n-1, 2n, 2n+ 1} Moduli Sets
CN116049841B (en) Encryption method, device, equipment and medium for identity card number

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