A method, device, equipment, medium and product for vector data encryption and decryption

The vector data is grouped through quad-tree chunking and Douglas-Pook algorithm, encrypting low-frequency information and using SM4 algorithm and confusion, solving the problem of low-efficiency decryption of vector data and achieving efficient and secure data access.

CN119989389BActive Publication Date: 2025-07-22CHINESE ACAD OF SURVEYING & MAPPING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510465016.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-07-22
Estimated Expiration
2045-04-15

AI Technical Summary

Technical Problem

Existing vector data encryption methods are inefficient in decryption under large-scale data processing and high concurrency conditions, which is difficult to meet the needs of users' on-demand access, and traditional encryption methods destroy data structures or have low computing efficiency.

Method used

Quadtree chunking and Douglas-Puk algorithm are used to group vector data, combine frequency domain transformation and selective encryption, and only low-frequency information is encrypted. The DC coefficient is encrypted with the SM4 algorithm, and confusing it by scrambling the key.

Benefits of technology

While maintaining the integrity of vector data structure, it significantly improves the operation efficiency and security of encryption and decryption, supports on-demand decryption, and adapts to the high concurrent access needs of large-scale data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989389B_ABST
    Figure CN119989389B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment, medium and product for encrypting and decrypting vector data, relating to the field of vector data encryption. The method includes extracting the layer type and elements of vector data; grouping the elements with the layer type of points according to the spatial position characteristics by using a quadtree to obtain the grouping result of point elements; grouping the elements with the layer type of lines or surfaces according to the spatial distribution characteristics by using the Douglas-Peucker algorithm to obtain the grouping result of line or surface elements; performing a frequency domain transformation on the grouping result of point, line or surface elements to obtain a frequency domain matrix; encrypting the DC coefficients of the frequency domain matrix by using an encryption key, recombining the encrypted DC coefficients and AC coefficients and performing an inverse frequency domain transformation to obtain the encrypted elements after grouping; and finally performing scrambling and confusion on the encrypted elements after grouping and the unencrypted points by using a scrambling key. The present application improves the operation efficiency of data encryption and decryption while maintaining the integrity and encryption security of the vector data structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vector data encryption, and particularly to a method, device, equipment, medium and product for vector data encryption and decryption. Background Art

[0002] With the advancement of the informatization process and the upgrading of surveying and mapping equipment, the accuracy and dimension of vector data are continuously increasing, the data scale is continuously expanding, and its data value as digital assets is also getting higher and higher. However, while the popularization and generalization of this trend bring opportunities, they also face a series of data security risks. In this context, how to ensure data security in data processing activities has become one of the important factors restricting the application of geospatial data results and the development of the geographic information industry. Therefore, it is urgent to adopt effective and efficient technical means to ensure the security of vector data.

[0003] Encryption technology is an effective means to protect the copyright of vector data. During the storage or transmission of data, encryption can ensure that only legitimate users with the key can use it normally, while illegal users such as eavesdroppers or hackers without the key cannot identify or obtain this data. This measure can effectively prevent illegal users from pre-obtaining, using, copying, and spreading data, protect the copyright of vector data, and safeguard the rights and interests of data producers. Since vector data is mainly composed of coordinate data, using ordinary file streams for encryption will damage its data structure, and the decryption efficiency is also limited by the file size. Therefore, it is very necessary and urgent to study an algorithm for selectively encrypting vector data to keep the vector data structure intact and improve the running efficiency. Summary of the Invention

[0004] The purpose of the present application is to provide a method, device, equipment, medium and product for vector data encryption and decryption, which can selectively encrypt vector data, while maintaining the vector data structure and encryption security, improve the running efficiency of data encryption and decryption.

[0005] To achieve the above object, the present application provides the following solutions:

[0006] In a first aspect, the present application provides a method for encrypting vector data, including: reading the vector data and extracting the layer type of the vector data and the elements corresponding to the layer type; the layer type being point, line or surface; grouping the elements with the layer type of point according to the spatial position characteristics by quad-tree to obtain a point element grouping result; grouping the elements with the layer type of line or surface according to the spatial distribution characteristics by the Douglas-Peucker algorithm to obtain a line element grouping result or a surface element grouping result; performing a frequency domain transformation on the point element grouping result, the line element grouping result or the surface element grouping result to obtain a frequency domain matrix; encrypting the DC coefficients of the frequency domain matrix using an encryption key to obtain encrypted DC coefficients; recombining and performing an inverse frequency domain transformation on the encrypted DC coefficients and the AC coefficients of the frequency domain matrix to obtain grouped and encrypted points; performing scrambling and confusion on the grouped and encrypted elements and the unencrypted points using a scrambling key to obtain encrypted vector data; the scrambling key being derived according to the encryption key; the unencrypted points being the unencrypted points in the elements with the layer type of line or surface.

[0007] Optionally, grouping the elements with the layer type of point according to the spatial position characteristics by quad-tree to obtain a point element grouping result specifically includes: dividing the elements with the layer type of point into quad-tree blocks according to the spatial position characteristics to obtain a block result; the number of elements with the layer type of point in each leaf node of the quad-tree being less than or equal to a set number threshold; grouping the elements with the layer type of point according to the block result to obtain a point element grouping result; the number of elements in the block result being greater than 1.

[0008] Optionally, grouping the elements with the layer type of line or surface according to the spatial distribution characteristics by the Douglas-Peucker algorithm to obtain a line element grouping result or a surface element grouping result specifically includes: selecting spatial distribution characteristic points for the elements with the layer type of line or surface by the Douglas-Peucker algorithm; grouping the elements with the layer type of line or surface according to the spatial distribution characteristic points to obtain a line element grouping result or a surface element grouping result.

[0009] Optionally, select spatial distribution feature points for the elements with the layer type of line or surface by using the Douglas-Peucker algorithm, which specifically includes: for the elements with the layer type of surface, split the boundary lines in the elements into elements with the layer type of line; for the elements with the layer type of line, determine a straight line according to the start and end points of the element; calculate the distances from all points on the curve of the element with the layer type of line to the straight line; obtain the maximum distance among the distances and record the point corresponding to the maximum distance; determine whether the maximum distance is less than a set distance threshold to obtain a determination result; if the determination result is yes, connect the start and end points of the straight line as the spatial distribution feature points; if the determination result is no, retain the point corresponding to the maximum distance, and take the point corresponding to the maximum distance as the boundary to divide the curve of the element with the layer type of line into a left curve part and a right curve part; respectively determine a straight line according to the start and end points of the left curve part and the right curve part and return to the step of "calculating the distances from all points on the curve of the element with the layer type of line to the straight line".

