A method for encrypting and decrypting vector space data, a computer device, and a storage medium
By constructing character sets A and B to confuse the coordinate point order of vector space data, the confidentiality problem of vector space data during transmission and use is solved, fast encryption and decryption are achieved, and computer processing efficiency is improved.
Patent Information
- Application Number
- CN202410180667.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-18
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-02-18
AI Technical Summary
In the prior art, vector space data is poorly confidential during transmission and use, and cannot effectively protect spatial location information.
By constructing character sets A and B representing coordinate point order and type, the vector space data is randomly disrupted to form the encrypted vector space data, and decrypted using character sets A and B.
It realizes rapid encryption and decryption of vector space data, ensures data confidentiality, and improves the execution efficiency of computer computing processing.
Smart Images

Figure CN117992983B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to technical fields such as spatial data protection, urban planning, geographic information systems, big data platforms, etc., and particularly relates to a method for encrypting and decrypting vector spatial data, a computer device, and a storage medium. Background Art
[0002] Currently, whether in the field of urban planning or geographic information, the confidentiality of vector spatial data is a very important task, which is related to national security and the protection of spatial data wealth. Currently, it is a very common storage scheme to store spatial data in the form of coordinate pairs, which can be transmitted and read quickly. However, when this kind of data is transmitted and used, the confidentiality of the data is poor, and the spatial location information cannot be effectively protected. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a method for encrypting and decrypting vector spatial data, a computer device, and a storage medium. The present invention can confuse the coordinate point sequence of vector spatial data, and then realize the encryption and decryption processing of vector spatial data.
[0004] The present invention adopts the following technical solutions to solve the above technical problems:
[0005] A method for encrypting and decrypting vector spatial data based on coordinate point sequence confusion according to the present invention includes the following steps:
[0006] Step 1: Construct a character combination representing the coordinate point sequence of vector spatial data, denoted as the first character set A;
[0007] Construct a character combination representing the type of vector spatial data, denoted as the second character set B;
[0008] Step 2: Randomly shuffle the coordinate point set P of vector spatial data to obtain the shuffled coordinate point set p, and use the first character set A to represent the original correct sequence of p, denoted as the third character set a;
[0009] The type of vector spatial data is represented by the second character set B, and the obtained result is denoted as the fourth character set b;
[0010] Step 3: The encrypted vector spatial data includes the shuffled coordinate point set p, the third character set a, and the fourth character set b;
[0011] Step 4: Use the first character set A and the second character set B to perform anti-decryption processing on the encrypted vector spatial data.
[0012] As a further optimization scheme of a vector space data encryption and decryption method based on coordinate point sequence confusion according to the present invention, the construction process of the first character set A in step 1 is specifically as follows:
[0013] Step 1.1: Select a set of character elements to form the first character set A;
[0014] Step 1.2: When constructing the character elements in the first character set A each time, they need to be randomly arranged;
[0015] Step 1.3: The order of the character elements after random arrangement represents the coordinate point sequence of the vector space data.
[0016] As a further optimization scheme of a vector space data encryption and decryption method based on coordinate point sequence confusion according to the present invention, the construction process of the second character set B is specifically as follows:
[0017] Step 2.1: Select a set of character elements to form the second character set B;
[0018] Step 2.2: When constructing the character elements in the second character set B each time, they need to be randomly arranged;
[0019] Step 2.3: The order of the character elements after random arrangement represents the type of the vector space data.
[0020] As a further optimization scheme of a vector space data encryption and decryption method based on coordinate point sequence confusion according to the present invention, the character elements are uppercase and lowercase letters, numbers, special symbols or Chinese characters.
[0021] As a further optimization scheme of a vector space data encryption and decryption method based on coordinate point sequence confusion according to the present invention, the process of obtaining the third character set a is as follows:
[0022] First, randomly shuffle the coordinate point set P of the vector space data to form a shuffled coordinate point set p;
[0023] Secondly, for the correct sequence of the original coordinate points in the coordinate point set p of the vector space data, find the character element in the first character set A whose character element serial number is this correct sequence, and record it as the character element f corresponding to each coordinate point in the coordinate point set P of the vector space data;
[0024] Finally, sequentially take out the character element f corresponding to each coordinate point in the coordinate point set P of the vector space data, and combine them in order to form the third character set a;
[0025] If the vector space data has only one coordinate point, several character elements not belonging to the character elements in the first character set A are randomly added to the third character set a.
[0026] As a further optimization solution of the vector space data encryption and decryption method based on coordinate point sequence confusion described in the present invention, the process of obtaining the fourth character set b is as follows:
[0027] First, select the character element L corresponding to the second character set B for the vector space data;
[0028] Secondly, configure a set of character element sets that are not included in the second character set B and L, and jointly form the fourth character set b representing the type of vector space data.
[0029] As a further optimization solution of the vector space data encryption and decryption method based on coordinate point sequence confusion described in the present invention, step 4 is specifically as follows:
[0030] Step 4.1: Use the first character set A to determine the bit sequence W of each character element in the third character set a; among them, the character elements that do not belong to the third character set a are not processed;
[0031] Step 4.2: Then adjust the bit sequence of the coordinate points in p according to the bit sequence result of W to form a correct set of vector space data coordinate points;
[0032] Step 4.3: Extract the characters in the fourth character set b that are character elements in the second character set B, and determine the type of vector space data according to the type of vector element represented by each character element in the second character set B.
[0033] As a further optimization solution of the vector space data encryption and decryption method based on coordinate point sequence confusion described in the present invention, the vector space data is the vector space data of urban planning land parcels.
[0034] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the vector space data encryption and decryption method based on coordinate point sequence confusion described in any one of the above.
[0035] A computer-readable storage medium stores a computer program thereon, and when the program is executed by a processor, it implements the vector space data encryption and decryption method based on coordinate point sequence confusion described in any one of the above.
[0036] Compared with the prior art, the present invention adopts the above technical solutions and has the following technical effects:
[0037] (1) The present invention provides a vector space data encryption and decryption method based on coordinate point sequence confusion, which can quickly encrypt and decrypt vector space data through the control of the order of characters;
[0038] (2) Based on the coordinate point sequence confusion processing of vector spatial data, the present invention proposes a method for encrypting and decrypting vector spatial data based on coordinate point sequence confusion.
[0039] (3) When the present invention is actually calculated and processed by a computer, it has a relatively fast running speed, which can ensure that the present invention has a high execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a schematic diagram of the overall process of the present invention.
[0041] Figure 2 is a schematic diagram of the first character set A.
[0042] Figure 3 is a schematic diagram of the second character set B.
[0043] Figure 4 is an example schematic diagram of a set of coordinate point sets.
[0044] Figure 5 is an example schematic diagram of the coordinate point set after being randomly shuffled.
[0045] Figure 6 is a schematic diagram of the process of converting the randomly shuffled coordinate point set into a character set.
[0046] Figure 7 is a schematic diagram of the process of converting into a character set in the case of only a single coordinate point.
[0047] Figure 8 is a schematic diagram of the process of converting the type of vector spatial data into a character set.
[0048] Figure 9 is a schematic diagram of the decryption process of the coordinate point sequence.
[0049] Figure 10 is a schematic diagram of the decryption process of the type of vector spatial data. DETAILED DESCRIPTION OF THE INVENTION
[0050] The technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings:
[0051] In technical fields such as urban planning management and geographic information, many achievements are vector spatial data, such as data for urban planning land plots and land use surveys of land and resources. These data often require strong security and confidentiality requirements to be used. Therefore, it is necessary to encrypt and decrypt these data for use in a computer network environment.
[0052] The core of vector space data consists of a set of coordinate pairs. If the order of these coordinate pairs is randomly scrambled, a certain level of data confidentiality can be achieved. Meanwhile, to better protect the encrypted file, the file used for decryption is divided into two parts. The first part represents the correct order of the coordinate pairs of vector space data using other character codes; the other part is a set of characters that can parse the order of the character codes in the first part. When decrypting, it is only necessary to restore the order of the coordinate pairs of vector space data to the correct order. Therefore, an important innovation of the present invention is to achieve encryption and decryption through the scrambling of the order of coordinate pairs of vector space data. At the same time, the adjustment of the order and the identification of the order bit numbers are relatively fast in actual computer calculations, ensuring that the present invention has a high execution efficiency.
[0053] Vector space data is often saved and transmitted in the form of a set of coordinate points currently, which facilitates the fast application of spatial data. Also, due to its relatively unified text format, it is convenient for programs on different computer terminals to use vector space data.
[0054] Step 1, refer to the appendix Figure 1 , first, construct a set of character combinations representing the order of coordinate points of vector space data, denoted as the first character set A;
[0055] Step 1.1, select a set of character elements to form the first character set A; the character elements are uppercase and lowercase letters, numbers, special symbols, or Chinese characters.
[0056] Step 1.2, when constructing the first character set A each time, the character elements should be randomly arranged;
[0057] Step 1.3, the order of the character elements after random arrangement represents the order of coordinate points of vector space data.
[0058] Refer to the appendix Figure 2 , the character element "a" represents the coordinate point order 1 of vector space data;
[0059] The character element "d" represents the coordinate point order 2 of vector space data;
[0060] The character element "c" represents the coordinate point order 3 of vector space data;
[0061] The character element "f" represents the coordinate point order 4 of vector space data;
[0062] The character element "2" represents the coordinate point order 5 of vector space data;
[0063] The character element "q" represents the coordinate point order 6 of vector space data;
[0064] The character element "*" represents the coordinate point sequence number 7 of the vector spatial data;
[0065] Step 2: Construct a set of character combinations representing the types of vector spatial data, denoted as the second character set B;
[0066] Step 2.1: Select a set of character elements to form the second character set B;
[0067] Step 2.2: When constructing the character elements in the second character set B each time, they should be randomly arranged;
[0068] The order of the character elements after random arrangement represents the type of vector spatial data.
[0069] See the appendix Figure 3 , the sequence number 1 of the character element "x" represents the point type of the vector spatial data;
[0070] The sequence number 2 of the character element "y" represents the line type of the vector spatial data;
[0071] The sequence number 3 of the character element "z" represents the surface type of the vector spatial data;
[0072] Step 3: Randomly shuffle the coordinate point set P of the vector spatial data to obtain the shuffled coordinate point set p, and use the first character set A to represent the original correct sequence number of p, denoted as the third character set a;
[0073] Step 3.1: Randomly shuffle the coordinate point set P of the vector spatial data to form the shuffled coordinate point set p;
[0074] See the appendix Figure 4 , the vector spatial data composed of 6 points has a line type;
[0075] See the appendix Figure 5 , after random shuffling, the order of the original 6 points has changed.
[0076] Step 3.2: For the original correct sequence number of the coordinate points in the coordinate point set p of the vector spatial data, find the character element in the first character set A whose character element sequence number is this correct sequence number, denoted as the character element f corresponding to each coordinate point in the coordinate point set P of the vector spatial data;
[0077] Step 3.3: Successively take out the character element f corresponding to each coordinate point in the coordinate point set P of the vector spatial data, and combine them in order to form the third character set a;
[0078] See the appendix Figure 6, since the character element "2" represents the coordinate point order 5 of the vector space data, and the first point after the random shuffling process was originally the point with order 5, the character element "2" can be used to represent the correct order of the first point after the random shuffling process. By analogy, the final character set a is "2cdfaq";
[0079] Step 3.4: If the vector space data has only one coordinate point, then several characters that do not belong to the character elements in the first character set A are randomly added to the third character set a.
[0080] See the appendix Figure 7 , in the case of only one point, 2 character elements "m" and "n" are added to confuse; among them, "m" and "n" do not belong to the first character set A.
[0081] Step 4: The type of the vector space data is represented by the second character set B, and the obtained result is recorded as the fourth character set b;
[0082] Step 4.1: Select the corresponding character element L in the second character set B for the vector space data;
[0083] Step 4.2: Configure a set of character elements that are not included in the second character set B and combine them with L to jointly form the fourth character set b that represents the type of the vector space data.
[0084] See the appendix Figure 8 , the character element "y" represents the type of the vector element in this example. At the same time, 2 character elements "s" and "d" are added to confuse; among them, "s" and "d" do not belong to the second character set B.
[0085] Step 5: The encrypted vector space data includes the set of coordinate points p after the shuffling process, the third character set a, and the fourth character set b;
[0086] Step 6: Use the first character set A and the second character set B to perform the decryption process on the encrypted vector space data. Step 6.1: Use the first character set A to determine the order W of each character element in the third character set a; among them, the character elements that do not belong to the third character set a are not processed;
[0087] Step 6.2: Then adjust the order of the coordinate points in p according to the order result of W to form the correct set of coordinate points of the vector space data;
[0088] See the appendix Figure 9, according to the arrangement sequence of each character element of "2cdfaq" in the third character set a in the first character set A, the actual sequence of the coordinate points of the vector space data after random shuffling is determined, and its sequence is "532416" in turn. According to this sequence, by rearranging the sequence of the coordinate points of the vector space data after random shuffling, the correct sequence of the coordinate points of the original vector space data can be obtained.
[0089] Step 6.3: Extract the characters in the fourth character set b that are character elements in the second character set B, and determine the type of the vector space data according to the type of vector element represented by each character element in the second character set B.
[0090] See Appendix Figure 10 , first, judge which character elements in the fourth character set b are character elements in the character set. It can be found that only the character element "y" belongs to it, and the type of the vector space data represented by the character element "y" is a line. Thus, finally, the type of the vector space data in this example can be decrypted as a line.
[0091] As described above, it is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention.
Claims
1. A method for encrypting and decrypting vector spatial data based on coordinate point sequence confusion, characterized in that, It includes the following steps: Step 1: Construct a set of character combinations representing the coordinate point sequence of vector spatial data, denoted as the first character set A; Construct a set of character combinations representing the type of vector spatial data, denoted as the second character set B; Step 2: Randomly shuffle the set of coordinate points P of the vector spatial data to obtain the shuffled set of coordinate points p, and use the first character set A to represent the original correct sequence of p, denoted as the third character set a; The type of vector spatial data is represented by the second character set B, and the obtained result is denoted as the fourth character set b; Step 3: The encrypted vector spatial data includes the shuffled set of coordinate points p, the third character set a, and the fourth character set b; Step 4: Use the first character set A and the second character set B to perform decryption processing on the encrypted vector spatial data; The process of obtaining the third character set a is as follows: First, randomly shuffle the set of coordinate points P of the vector spatial data to form the shuffled set of coordinate points p; Secondly, for the correct sequence of the original coordinate points in the set of coordinate points p of the vector spatial data, find the character element in the first character set A whose character element sequence number is this correct sequence, denoted as the character element f corresponding to each coordinate point in the set of coordinate points P of the vector spatial data; Finally, sequentially take out the character element f corresponding to each coordinate point in the set of coordinate points P of the vector spatial data, and combine them in order to form the third character set a; If the vector spatial data has only one coordinate point, then several character elements not belonging to the first character set A are randomly added to the third character set a.
2. A method for encrypting and decrypting vector spatial data based on coordinate point sequence confusion according to claim 1, characterized in that, The construction process of the first character set A in Step 1 is specifically as follows: Step 1.1: Select a set of character elements to form the first character set A; Step 1.2: When constructing the first character set A each time, the character elements need to be randomly arranged; Step 1.3: The order of the character elements after random arrangement represents the coordinate point sequence of the vector spatial data.
3. A method for encrypting and decrypting vector spatial data based on coordinate point sequence confusion according to claim 1, characterized in that, The construction process of the second character set B is specifically as follows: Step 2.1: Select a set of character elements to form the second character set B; Step 2.2: When constructing the second character set B each time, the character elements need to be randomly arranged; Step 2.3: The order of the character elements after random arrangement represents the type of vector spatial data.
4. A method for encrypting and decrypting vector spatial data based on coordinate point sequence confusion according to claim 2 or 3, characterized in that The character elements are uppercase and lowercase letters, numbers, special symbols or Chinese characters.
5. A method for encrypting and decrypting vector spatial data based on coordinate point sequence confusion according to claim 1, characterized in that The process of obtaining the fourth character set b is as follows: First, select the corresponding character element L in the second character set B for the vector spatial data; Secondly, configure a set of character elements not included in the second character set B and combine them with L to jointly form the fourth character set b representing the type of vector spatial data.
6. A method for encrypting and decrypting vector spatial data based on coordinate point sequence confusion according to claim 1, characterized in that, Step 4 is specifically as follows: Step 4.1: Use the first character set A to determine the sequence W of each character element in the third character set a; among them, the character elements not belonging to the third character set a are not processed; Step 4.2: Then adjust the sequence of the coordinate points in p according to the sequence result of W to form the correct set of coordinate points of the vector spatial data; Step 4.3: Extract the characters in the fourth character set b that are character elements in the second character set B, and determine the type of vector spatial data according to the type of vector element represented by each character element in the second character set B.
7. A method for encrypting and decrypting vector spatial data based on coordinate point sequence confusion according to claim 1, characterized in that, The vector spatial data is the vector spatial data of urban planning land parcels.
8. A computer device, characterized in that, It includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements a method for encrypting and decrypting vector spatial data based on coordinate point order confusion described in any one of the above claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements a method for encrypting and decrypting vector spatial data based on coordinate point order confusion described in any one of claims 1-7.
Citation Information
Patent Citations
Vector data network transmission local encryption and decryption method based on multistage spatial index
CN113901159A