[0010] Optionally, encrypt the DC coefficients of the frequency domain matrix by using an encryption key to obtain encrypted DC coefficients, which specifically includes: encrypt the DC coefficients of the frequency domain matrix in a reserved format by using the SM4 algorithm to obtain encrypted DC coefficients.

[0011] In a second aspect, the present application provides a method for decrypting vector data, including: reading the vector data to be decrypted and selecting a decryption area according to the vector data to be decrypted; performing inverse scrambling on the decryption area by using a scrambling key, where the scrambling key is derived and scrambled from an encryption key; identifying according to the grouped encryption identifier to obtain grouped encrypted data; performing a frequency domain transformation on the grouped encrypted data to obtain a frequency domain matrix; decrypting the DC coefficients in the frequency domain matrix by using the encryption key to obtain decrypted DC coefficients; recombining and performing an inverse frequency domain transformation on the decrypted DC coefficients and the AC coefficients of the frequency domain matrix to obtain decrypted vector data.

[0012] In a third aspect, the present application provides a vector data encryption device, including: a reading and extraction module, configured to read vector data and extract the layer type of the vector data and the elements corresponding to the layer type; the layer type being point, line or surface; a point element grouping module, configured to group the elements with the layer type of point according to the position characteristics by using a quadtree to obtain a point element grouping result; a line or surface element grouping module, configured to group the elements with the layer type of line or surface according to the spatial distribution characteristics by using the Douglas-Peucker algorithm to obtain a line element grouping result or a surface element grouping result; a frequency domain transformation module, configured to perform a frequency domain transformation on the point element grouping result, the line element grouping result or the surface element grouping result to obtain a frequency domain matrix; an encryption module, configured to encrypt the DC coefficients of the frequency domain matrix by using an encryption key to obtain encrypted DC coefficients; a recombination and inverse frequency domain transformation module, configured to recombine and perform an inverse frequency domain transformation on the encrypted DC coefficients and the AC coefficients of the frequency domain matrix to obtain grouped and encrypted elements; a scrambling module, configured to scramble and confuse the grouped and encrypted elements and the unencrypted points by using a scrambling key to obtain encrypted vector data; the scrambling key being derived according to the encryption key; the unencrypted points being the unencrypted points in the elements with the layer type of line or surface.

[0013] In a fourth aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the vector data encryption method described in any one of the above.

[0014] In a fifth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the vector data encryption method described in any one of the above.

[0015] In a sixth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the vector data encryption method described in any one of the above.

[0016] According to the specific embodiments provided by the present application, the present application has the following technical effects.

[0017] The present application provides a vector data encryption method, apparatus, device, medium and product. For elements with a layer type of line or surface, they are grouped according to spatial distribution characteristics, and elements with a layer type of point are grouped by quadtree according to spatial position characteristics. Then, frequency domain transformation is performed on all grouping results, taking into account spatial distribution characteristics and spatial position characteristics, and encrypted data is selected, improving the calculation efficiency. During the encryption process, the DC coefficients in the frequency domain matrix are encrypted, and the AC coefficients are retained, further reducing the amount of encrypted data and improving the calculation efficiency. Through selective encryption in the spatial domain and frequency domain, the spatial feature structure of the vector data and the encryption security are retained while improving the data encryption and decryption operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0019] Figure 1 It is an application environment diagram of a vector data encryption method in an embodiment of the present application.

[0020] Figure 2 It is a flowchart of a vector data encryption method provided by an embodiment of the present application.

[0021] Figure 3 It is a schematic diagram of a vector data encryption method provided by an embodiment of the present application.

[0022] Figure 4 It is a schematic diagram of a vector data decryption method provided by an embodiment of the present application.

[0023] Figure 5 It is a schematic diagram of the structure of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0025] Current mainstream cryptographic techniques include symmetric cryptographic algorithms for protecting data confidentiality, asymmetric (public key) cryptographic algorithms, and hash algorithms for verifying data integrity. Common symmetric cryptographic algorithms mainly include block cipher algorithms (such as AES, SM4, etc.) and stream cipher algorithms (such as RC4, ZUC, etc.). Public key cryptographic algorithms mainly include RSA, ECC, SM2, SM9, etc. Hash algorithms mainly include MD5, SM3, etc. Among them, block ciphers are highly efficient and can be used in various data encryption scenarios. They are the most commonly used cryptographic techniques for encrypting vector data. However, when using commercial cryptographic techniques to protect the confidentiality of vector data, due to the characteristics of large volume and complex data structure of geospatial data, the encryption and decryption efficiency problems caused by black-box and coarse-grained encryption methods are one of the reasons hindering the wide application of cryptography in the field of surveying and mapping geography information.

[0026] The chaos-based scrambling encryption algorithm can scramble the spatial positions of geographical data, destroying the neighborhood correlation and spatial orderliness of the data. And during the scrambling encryption process, it is necessary to traverse the coordinates of the original map data from beginning to end and scramble the order one by one with the key sequence to generate the encrypted vector map data. However, the existing chaos encryption algorithms lack theoretical security proofs.

[0027] In recent years, to solve the problems of efficiency and flexibility in vector data encryption, the research trend has gradually shifted from traditional spatial domain encryption to frequency domain encryption. However, existing methods mostly perform frequency domain transformation encryption in units of layers. Although layer-by-layer decryption can be achieved, in the face of the increasingly large scale of vector data and the high-efficiency response under network concurrency conditions, this coarse-grained decryption method is difficult to meet the actual needs.

[0028] Existing encryption and decryption methods for vector data are mostly based on classical cryptographic algorithms, taking the entire file or layer as the encryption unit. They have low decryption efficiency and high resource consumption. When users only need to access vector data in a specific area, they still need to load and decrypt all the data, which is difficult to meet the application requirements of high-concurrency secure access to vector data in the big data era.

[0029] Therefore, further refining the on-demand decryption service has become an urgent problem to be solved. In this context, the proposal of on-demand block decryption has important practical significance. It can refine the decryption granularity from the layer level to the data block level and is suitable for concurrent application requirements, thus significantly improving the flexibility and efficiency of data decryption and providing a new solution idea for the refined security management of large-scale vector data.

[0030] Therefore, the present application proposes a selective encryption and decryption method for vector data that takes into account the spatial and frequency domain characteristics of elements: during data encryption, characteristic elements are selected according to the spatial characteristics of vector data and grouped, and after performing frequency domain transformation on the grouped characteristic elements, only the low-frequency information is encrypted using a commercial cryptographic algorithm; during data decryption, only the encrypted characteristic elements need to be identified, decrypted in the frequency domain, and converted into the spatial domain. The decryption efficiency and resource consumption can be significantly improved when there is high concurrency and only a small amount of data needs to be read at a time.

[0031] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0032] The vector data encryption method provided by the embodiments of the present application can be applied to an application environment as Figure 1 shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the vector data to be processed to the server 104. After receiving the vector data to be processed, the server 104 reads the vector data and extracts the layer type of the vector data and the elements corresponding to the layer type; the layer type is point, line, or surface; for the elements with the layer type of point, they are grouped by quadtree according to the spatial position characteristics to obtain the point element grouping result; for the elements with the layer type of line or surface, they are grouped by the Douglas-Peucker algorithm according to the spatial distribution characteristics to obtain the line or surface element grouping result; the point, line, or surface element grouping results are subjected to frequency domain transformation to obtain a frequency domain matrix; the DC coefficients of the frequency domain matrix are encrypted using an encryption key to obtain the encrypted DC coefficients; the encrypted DC coefficients and the AC coefficients of the frequency domain matrix are recombined and inverse frequency domain transformed to obtain the grouped and encrypted elements; the grouped and encrypted elements and the unencrypted points are scrambled and confused using a scrambling key to obtain the encrypted vector data. The server 104 can feedback the obtained encrypted vector data to the terminal 102. In addition, in some embodiments, the vector data encryption method can also be implemented by the server 104 or the terminal 102 alone. For example, the terminal 102 can directly encrypt the vector data to be processed, or the server 104 can obtain the vector data to be processed from the data storage system and encrypt the vector data to be processed.

[0033] Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers, and can also be a cloud server.

[0034] In an exemplary embodiment, as Figure 2 and Figure 3 shown, a vector data encryption method is provided. This method is executed by a computer device, and specifically can be executed alone by a computer device such as a terminal or a server, or can be jointly executed by a terminal and a server. In the embodiments of the present application, taking this method applied to Figure 1 the server 104 in it as an example for illustration, it includes the following steps 201 to step 207.

[0035] Step 201: Read the vector data and extract the layer type of the vector data and the features corresponding to the layer type; the layer type is point, line, or surface.

[0036] Step 202: Group the features with the layer type of point according to the spatial position characteristics by using a quadtree to obtain a point feature grouping result.

[0037] Step 203: Group the features with the layer type of line or surface according to the spatial distribution characteristics by using the Douglas-Peucker algorithm to obtain a line feature grouping result or a surface feature grouping result.

[0038] Step 204: Perform a frequency domain transform on the point feature grouping result, the line feature grouping result, or the surface feature grouping result to obtain a frequency domain matrix.

[0039] Step 205: Encrypt the DC coefficients of the frequency domain matrix by using an encryption key to obtain encrypted DC coefficients.

[0040] Step 206: Recombine and perform an inverse frequency domain transform on the encrypted DC coefficients and the AC coefficients of the frequency domain matrix to obtain grouped and encrypted features; the scrambling key is derived according to the encryption key. Among them, the grouped and encrypted features are grouped and encrypted point features, grouped and encrypted line features, or grouped and encrypted surface features. When the grouped and encrypted features are grouped and encrypted point features, the grouped and encrypted features are encrypted vector data. When the grouped and encrypted features are grouped and encrypted line features or grouped and encrypted surface features, step 207 is performed.

[0041] Step 207: Scramble and confuse the grouped and encrypted elements and the unencrypted points with a scrambling key to obtain encrypted vector data; the unencrypted points are the unencrypted points in elements with a layer type of line or surface.

[0042] Implementing the above Steps 201 to 207 can selectively encrypt vector data, improving the data encryption and decryption operation efficiency while maintaining the integrity of the vector data structure and encryption security.

[0043] In an exemplary embodiment of the present application, Step 202 specifically includes: dividing the elements with a layer type of point into quad-tree blocks according to spatial location characteristics to obtain a block result; the number of elements with a layer type of point in each leaf node of the quad-tree is less than or equal to a set number threshold; grouping the elements with a layer type of point according to the block result to obtain a point element grouping result; the number of elements in the block result is greater than 1.

[0044] In an exemplary embodiment of the present application, Step 203 specifically includes: selecting spatially distributed feature points for the elements with a layer type of line or surface using the Douglas-Peucker algorithm; grouping the elements with a layer type of line or surface according to the spatially distributed feature points to obtain a line element grouping result or a surface element grouping result.

[0045] In practical applications, selecting spatially distributed feature points for the elements with a layer type of line or surface using the Douglas-Peucker algorithm specifically includes: for the elements with a layer type of surface, splitting the boundary lines in the elements into elements with a layer type of line; for the elements with a layer type of line, determining a straight line according to the start and end points of the element; calculating the distances from all points on the curve of the element with a layer type of line to the straight line; obtaining the maximum distance among the distances and recording the point corresponding to the maximum distance; judging whether the maximum distance is less than a set distance threshold to obtain a judgment result; if the judgment result is yes, connecting the start and end points of the straight line as the spatially distributed feature points; if the judgment result is no, retaining the point corresponding to the maximum distance, and dividing the curve of the element with a layer type of line into a left curve part and a right curve part with the point corresponding to the maximum distance as the boundary; respectively determining a straight line according to the start and end points of the left curve part and the right curve part and returning to the step of "calculating the distances from all points on the curve of the element with a layer type of line to the straight line".

[0046] In an exemplary embodiment of the present application, Step 205 specifically includes: encrypting the DC coefficients of the frequency domain matrix in a reserved format using the SM4 algorithm to obtain encrypted DC coefficients.

[0047] In another exemplary embodiment of the present application, a specific process of the vector data encryption method in practical applications is provided, as Figure 3 shown.

[0048] Step 1: Read the vector data to obtain the layer to be processed, and extract the type and features of the layer to be processed. Among them, the feature with the layer type of point is the point feature, the feature with the layer type of line is the line feature, and the feature with the layer type of surface is the surface feature.

[0049] Step 2: For the features with the layer type of point, perform block division based on the quadtree according to the spatial position characteristics, so that the number of point features in each leaf node is not greater than the specified set number threshold N.

[0050] Step 3: For the features with the layer type of line or surface, use the Douglas-Peucker algorithm to select their spatial distribution feature points.

[0051] Step 4: For the features with the layer type of point, perform element grouping according to the block division result, and do not process the blocks that only contain a single point feature.

[0052] Step 5: For the features with the layer type of line or surface, group the extracted spatial distribution feature points according to the elements; among them, different elements have different grouping methods. The point features are divided into blocks through the quadtree, and then different blocks are grouped as one group; the line or surface features are directly grouped according to the element objects. For example, if there are 30 coordinates on line element 1, these thirty coordinates are grouped as one group. Each element is a group.

[0053] Step 6: Perform a Discrete Cosine Transform (DCT) on the points grouped in Steps 4 and 5 to obtain a frequency domain matrix.

[0054] Step 7: Use the encryption key to perform SM4 retention format encryption on the DC coefficients in the frequency domain matrix, and keep the AC coefficients in the frequency domain matrix unchanged.

[0055] Step 8: Recombine the encrypted DC coefficients with the unencrypted AC coefficients to obtain the encrypted frequency domain matrix, and then perform an Inverse Discrete Cosine Transform (IDCT) to obtain the grouped and encrypted elements.

[0056] Step 9: Derive a scrambling key from the encryption key.

[0057] Step 10: Scramble and confuse the grouped and encrypted elements and the unencrypted points through the scrambling key to obtain the finally encrypted vector data; the unencrypted points are the unencrypted points in the features with the layer type of line or surface, and the grouped and encrypted elements for scrambling and confusing are the line or surface features.

[0058] In step 2, point features are divided into blocks based on quadtrees. Specifically, vector data has obvious spatial distribution characteristics, and quadtree, as a spatial index structure, can group data according to spatial location. Through quadtree blocking, vector data can be divided into multiple independent spatial units (groups), each of which contains point features within a certain range. This grouping method not only retains the spatial structural characteristics of the data, but also supports users to select data in a specific area for decryption as needed, avoiding the inefficiency of decrypting the entire data set in traditional encryption methods. Quadtree blocking has multi-scale characteristics and can dynamically adjust the block granularity according to data density and application requirements. In data-intensive areas, finer-grained blocks can be used; in data-sparse areas, coarser-grained blocks can be used. This flexibility enables the algorithm to adapt to the needs of different scales and application scenarios while maintaining high encryption and decryption efficiency.

[0059] Quadtree block not only improves encryption efficiency, but also enhances data security through grouping. Since each group is encrypted independently, even if an attacker cracks the data of a certain group, he cannot directly obtain the information of other groups.

[0060] In step 3, the extraction of feature points of line and surface elements is as follows: specifically, line and surface elements in vector data are usually composed of a large number of points, especially complex geographic data (such as rivers, roads, boundaries, etc.). If all these points are encrypted directly, the amount of calculation will be very large, resulting in low encryption efficiency.

[0061] The Douglas-Peucker Algorithm is a classic algorithm for simplifying line or surface features. Its core idea is to simplify geometric shapes by reducing the number of data points while retaining the key features of the original shape as much as possible. In the subsequent encryption algorithm, data needs to be grouped and subjected to discrete cosine transform and other operations. If the amount of data is too large, the efficiency of these operations will be significantly reduced. The Douglas-Peucker Algorithm can be used as input for subsequent encryption operations by extracting key feature points, significantly reducing the amount of data that needs to be encrypted. Since these feature points already represent the key information of line and surface features, the amount of calculation will be significantly reduced when they are subjected to DCT transformation and encryption, while still being able to ensure the encryption effect.

[0062] The core idea of the Douglas-Peucker algorithm is to recursively select points, remove unimportant points, and retain only points that contribute greatly to the overall shape of the curve or polyline, thereby simplifying the original data. The main steps are as follows.

[0063] ① Assume that the first and last points of the vector segment of the line element are (X 1,Y 1 ),(X 2 ,Y 2 ) , these two points determine a straight line, and then a set distance threshold is set d , calculate the distances from all points on the curve to this straight line D and find the maximum distance D max , and mark the point with the maximum distance as (X p ,Y p ) . Then D max is compared with the set distance threshold d .

[0064] ② If D max <d , then all the middle points on this curve are discarded; then this straight line segment is (X 1 ,Y 1 ),(X 2 ,Y 2 ) The straight line determined by these two points can be used as an approximation of the curve, and this section of the curve is processed.

[0065] ③ If D max ≥d , retain D max the corresponding coordinate points (X p ,Y p ) , and use this point as the boundary to divide the curve into left and right parts.

[0066] ④ Repeat steps ① and ② for the left and right parts until all D max <D .

[0067] ⑤ Finally, connect the start and end points and the retained points in sequence to obtain the selection of the spatial distribution feature points.

[0068] A surface feature is a polygon composed of a series of closed boundary lines (loops). Extracting the spatial distribution feature points of a surface feature is essentially extracting the spatial distribution feature points of its boundary lines.

[0069] In this application, the extraction of characteristic points of the spatial distribution of line or surface elements is a key step. This step supports selective encryption, and the extraction of characteristic points provides the basis for selective encryption. By extracting key characteristic points, the encryption operation can be concentrated on these key points instead of encrypting the entire dataset. This selective encryption strategy can significantly reduce the amount of encrypted data while ensuring data security.

[0070] In step 6, the grouped frequency domain transformation. Specifically, in the method of this application, the discrete cosine transform (DCT) is selected as the frequency domain transformation method based on its unique characteristics and advantages, which can well meet the requirements of the selective encryption algorithm. The comparison of the discrete cosine transform with other common frequency domain transformation methods is shown in Table 1.

[0071] Table 1 Comparison table of frequency domain transformation methods

[0072]

[0073] (1) Block-based processing method.

[0074] In this application, point elements are initially processed by quadtree partitioning, and line or surface elements are grouped after extracting characteristic points by the Douglas-Peucker algorithm. The block-based characteristic of the DCT transform highly matches the partitioning processing method, and it can independently transform and encrypt the data of each group. In terms of localization processing, the block-based processing method of the DCT enables the encryption operation to be limited within each group, avoiding operating on the entire dataset and improving the encryption efficiency.

[0075] (2) Compressibility and energy aggregation.

[0076] The DCT transform can concentrate the energy of the signal in the low-frequency part (such as the DC coefficient), while the coefficients in the high-frequency part (such as the AC coefficient) are usually small. In this application, only the DC coefficient is selected for encryption because the DC coefficient contains the main energy information of the data, and it can effectively protect the core content of the data after encryption. At the same time, the high-frequency information is retained. High-frequency coefficients usually contain detailed information, but they are not encrypted in this application, thus retaining some detailed features of the data and ensuring that the decrypted data can still maintain high usability.

[0077] (3) In terms of computational efficiency.

[0078] The DCT transform and its inverse transform (IDCT) have high computational efficiency, can meet the requirement of quickly transforming the partitioned data, and are suitable for processing large-scale data.

[0079] (4) In terms of security.

[0080] The energy concentration characteristic of the DCT transform enables the effective protection of the core information of the data by only encrypting the DC coefficients. This selective encryption method reduces the exposure surface of the encrypted data while ensuring security.

[0081] In step 7, the DC coefficients are encrypted. Specifically, in this application, the SM4 format-preserving algorithm is selected to encrypt the DC coefficients based on the characteristics of high security, format preservation, computational efficiency, and standardization certification of this algorithm. The SM4 format-preserving algorithm can effectively protect the core content of the data while ensuring that the encrypted data is consistent with the plaintext in format, facilitating system compatibility and subsequent data processing.

[0082] (1) Security of the SM4 algorithm.

[0083] SM4 is a symmetric encryption algorithm that uses block encryption. The block length is 128 bits, and the key length is also 128 bits. Its core structure includes: Round function - The SM4 algorithm uses 32 rounds of non-linear transformation (Feistel structure), and each round uses a round key. S-box - SM4 uses an S-box with 8-bit input and 8-bit output, which has highly non-linear characteristics and can effectively resist differential attacks and linear attacks. Key expansion - The key expansion algorithm of SM4 generates 32 round keys, each round key being 32 bits, ensuring the randomness and complexity of the keys.

[0084] The security of the SM4 algorithm is mainly reflected in the following aspects.

[0085] Resistance to differential attacks: The S-box design of SM4 has been strictly tested and can effectively resist differential attacks. Differential attack is a method of cracking the key by analyzing the relationship between the input difference and the output difference. The round function and S-box design of SM4 make the differential probability extremely low, and it is difficult for attackers to obtain key information through differential analysis.

[0086] Resistance to linear attacks: Linear attack is a method of cracking the key by analyzing the linear relationship between the input and the output. The S-box and round function design of SM4 make the deviation of linear approximation extremely small, and it is difficult for attackers to obtain effective information through linear analysis.

[0087] Resistance to brute-force attacks: The key length of SM4 is 128 bits, and the key space is (2^{128}). Even using modern supercomputers for brute-force attacks, it takes an extremely long time to crack.

[0088] Resistance to related-key attacks: Related-key attack is a method of cracking the key by analyzing the relationship between different keys. The key expansion algorithm design of SM4 is complex and can effectively resist related-key attacks.

[0089] Resistance to Side-Channel Attacks: When designing the SM4 algorithm, side-channel attacks (such as power analysis, electromagnetic analysis, etc.) are considered. Through randomization operations and masking techniques, such attacks can be effectively resisted.

[0090] (2)Format-Preserving Encryption.

[0091] Format-Preserving Encryption (FPE) is a special encryption technology, whose feature is that the ciphertext after encryption has the same format and length as the plaintext. In this application, the SM4-FPE mode is selected for encrypting the DC coefficients, that is, format-preserving encryption based on the SM4 algorithm.

[0092] In the frequency domain, the DC coefficient is usually a numerical value, and the ciphertext after encryption needs to maintain the same format as the plaintext (such as numerical type, length, etc.). SM4 format-preserving encryption can ensure that the encrypted DC coefficients are consistent with the unencrypted data in format, so that the encrypted DC coefficients and the unencrypted AC coefficients can participate in subsequent calculations together.

[0093] In the scrambling and confusion in step 10, specifically, the scrambling key is first derived from the encryption key, and the encrypted and unencrypted points of the line and surface data are scrambled and confused through the scrambling key to obtain the finally encrypted vector data.

[0094] (1)The role of deriving the scrambling key.

[0095] In this application, the scrambling key is generated from the encryption key and has a different value from the encryption key. The derived scrambling key is used to scramble and confuse the encrypted and unencrypted points of the line and surface data, rather than directly using the encryption key. Using the scrambling key for scrambling can separate the scrambling operation from the encryption operation. Even if an attacker obtains the scrambling key, the encryption key cannot be directly deduced. This design increases the security of the key and reduces the risk of key leakage.

[0096] Using the derived method to generate the scrambling key can reduce the number of keys that need to be managed. Only the encryption key needs to be saved, and the scrambling key can be dynamically generated when needed. This design reduces the complexity of key management and improves the maintainability of the system. The scrambling key can be generated according to the timestamp or random number, so that the scrambling key used for each encryption operation is different, enhancing the ability to resist replay attacks.

[0097] (2)The role of scrambling and confusion.

[0098] In this application, scrambling and confusion is the last step of the encryption algorithm, and its purpose is to confuse the encrypted and unencrypted points in the line and surface data to further enhance the security of the encrypted data. Among them, the unencrypted elements are the points not extracted in step 3.

[0099] During the selective encryption process, the present application selects the feature points to be encrypted in the spatial domain and selects the DC coefficients for encryption in the frequency domain. Through scrambling and confusion, it makes it difficult for attackers to distinguish between encrypted and unencrypted data, increasing the difficulty of attacker analysis. At the same time, scrambling and confusion only change the identifiers recording encrypted and unencrypted data, without changing the content of the data. This design enhances security while maintaining the availability of the data.

[0100] In summary, in the present application, by using the derived scrambling key pair for scrambling and confusion, an additional security layer is added to the algorithm, making it difficult for attackers to crack the encrypted data by analyzing high-frequency coefficients or speculating on the key, significantly enhancing the security of the algorithm, and reducing the complexity of key management.

[0101] In another exemplary embodiment of the present application, a method for decrypting vector data is also provided, including: reading the vector data to be decrypted and selecting a decryption area according to the vector data to be decrypted. Performing inverse scrambling on the decryption area using the scrambling key to obtain a block encryption identifier; the scrambling key is derived and scrambled from the encryption key. Identifying according to the block encryption identifier to obtain block-encrypted data. Performing a frequency domain transform on the block-encrypted data to obtain a frequency domain matrix. Decrypting the DC coefficients in the frequency domain matrix using the encryption key to obtain the decrypted DC coefficients. Recombining the decrypted DC coefficients and the AC coefficients of the frequency domain matrix and performing an inverse frequency domain transform to obtain the decrypted vector data.

[0102] As Figure 4 shown, in another exemplary embodiment of the present application, a specific process of the vector data decryption method in practical applications is also provided.

[0103] Step 1: Select the data area to be decrypted according to the application requirements of the user.

[0104] Step 2: Derive a scrambling key for scrambling from the encryption key.

[0105] Step 3: Perform inverse scrambling on the encrypted data using the derived scrambling key to obtain the correct block encryption identifier.

[0106] Step 4: Identify the data to be decrypted according to the block encryption identifier obtained by inverse scrambling in Step 3.

[0107] Step 5: Perform a frequency domain transform on the identified block data to obtain a frequency domain coefficient matrix.

[0108] Step 6: Use the encryption and decryption to decrypt the DC coefficients in the frequency domain coefficients.

[0109] Step 7: Recombine the decrypted DC coefficients with the unencrypted AC coefficients, and then perform inverse frequency-domain transformation. At this time, the decrypted data required by the user is obtained.

[0110] In Step 3: The encrypted data is descrambled by the derived scrambling key. Specifically, when encrypting, the encryption key is first derived to obtain the scrambling key. The derived scrambling key is used to scramble and confuse the encrypted and unencrypted data. When decrypting, it is also necessary to first derive the scrambling key from the encryption key, and the scrambling key is used to descramble the encrypted and unencrypted data. The accuracy and security of this step directly affect the success or failure of the entire decryption process.

[0111] (1) Accuracy of the scrambling key.

[0112] The scrambling key must be exactly the same as the scrambling key used during encryption. Any deviation will result in descrambling failure. The generation process of the derived key needs to be strictly carried out according to the algorithm and parameters during encryption to ensure the uniqueness and correctness of the key.

[0113] If there are deviations in the parameters for generating the scrambling key, even if the attacker obtains the encryption key, they cannot obtain the scrambling key, thus unable to descramble the encrypted and unencrypted data and unable to obtain the correct block encryption identifier.

[0114] (2) Correct implementation of the descrambling algorithm.

[0115] The scrambling key is used to control the scrambling and descrambling processes of the encrypted and unencrypted data. If the keys do not match, the block encryption identifier after descrambling cannot be correctly restored. The scrambling key must be exactly the same as the scrambling key used during encryption. Any deviation will result in descrambling failure.

[0116] The accuracy of the block encryption identifier is the basis for ensuring the accuracy of the subsequent decrypted data. If the block encryption identifier is incorrect, it is impossible to distinguish which data in the spatial domain is encrypted or unencrypted, let alone correctly group and decrypt the DC coefficients in the frequency domain and thus unable to correctly restore the data.

[0117] In Steps 5 - 7: The frequency-domain transformation decryption process. The specific process is as follows.

[0118] 1) Specific operations.

[0119] ① Identify and group the data to be decrypted according to the grouping information recorded during encryption.

[0120] ② Perform discrete cosine transform (DCT) on the data of each group to obtain the frequency-domain coefficient matrix.

[0121] ③ The frequency-domain coefficient matrix includes direct current (DC) coefficients and alternating current (AC) coefficients, where the DC coefficients are encrypted and the AC coefficients are unencrypted.

[0122] ④ Decrypt the DC coefficients in the frequency-domain coefficient matrix to restore their original values.

[0123] ⑤ The decrypted DC coefficients are recombined with the unencrypted AC coefficients to form a complete frequency-domain coefficient matrix.

[0124] ⑥ Convert the decrypted frequency-domain coefficient matrix back to the spatial domain to obtain the decrypted data required by the user.

[0125] (2) Efficiency of block decryption.

[0126] Block decryption demonstrates significant efficiency and flexibility in the process of frequency-domain transformation decryption, becoming a key strategy for processing large-scale data and meeting the user's on-demand decryption requirements. Its core advantage lies in dividing the data into multiple independent blocks, and each block can be decrypted separately. This "divide and conquer" strategy significantly reduces the amount of data decrypted at one time and lowers the computational complexity. It not only greatly improves the decryption efficiency but also makes full use of computing resources, especially when dealing with large-scale data.

[0127] In addition, block decryption also supports on-demand decryption by users. Users can select specific regions or blocks for decryption according to actual needs without decrypting the entire dataset. This on-demand decryption strategy not only reduces the decryption time and consumption of computing resources but also greatly improves the flexibility of the system and the user experience. For example, in urban planning, planners may only need to analyze the vector data of a specific region without decrypting the vector data of the entire city. Through block decryption, planners can quickly obtain the data of the required region without waiting for the decryption process of the entire dataset. This not only saves time but also reduces the occupation of computing resources, making the planning work more efficient. Similarly, in environmental monitoring, researchers may only need to analyze the pollution data of a specific region. Through block decryption, researchers can quickly decrypt and obtain the pollution data of that region, thus enabling timely environmental assessment and decision support.

[0128] Through its efficiency and support for on-demand decryption, block decryption provides powerful optimization capabilities for the frequency-domain transformation decryption technology, making it show significant advantages in large-scale data processing and real-time applications, and providing users with more efficient, flexible, and secure decryption services.

[0129] The vector data encryption method provided by this application has the following advantages.

[0130] (1) The security and integrity of this method in vector data encryption are more applicable and suitable compared with traditional methods.

[0131] Traditional vector data encryption methods usually adopt an overall encryption strategy. Although the operation is simple, they ignore the unique spatial structure characteristics of vector data. To preserve the spatial structure of vector data, encryption algorithms based on chaotic systems can achieve fine-grained encryption of vector map data, taking into account the preservation of the spatial structure to a certain extent. However, such methods still have deficiencies in terms of security and are difficult to resist complex attack means.

[0132] In contrast, the selective encryption method proposed in this application has significant advantages: First, through the selective encryption strategy in the spatial domain and frequency domain, while ensuring data security, the computational complexity is effectively reduced; Second, selective encryption can not only completely preserve the spatial structure characteristics of vector data, but also significantly improve its security. Since the method divides the data into blocks and encrypts them in groups, it can effectively resist various known attack methods, including statistical analysis attacks and differential attacks, etc., providing a reliable security guarantee for the storage and transmission of vector data. In addition, by introducing scrambling and confusion techniques, the anti-attack ability of the algorithm is further enhanced, making the encrypted data have better confusion and unpredictability.

[0133] (2) This method has higher efficiency compared with traditional encryption schemes when users decrypt a smaller amount of data.

[0134] In the field of vector data encryption, traditional methods mainly adopt two methods: file encryption and coordinate encryption. File encryption methods (such as AES, DES, SM4, etc.) usually encrypt the entire vector data file. Although the security is high, when users only need to decrypt part of the data, they still need to decrypt the entire file, resulting in a large amount of computation and low efficiency. Coordinate encryption methods encrypt each coordinate point independently. Although fine-grained decryption can be achieved, due to the overly fine encryption granularity, a large number of independent decryption operations are required during decryption, and there are also efficiency problems.

[0135] In contrast, the selective encryption algorithm proposed in this application has significant advantages when users decrypt a relatively small amount of data. First, through the quadtree partitioning and feature point extraction techniques, the algorithm divides the extracted feature data into multiple independent grouping units. Users only need to decrypt the group where the required data is located, avoiding unnecessary decryption calculations. Second, the algorithm only encrypts the DC coefficients in the frequency domain. During decryption, only a small number of key coefficients need to be decrypted, greatly reducing the computational complexity. In addition, since the algorithm retains the spatial structure characteristics of the vector data, spatial analysis and visualization operations can be directly performed after decryption, while traditional methods often require additional data reconstruction steps, further reducing the overall efficiency.

[0136] This efficiency advantage is particularly obvious in scenarios with limited computing resources such as mobile devices and the Web. For example, in a mobile map application, users often only need to view or edit data in a local area. Using this method can significantly reduce the computational load and improve the user experience. At the same time, the high efficiency of the algorithm also provides better support for application scenarios with high real-time requirements (such as online map editing, collaborative mapping, etc.).

[0137] This application also provides an application scenario that applies the above-mentioned vector data encryption method. Specifically: The vector data encryption method provided in this embodiment can be applied to the security protection scenario of high-precision map data in the field of autonomous driving. In this scenario, high-precision map data can provide functions such as navigation and positioning, route planning, and auxiliary decision-making for autonomous driving vehicles. However, its acquisition and production costs are high, and it is a high-value data resource that needs to be encrypted and protected when providing services externally and only used by authorized users. Using the method of this application, the high-precision map data before release can be encrypted layer by layer, grouped, and in parallel. When a large number of autonomous driving vehicles use it concurrently, according to their different positions, they can decrypt the high-precision map data of the required area as needed.

[0138] Based on the same inventive concept, the embodiments of this application also provide a vector data encryption device for implementing the above-mentioned vector data encryption method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the vector data encryption device provided below can refer to the limitations on the vector data encryption method in the above text and will not be repeated here.

[0139] In an exemplary embodiment, a vector data encryption device is provided, which includes: a reading and extraction module for reading vector data and extracting the layer type of the vector data and the features corresponding to the layer type; the layer type being point, line or surface; a point feature grouping module for grouping the features of the layer type of point according to the spatial position characteristics by using a quadtree to obtain a point feature grouping result; a line or surface feature grouping module for grouping the features of the layer type of line or surface according to the spatial distribution characteristics by using the Douglas-Peucker algorithm to obtain a line feature grouping result or a surface feature grouping result; a frequency domain transformation module for performing a frequency domain transformation on the point feature grouping result, the line feature grouping result or the surface feature grouping result to obtain a frequency domain matrix; an encryption module for encrypting the DC coefficients of the frequency domain matrix by using an encryption key to obtain encrypted DC coefficients; a recombination and inverse frequency domain transformation module for recombining and performing an inverse frequency domain transformation on the encrypted DC coefficients and the AC coefficients of the frequency domain matrix to obtain the grouped and encrypted features; a scrambling module for scrambling and confusing the grouped and encrypted features and the unencrypted points by using a scrambling key to obtain encrypted vector data; the scrambling key being derived according to the encryption key; the unencrypted points being the unencrypted points in the features of the layer type of line or surface.

[0140] In an exemplary embodiment, a computer device is provided. The computer device can be a server or a terminal, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store encrypted vector data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. The computer program, when executed by the processor, implements a vector data encryption method.

[0141] Those skilled in the art can understand that Figure 5The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component arrangement. In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the above-mentioned method embodiments are implemented.

[0142] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the above-mentioned method embodiments are implemented.

[0143] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned method embodiments are implemented.

[0144] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0145] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0146] The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0147] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.

[0148] In this article, specific examples are used to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.

Claims

1. A vector data encryption method, characterized in that The described vector data encryption method includes: Reading the vector data and extracting the layer type of the vector data and the elements corresponding to the layer type; the layer type is point, line or surface; Grouping the elements with the layer type of point according to the spatial position characteristics by quadtree to obtain the point element grouping result; Grouping the elements with the layer type of line or surface according to the spatial distribution characteristics by the Douglas-Peucker algorithm to obtain the line element grouping result or the surface element grouping result; grouping the elements with the layer type of line or surface according to the spatial distribution characteristics by the Douglas-Peucker algorithm to obtain the line element grouping result or the surface element grouping result, specifically including: selecting the spatial distribution characteristic points of the elements with the layer type of line or surface by the Douglas-Peucker algorithm; grouping the elements with the layer type of line or surface according to the spatial distribution characteristic points to obtain the line element grouping result or the surface element grouping result; Selecting the spatial distribution characteristic points of the elements with the layer type of line or surface by the Douglas-Peucker algorithm, specifically including: for the elements with the layer type of surface, splitting the boundary line in the elements into elements with the layer type of line; for the elements with the layer type of line, determining a straight line according to the start and end points of the element; calculating the distances from all the points on the curve of the element with the layer type of line to the straight line; obtaining the maximum distance among the distances and recording the point corresponding to the maximum distance; judging whether the maximum distance is less than the set distance threshold to obtain a judgment result; if the judgment result is yes, connecting the start and end points of the straight line as the spatial distribution characteristic point; if the judgment result is no, retaining the point corresponding to the maximum distance and dividing the curve of the element with the layer type of line into a left curve part and a right curve part with the point corresponding to the maximum distance as the boundary; respectively determining a straight line according to the start and end points of the left curve part and the right curve part and returning to the step "calculating the distances from all the points on the curve of the element with the layer type of line to the straight line"; Performing frequency domain transformation on the point element grouping result, the line element grouping result or the surface element grouping result to obtain a frequency domain matrix; Encrypting the DC coefficients of the frequency domain matrix with an encryption key, specifically including encrypting the DC coefficients of the frequency domain matrix in a reserved format by the SM4 algorithm to obtain the encrypted DC coefficients; Recombining and performing inverse frequency domain transformation on the encrypted DC coefficients and the AC coefficients of the frequency domain matrix to obtain the grouped and encrypted elements; Performing scrambling and confusion on the grouped and encrypted elements and the unencrypted points with a scrambling key to obtain the encrypted vector data; the scrambling key is derived according to the encryption key; the unencrypted points are the unencrypted points in the elements with the layer type of line or surface.

2. The vector data encryption method according to claim 1, characterized in that, Grouping the elements with the layer type of point according to the element spatial position by quadtree to obtain the point element grouping result, specifically including: Perform quadtree partitioning on the elements with the layer type of point according to the spatial location characteristics to obtain the partitioning result; the number of elements with the layer type of point within each leaf node of the quadtree is less than or equal to the set quantity threshold; Group the elements with the layer type of point according to the partitioning result to obtain the point element grouping result; the number of elements in the partitioning result is greater than 1.

3. A method for decrypting vector data, characterized in that, The vector data to be decrypted in the vector data decryption method is encrypted by using the vector data encryption method described in any one of claims 1-2. The vector data decryption method includes: Read the vector data to be decrypted and select the decryption area according to the vector data to be decrypted; Perform inverse scrambling on the decryption area by using the scrambling key to obtain the grouped encryption identifier; the scrambling key is derived and scrambled from the encryption key; Perform identification according to the grouped encryption identifier to obtain the grouped encrypted data; Perform frequency domain transformation on the grouped encrypted data to obtain the frequency domain matrix; Decrypt the DC coefficient in the frequency domain matrix by using the encryption key to obtain the decrypted DC coefficient; Recombine and perform inverse frequency domain transformation on the decrypted DC coefficient and the AC coefficient of the frequency domain matrix to obtain the decrypted vector data.

4. A vector data encryption device, characterized in that, The vector data encryption device includes: A reading and extraction module, configured to read vector data and extract the layer type of the vector data and the elements corresponding to the layer type; the layer type is point, line or surface; A point element grouping module, configured to perform quadtree grouping on the elements with the layer type of point according to the spatial location characteristics to obtain the point element grouping result; A line or surface element grouping module, which is used to group the elements with the layer type of line or surface according to the spatial distribution characteristics by using the Douglas-Peucker algorithm to obtain a line element grouping result or a surface element grouping result; grouping the elements with the layer type of line or surface according to the spatial distribution characteristics by using the Douglas-Peucker algorithm to obtain a line element grouping result or a surface element grouping result, specifically including: selecting spatial distribution characteristic points for the elements with the layer type of line or surface by using the Douglas-Peucker algorithm; grouping the elements with the layer type of line or surface according to the spatial distribution characteristic points to obtain a line element grouping result or a surface element grouping result; selecting spatial distribution characteristic points for the elements with the layer type of line or surface by using the Douglas-Peucker algorithm, specifically including: for the elements with the layer type of surface, splitting the boundary lines in the elements into elements with the layer type of line; for the elements with the layer type of line, determining a straight line according to the start and end points of the element; calculating the distances from all points on the curve of the element with the layer type of line to the straight line; obtaining the maximum distance among the distances and recording the point corresponding to the maximum distance; judging whether the maximum distance is less than a set distance threshold to obtain a judgment result; if the judgment result is yes, connecting the start and end points of the straight line as the spatial distribution characteristic points; if the judgment result is no, retaining the point corresponding to the maximum distance, and taking the point corresponding to the maximum distance as the boundary, dividing the curve of the element with the layer type of line into a left curve part and a right curve part; respectively determining straight lines according to the start and end points of the left curve part and the right curve part and returning to the step of "calculating the distances from all points on the curve of the element with the layer type of line to the straight line"; A frequency domain transformation module, which is used to perform frequency domain transformation on the point element grouping result, the line element grouping result or the surface element grouping result to obtain a frequency domain matrix; An encryption module, which is used to encrypt the DC coefficients of the frequency domain matrix by using an encryption key to obtain encrypted DC coefficients, specifically including encrypting the DC coefficients of the frequency domain matrix by using the SM4 algorithm in a format-preserving manner to obtain encrypted DC coefficients; A recombination and inverse frequency domain transformation module, which is used to recombine and perform inverse frequency domain transformation on the encrypted DC coefficients and the AC coefficients of the frequency domain matrix to obtain grouped and encrypted elements; A scrambling module, which is used to scramble and confuse the grouped and encrypted elements and the unencrypted points by using a scrambling key to obtain encrypted vector data; the scrambling key is derived according to the encryption key; the unencrypted points are the unencrypted points in the elements with the layer type of line or surface.

5. A computer device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the vector data encryption method according to any one of claims 1-2.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the vector data encryption method according to any one of claims 1-2.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the vector data encryption method described in any one of claims 1-2.

Citation Information

Patent Citations

  • Vector geographic data selective encryption method based on file features and blocks

    CN115270158A

  • Vector geographic data encryption method and system, electronic equipment and storage medium

    CN116415283A