Vector data encryption and decryption method and device, equipment, medium and product

By grouping and frequency domain transformation of vector data, only encrypting DC coefficients and confusing them, the problem of low encryption and decryption efficiency in the prior art is solved, and efficient and secure encryption and decryption of vector data is achieved.

CN119989389AActive Publication Date: 2025-05-13CHINESE ACAD OF SURVEYING & MAPPING
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently encrypt and decrypt vector data while keeping the vector data structure complete, especially under large-scale data and high concurrency conditions.

Method used

By reading vector data, extracting layer types and features, using the quad-tree and Douglas-Puk algorithm to group point, line, and polygon features, perform frequency domain transformation, only encrypting the DC coefficients of the frequency domain matrix, retaining the AC coefficients, and using the scrambling key to confuse the encrypted vector data.

Benefits of technology

While maintaining the integrity and encryption security of vector data structures, it significantly improves the operation efficiency of data encryption and decryption, which is suitable for application needs under large-scale data and high concurrency conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989389A_ABST
    Figure CN119989389A_ABST
Patent Text Reader

Abstract

The invention discloses a vector data encryption method and device, a vector data decryption method and device, equipment, a medium and a product, and relates to the field of vector data encryption. Performing quadtree grouping on the elements of which the layer types are points according to the spatial position features to obtain a point element grouping result; grouping the elements of which the layer types are lines or planes according to spatial distribution characteristics by using a Douglas-Peucker algorithm to obtain a line or plane element grouping result; performing frequency domain transformation on the point, line or surface element grouping result to obtain a frequency domain matrix; encrypting a DC coefficient of the frequency domain matrix by using an encryption key, and performing recombination and inverse frequency domain transformation on the encrypted DC coefficient and AC coefficient to obtain elements after block encryption; and finally, scrambling and confusing the elements subjected to block encryption and unencrypted points by using a scrambling key. The data encryption and decryption operation efficiency is improved while the integrity and encryption security of the vector data structure are kept.
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 in particular to a vector data encryption and decryption method, device, equipment, medium and product. Background Art

[0002] With the advancement of informatization and the upgrading of surveying and mapping equipment, the accuracy and dimension of vector data are increasing, the data scale is expanding, and its data value as a digital asset is getting higher and higher. However, the popularity and popularization of this trend brings opportunities while also facing 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 of protecting the copyright of vector data. During the storage or transmission of data, encryption can ensure that only legitimate users with keys can use it normally, while illegal users such as eavesdroppers or hackers without keys cannot identify or obtain this data. This measure can effectively prevent illegal users from pre-acquiring, 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 destroy its data structure, and the efficiency of decryption is also limited by the file size. Therefore, it is very necessary and urgent to study how to selectively encrypt vector data to keep the vector data structure intact and improve the efficiency of operation. Summary of the invention

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

[0005] To achieve the above objectives, this application provides the following solutions: In a first aspect, the present application provides a vector data encryption method, comprising: reading 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; performing quadtree grouping on the elements of the layer type of point according to spatial position characteristics to obtain point element grouping results; grouping the elements of the layer type of line or surface according to spatial distribution characteristics using the Douglas-Peucker algorithm to obtain line element grouping results or surface element grouping results; performing frequency domain transformation on the point element grouping results, the line element grouping results or the surface element grouping results to obtain a frequency domain matrix; encrypting the DC coefficient of the frequency domain matrix using an encryption key to obtain an encrypted DC coefficient; recombining and inverse frequency domain transforming the encrypted DC coefficient and the AC coefficient of the frequency domain matrix to obtain grouped encrypted points; scrambling and confusing the grouped encrypted elements and unencrypted points using a scrambling key to obtain encrypted vector data; the scrambling key is derived based on the encryption key; the unencrypted points are unencrypted points in the elements of the layer type of line or surface.

[0006] Optionally, the elements whose layer type is point are grouped by quadtree according to spatial position characteristics to obtain point element grouping results, specifically including: the elements whose layer type is point are divided into blocks by quadtree according to spatial position characteristics to obtain block results; the number of elements whose layer type is point in each leaf node of the quadtree is less than or equal to a set number threshold; the elements whose layer type is point are grouped according to the block results to obtain point element grouping results; the number of elements in the block results is greater than 1.

[0007] Optionally, the elements whose layer type is line or surface are grouped according to spatial distribution characteristics using the Douglas-Peucker algorithm to obtain line element grouping results or surface element grouping results, specifically including: selecting spatial distribution feature points from the elements whose layer type is line or surface using the Douglas-Peucker algorithm; grouping the elements whose layer type is line or surface according to the spatial distribution feature points to obtain line element grouping results or surface element grouping results.

[0008] Optionally, the Douglas-Peucker algorithm is used to select spatially distributed feature points for the elements whose layer type is a line or a surface, specifically including: for the elements whose layer type is a surface, splitting the boundary lines in the elements into elements whose layer type is a line; for the elements whose layer type is a line, determining a straight line according to the first and last points of the elements; calculating the distances from all points on the curve of the element whose layer type is a 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, and obtaining a judgment result; if the judgment result is yes, connecting the first and last points of the straight line as spatial feature points; if the judgment result is no, retaining the point corresponding to the maximum distance, and dividing the curve of the element whose layer type is a line into a left part and a right part of the curve with the point corresponding to the maximum distance as the boundary; respectively determining straight lines for the left and right parts of the curve according to the first and last points of the elements and returning to the step of "calculating the distances from all points on the curve of the element whose layer type is a line to the straight line".

[0009] Optionally, encrypting the DC coefficient of the frequency domain matrix using an encryption key to obtain an encrypted DC coefficient specifically includes: encrypting the DC coefficient of the frequency domain matrix using an SM4 algorithm in a format-preserving manner to obtain an encrypted DC coefficient.

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

[0011] In the third aspect, the present application provides a vector data encryption device, including: a reading and extraction module, used 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, used to group the elements of the layer type of point using a quadtree according to position characteristics to obtain point element grouping results; a line or surface element grouping module, used to group the elements of the layer type of line or surface using the Douglas-Peucker algorithm according to spatial distribution characteristics to obtain line element grouping results or surface element grouping results; a frequency domain transformation module, used to transform the point element grouping results, the line ... The result of element grouping or the result of surface element grouping is transformed in the frequency domain to obtain a frequency domain matrix; an encryption module is used to encrypt the DC coefficient of the frequency domain matrix using an encryption key to obtain an encrypted DC coefficient; a reorganization and inverse frequency domain transformation module is used to reorganize and inversely transform the encrypted DC coefficient and the AC coefficient of the frequency domain matrix to obtain grouped encrypted elements; a scrambling module is used to scramble and confuse the grouped encrypted elements and unencrypted points using a scrambling key to obtain encrypted vector data; the scrambling key is derived based on the encryption key; the unencrypted point is an unencrypted point in the element whose layer type is a line or a surface.

[0012] In a fourth aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described vector data encryption methods.

[0013] In a fifth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described vector data encryption methods.

[0014] In a sixth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-described vector data encryption methods.

[0015] According to the specific embodiments provided in this application, this application has the following technical effects.

[0016] The present application provides a vector data encryption method, apparatus, equipment, medium and product, which groups elements whose layer type is line or surface according to spatial distribution characteristics, groups elements whose layer type is point according to spatial position characteristics by quadtree, and then performs frequency domain transformation on all grouping results, taking into account spatial distribution characteristics and spatial position characteristics, and selects encrypted data to improve calculation efficiency. During the encryption process, the DC coefficient in the frequency domain matrix is ​​encrypted and the AC coefficient is retained, further reducing the amount of encrypted data and improving calculation efficiency. Through selective encryption in the spatial domain and frequency domain, the spatial characteristic structure and encryption security of the vector data are retained while improving the data encryption and decryption operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

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

[0019] Figure 2 A flowchart of a vector data encryption method provided in one embodiment of the present application.

[0020] Figure 3 A schematic diagram of a vector data encryption method provided in an embodiment of the present application.

[0021] Figure 4 A schematic diagram of a vector data decryption method provided in an embodiment of the present application.

[0022] Figure 5 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] The current mainstream cryptographic technologies 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., and hash algorithms mainly include MD5, SM3, etc. Among them, block ciphers are highly efficient and can be used in a variety of data encryption scenarios. They are the most commonly used cryptographic technology for encrypting vector data. However, when using commercial cryptographic technology to protect the confidentiality of vector data, due to the characteristics of large data 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 that hinder the widespread application of cryptography in the field of surveying and mapping geographic information.

[0025] Chaos-based scrambling encryption algorithms can scramble the spatial position of geographic data, destroying the neighborhood correlation and spatial order of the data. During the scrambling encryption process, the coordinates of the original map data must be traversed from beginning to end, and the order must be scrambled one by one with a key sequence to generate encrypted vector map data. However, existing chaotic encryption algorithms lack theoretical security proofs.

[0026] In recent years, in order to solve the efficiency and flexibility problems 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 transform encryption in layers. Although decryption by layer can be achieved, this coarse-grained decryption method is difficult to meet actual needs in the face of the increasingly large scale of vector data and efficient response under network concurrency conditions.

[0027] Existing encryption and decryption methods for vector data are mostly based on classical cryptographic algorithms, using the entire file or layer as the encryption unit. The decryption efficiency is low and the resource consumption is high. When the user only needs to access the vector data in a specific area, all the data still needs to be loaded and decrypted. This makes it difficult to meet the application requirements of high-concurrency and secure access to vector data in the big data era.

[0028] Therefore, further refinement of on-demand decryption services 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, thereby significantly improving the flexibility and efficiency of data decryption and providing a new solution for the refined security management of large-scale vector data.

[0029] Therefore, this application proposes a method for selective encryption and decryption of vector data that takes into account the spatial characteristics and frequency domain characteristics of the elements: when encrypting data, characteristic elements are selected and grouped according to the spatial characteristics of the vector data, and after the grouped characteristic elements are transformed in the frequency domain, a commercial encryption algorithm is used to encrypt only the low-frequency information; when decrypting data, it is only necessary to identify the encrypted characteristic elements, decrypt in the frequency domain, and convert them into the spatial domain. The decryption efficiency and resource consumption can be significantly improved when high concurrency and only a small amount of data needs to be read at a time.

[0030] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0031] The vector data encryption method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 via a network. The data storage system can store 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 of the layer type of point, quadtree grouping is performed according to the spatial position characteristics to obtain the point element grouping result; for the elements of the layer type of line or surface, Douglas-Peucker algorithm is used to group according to the spatial distribution characteristics to obtain the line or surface element grouping result; the point, line or surface element grouping result is transformed in the frequency domain to obtain the frequency domain matrix; the DC coefficient of the frequency domain matrix is ​​encrypted using an encryption key to obtain an encrypted DC coefficient; the encrypted DC coefficient and the AC coefficient of the frequency domain matrix are reorganized and inversely transformed in the frequency domain to obtain the grouped encrypted elements; the grouped encrypted elements and the unencrypted points are scrambled and confused using a scrambling key to obtain the encrypted vector data. The server 104 can feed back the obtained encrypted vector data to the terminal 102. In addition, in some embodiments, the vector data encryption method can also be implemented solely by the server 104 or the terminal 102. 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.

[0032] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0033] In an exemplary embodiment, Figure 2 and Figure 3 As shown, a vector data encryption method is provided, which is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used for explanation, and the steps include the following steps 201 to 207.

[0034] Step 201: 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.

[0035] Step 202: performing quadtree grouping on the point elements of the layer type according to spatial position features to obtain point element grouping results.

[0036] Step 203: grouping the elements whose layer type is line or surface according to spatial distribution characteristics using the Douglas-Peucker algorithm to obtain a line element grouping result or a surface element grouping result.

[0037] Step 204: 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.

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

[0039] Step 206: The encrypted DC coefficient and the AC coefficient of the frequency domain matrix are reorganized and inversely transformed in the frequency domain to obtain the grouped encrypted elements; the scrambling key is derived from the encryption key. The grouped encrypted elements are grouped encrypted point elements, grouped encrypted line elements or grouped encrypted surface elements. When the grouped encrypted elements are grouped encrypted point elements, the grouped encrypted elements are encrypted vector data. When the grouped encrypted elements are grouped encrypted line elements or grouped encrypted surface elements, step 207 is performed.

[0040] Step 207: The encrypted elements and unencrypted points of the group are scrambled and confused using a scrambling key to obtain encrypted vector data; the unencrypted points are unencrypted points in the elements whose layer type is line or surface.

[0041] By implementing the above steps 201 to 207, vector data can be selectively encrypted, thereby improving the efficiency of data encryption and decryption operations while maintaining the integrity of the vector data structure and encryption security.

[0042] In an exemplary embodiment of the present application, step 202 specifically includes: performing quadtree blocking on the elements with the layer type of point according to the spatial position characteristics to obtain a blocking result; the number of elements with the layer type of point in each leaf node of the quadtree is less than or equal to a set number threshold; grouping the elements with the layer type of point according to the blocking result to obtain a point element grouping result; the number of elements in the blocking result is greater than 1.

[0043] In an exemplary embodiment of the present application, step 203 specifically includes: selecting spatial distribution feature points for the elements whose layer type is line or surface using the Douglas-Peucker algorithm; grouping the elements whose layer type is line or surface according to the spatial distribution feature points to obtain line element grouping results or surface element grouping results.

[0044] In practical applications, the Douglas-Peucker algorithm is used to select spatial distribution feature points for the elements whose layer type is line or surface, specifically including: for the elements whose layer type is surface, the boundary lines in the elements are split into elements whose layer type is line; for the elements whose layer type is line, a straight line is determined according to the first and last points of the elements; the distances from all points on the curve of the element whose layer type is line to the straight line are calculated; the maximum distance among the distances is obtained and the point corresponding to the maximum distance is recorded; it is determined whether the maximum distance is less than a set distance threshold to obtain a judgment result; if the judgment result is yes, the first and last points of the straight line are connected as spatial distribution feature points; if the judgment result is no, the point corresponding to the maximum distance is retained, and the curve of the element whose layer type is line is divided into a left part of the curve and a right part of the curve with the point corresponding to the maximum distance as the boundary; the left part of the curve and the right part of the curve are respectively determined as straight lines according to the first and last points of the elements and the step of "calculating the distances from all points on the curve of the element whose layer type is line to the straight line" is returned.

[0045] In an exemplary embodiment of the present application, step 205 specifically includes: encrypting the DC coefficient of the frequency domain matrix in a format-preserving manner using the SM4 algorithm to obtain an encrypted DC coefficient.

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

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

[0048] Step 2: For the point features of the layer type, divide them into blocks based on the quadtree according to the spatial location characteristics, so that the number of point features in each leaf node is not greater than the specified set number threshold N.

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

[0050] Step 4: For features whose layer type is point, group the features according to the block results, and do not process blocks containing only single point features.

[0051] Step 5: For the features of the layer type of line or surface, the extracted spatial distribution feature points are grouped by feature; different elements have different grouping methods. Point features are divided into blocks through quadtrees, and then different blocks are grouped together; line or surface features are grouped directly according to feature objects, such as there are 30 coordinates on line element 1, and these 30 coordinates are grouped together. Each element is a group.

[0052] Step 6: Perform discrete cosine transform (DCT) on the points grouped in steps 4 and 5 to obtain a frequency domain matrix.

[0053] Step 7: Use the encryption key to encrypt the DC coefficients in the frequency domain matrix in the SM4 format, keeping the AC coefficients in the frequency domain matrix unchanged.

[0054] Step 8: Recombine the encrypted DC coefficients with the unencrypted AC coefficients to obtain an encrypted frequency domain matrix, and then perform an inverse discrete cosine transform (IDCT) to obtain the grouped encrypted elements.

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

[0056] Step 10: Use the scrambling key to scramble the encrypted group elements and unencrypted points to obtain the final encrypted vector data; the unencrypted points are the unencrypted points in the elements of the layer type of line or surface, among which the encrypted group elements that are scrambled are line or surface elements.

[0057] 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.

[0058] 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.

[0059] 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.

[0060] 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.

[0061] 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.

[0062] ① 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 set the distance threshold d , calculate the distance from all points on the curve to the straight line D And find the maximum distance D max , and the point with the largest distance is recorded as (X p ,Y p ) Then D max Distance threshold d Make a comparison.

[0063] ②If D max <d , then discard all the intermediate points on this curve; then the 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 the processing of this section of the curve is completed.

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

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

[0066] ⑤Finally, the first and last points and the retained points are connected in this way to obtain the selection of spatial distribution feature points.

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

[0068] In this application, the extraction of spatially distributed feature points of line or surface elements is a key step. This step supports selective encryption, and feature point extraction provides the basis for selective encryption. By extracting key feature points, encryption operations can be focused on these key points rather than encrypting the entire data set. This selective encryption strategy can significantly reduce the amount of encrypted data while ensuring data security.

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

[0070] Table 1 Comparison of frequency domain transformation methods

[0071] (1) Block-based processing.

[0072] In this application, point elements are preliminarily processed by quadtree block division, and line or surface elements are grouped after feature points are extracted by Douglas-Peucker algorithm. The block-based characteristics of DCT transform are highly consistent with the block processing method, and the data of each group can be independently transformed and encrypted. In terms of localized processing, the block processing method of DCT allows encryption operations to be limited to each group, avoiding operations on the entire data set and improving encryption efficiency.

[0073] (2) Compressibility and energy accumulation.

[0074] The DCT transform can concentrate the energy of the signal in the low-frequency part (such as the DC coefficient), while the coefficients of the high-frequency part (such as the AC coefficient) are usually small. In this application, only the DC coefficient is chosen to be encrypted because the DC coefficient contains the main energy information of the data, and after encryption, the core content of the data can be effectively protected. At the same time, the high-frequency information is retained. The high-frequency coefficient usually contains detailed information, but it is not encrypted in this application, thereby retaining some detailed features of the data and ensuring that the decrypted data can still maintain a high level of availability.

[0075] (3) Computational efficiency.

[0076] DCT transform and its inverse transform (IDCT) have high computational efficiency, can meet the needs of fast transformation of block data, and are suitable for processing large-scale data.

[0077] (4) Security.

[0078] The energy-gathering characteristics of DCT transformation make it possible to effectively protect the core information of data by encrypting only the DC coefficient. This selective encryption method reduces the exposure of encrypted data while ensuring security.

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

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

[0081] SM4 is a symmetric encryption algorithm that uses block encryption with a block length of 128 bits and a key length of 128 bits. Its core structure includes: Round function - The SM4 algorithm uses 32 rounds of nonlinear transformation (Feistel structure), and each round uses a round key. S-box - SM4 uses an 8-bit input and 8-bit output S-box, which has a high degree of nonlinearity and can effectively resist differential attacks and linear attacks. Key expansion - SM4's key expansion algorithm generates 32 round keys, each of which is 32 bits, to ensure the randomness and complexity of the key.

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

[0083] Anti-differential attack: The S-box design of SM4 has been rigorously tested and can effectively resist differential attacks. Differential attack is an attack method that cracks the key by analyzing the relationship between the input differential and the output differential. The round function and S-box design of SM4 make the differential probability extremely low, making it difficult for attackers to obtain key information through differential analysis.

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

[0085] Anti-exhaustive attack: The key length of SM4 is 128 bits, and the key space is (2^{128}). Even with a modern supercomputer, it will take a very long time to crack it.

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

[0087] Anti-side channel attacks: The SM4 algorithm takes side channel attacks (such as power consumption analysis, electromagnetic analysis, etc.) into consideration during its design. Through randomization operations and masking techniques, it can effectively resist such attacks.

[0088] (2) Encryption with format preservation.

[0089] Format-Preserving Encryption (FPE) is a special encryption technology, which is characterized by the encrypted ciphertext having the same format and length as the plaintext. This application selects the SM4-FPE mode for encrypting the DC coefficient, which is format-preserving encryption based on the SM4 algorithm.

[0090] In the frequency domain, the DC coefficient is usually a numerical value, and the encrypted ciphertext 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 coefficient is consistent with the unencrypted data in format, so that the encrypted DC coefficient can participate in subsequent calculations together with the unencrypted AC coefficient.

[0091] In step 10, the scrambling and confusion is performed. Specifically, a scrambling key is first derived from the encryption key, and the encrypted line and surface data and unencrypted points are scrambled and confused by the scrambling key to obtain the final encrypted vector data.

[0092] (1) The role of deriving scrambling keys.

[0093] In this application, the scrambling key is generated by the encryption key and has a different value from the encryption key. The encrypted line and surface data and the unencrypted points are scrambled and confused using the derived scrambling key instead of directly using the encryption key. Using the scrambling key for scrambling can separate the scrambling operation from the encryption operation. Even if the attacker obtains the scrambling key, the encryption key cannot be directly derived. This design increases the security of the key and reduces the risk of key leakage.

[0094] Using the derivation method to generate scrambling keys 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 based on a timestamp or a random number, so that the scrambling key used for each encryption operation is different, which enhances the ability to resist replay attacks.

[0095] (2) The effect of scrambling and confusing.

[0096] In this application, scrambling 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 that are not extracted in step 3.

[0097] In the selective encryption process, the present application selects the feature points that need to be encrypted in the spatial domain and selects the DC coefficient for encryption in the frequency domain. By scrambling and confusing, it is difficult for attackers to distinguish between encrypted and unencrypted data, increasing the difficulty of attackers' analysis. At the same time, scrambling and confusing only changes the identification of recorded encrypted and unencrypted data, without changing the content of the data. This design maintains the availability of data while enhancing security.

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

[0099] In another exemplary embodiment of the present application, a vector data decryption method is also provided, including: reading the vector data to be decrypted and selecting a decryption area according to the vector data to be decrypted. The decryption area is inversely scrambled using a scrambling key to obtain a group encryption identifier; the scrambling key is derived from the encryption key and scrambled. According to the group encryption identifier, identification is performed to obtain group encrypted data. The group encrypted data is subjected to frequency domain transformation to obtain a frequency domain matrix. The DC coefficient in the frequency domain matrix is ​​decrypted using an encryption key to obtain a decrypted DC coefficient. The decrypted DC coefficient and the AC coefficient of the frequency domain matrix are reorganized and inversely transformed in the frequency domain to obtain the decrypted vector data.

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

[0101] Step 1: Select the data area that needs to be decrypted according to the user's application requirements.

[0102] Step 2: Generate a scrambling key for scrambling from the encryption key.

[0103] Step 3: De-scramble the encrypted data using the derived scrambling key to obtain the correct block encryption identifier.

[0104] Step 4: Identify the data to be decrypted based on the block encryption identifier obtained by descrambling in step 3.

[0105] Step 5: Perform frequency domain transformation on the identified grouped data to obtain a frequency domain coefficient matrix.

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

[0107] Step 7: Recombine the decrypted DC coefficient and the unencrypted AC coefficient, and then perform inverse frequency domain transformation to obtain the decrypted data required by the user.

[0108] In step 3: the encrypted data is de-scrambled by the derived scrambling key. Specifically, during encryption, the encryption key is first derived to obtain the scrambling key. The encrypted and unencrypted data are scrambled and confused by the derived scrambling key. During decryption, the encryption key is also first derived to obtain the scrambling key, and the encrypted and unencrypted data are de-scrambled by the scrambling key. The accuracy and security of this step directly affects the success of the entire decryption process.

[0109] (1) Accuracy of the scrambled key.

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

[0111] If the parameters for generating the scrambling key are biased, even if the attacker obtains the encryption key, he cannot obtain the scrambling key, and thus cannot descramble the encrypted and unencrypted data, and cannot obtain the correct block encryption identifier.

[0112] (2) Correct implementation of the anti-scrambling algorithm.

[0113] The scrambling key is used to control the scrambling and descrambling process of encrypted and unencrypted data. If the keys do not match, the block cipher identity after descrambling cannot be correctly recovered. The scrambling key must be exactly the same as the scrambling key used during encryption. Any deviation will cause the descrambling to fail.

[0114] The accuracy of the group encryption mark is the basis for ensuring the accuracy of the subsequent decrypted data. If the group encryption mark is wrong, it is impossible to distinguish which data in the spatial domain is encrypted or unencrypted, and it is even more impossible to correctly group and decrypt the DC coefficient in the frequency domain, and thus it is impossible to correctly restore the data.

[0115] In step 5-7: frequency domain transform decryption process. The specific process is as follows.

[0116] 1) Specific operations.

[0117] ① According to the grouping information recorded during encryption, the data to be decrypted is identified and grouped.

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

[0119] ③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.

[0120] ④Decrypt the DC coefficient in the frequency domain coefficient matrix and restore its original value.

[0121] ⑤ The decrypted DC coefficient is recombined with the unencrypted AC coefficient to form a complete frequency domain coefficient matrix.

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

[0123] (2) Efficiency of packet decryption.

[0124] Group decryption has shown remarkable efficiency and flexibility in the frequency domain transform decryption process, becoming a key strategy for processing large-scale data and meeting users' on-demand decryption needs. Its core advantage is that it divides the data into multiple independent groups, each of which can be decrypted separately. This "divide and conquer" strategy significantly reduces the amount of data for a single decryption and reduces the computational complexity. It not only greatly improves the decryption efficiency, but also makes full use of computing resources, especially when processing large-scale data.

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

[0126] Through its high efficiency and support for on-demand decryption, group decryption provides powerful optimization capabilities for frequency domain transform decryption technology, enabling it to demonstrate significant advantages in large-scale data processing and real-time applications, and providing users with more efficient, flexible and secure decryption services.

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

[0128] (1) Compared with traditional methods, this method is more available and applicable in terms of security and integrity of vector data encryption.

[0129] Traditional vector data encryption methods usually adopt an overall encryption strategy. Although the operation is simple, it ignores the unique spatial structure characteristics of vector data. In order to preserve the spatial structure of vector data, the encryption algorithm based on the chaotic system can achieve fine-grained encryption of vector map data, which takes into account the preservation of the spatial structure to a certain extent. However, this type of method still has shortcomings in terms of security and is difficult to resist complex attack methods.

[0130] 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 structural characteristics of vector data, but also significantly improve its security. Since the method divides the data into blocks, the group encryption method can effectively resist a variety of known attack methods, including statistical analysis attacks and differential attacks, and provides reliable security for the storage and transmission of vector data. In addition, by introducing scrambling obfuscation technology, the algorithm's anti-attack ability is further enhanced, making the encrypted data more obfuscated and unpredictable.

[0131] (2) This method is more efficient than traditional encryption schemes when users decrypt smaller amounts of data.

[0132] In the field of vector data encryption, traditional methods mainly use 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 relatively high, when the user only needs to decrypt part of the data, the entire file still needs to be decrypted, resulting in a large amount of calculation and low efficiency. The coordinate encryption method independently encrypts each coordinate point. Although fine-grained decryption can be achieved, due to the excessively fine encryption granularity, a large number of independent decryption operations are required during decryption, which also has efficiency issues.

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

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

[0135] The present application also provides an application scenario, which 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 navigation positioning, route planning, and decision support for autonomous driving vehicles, but its collection and production costs are high, and it is a high-value data resource. When providing services to the outside world, it needs to be encrypted and protected, and is only available to authorized users. The method of the present application can be used to encrypt high-precision map data layer by layer, group by group, and in parallel before release. When a large number of autonomous driving vehicles are used concurrently, they can decrypt the high-precision map data of the required area on demand according to the different locations they describe.

[0136] Based on the same inventive concept, the embodiment of the present application also provides a vector data encryption device for implementing the vector data encryption method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more vector data encryption device embodiments provided below can refer to the limitations of the vector data encryption method above, and will not be repeated here.

[0137] In an exemplary embodiment, a vector data encryption device is provided, comprising: a reading and extraction module, for reading 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; a point element grouping module, for performing quadtree grouping on the elements of the layer type of point according to spatial position characteristics to obtain point element grouping results; a line or surface element grouping module, for performing Douglas-Peucker algorithm grouping on the elements of the layer type of line or surface according to spatial distribution characteristics to obtain line element grouping results or surface element grouping results; a frequency domain transformation module, for transforming the point element grouping results, the elements The line element grouping result or the surface element grouping result is subjected to frequency domain transformation to obtain a frequency domain matrix; an encryption module is used to encrypt the DC coefficient of the frequency domain matrix by using an encryption key to obtain an encrypted DC coefficient; a reorganization and inverse frequency domain transformation module is used to reorganize and inverse frequency domain transform the encrypted DC coefficient and the AC coefficient of the frequency domain matrix to obtain grouped encrypted elements; a scrambling module is used to scramble and confuse the grouped encrypted elements and unencrypted points by using a scrambling key to obtain encrypted vector data; the scrambling key is derived according to the encryption key; the unencrypted point is an unencrypted point in the element whose layer type is a line or a surface.

[0138] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to 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 an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a vector data encryption method is implemented.

[0139] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above-mentioned method embodiments when executing the computer program.

[0140] 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.

[0141] 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.

[0142] 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 used 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 must comply with relevant regulations.

[0143] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. 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 may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0144] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0145] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this specification.

[0146] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A vector data encryption method, characterized in that: The vector data encryption method comprises: Reading 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; The point elements of the layer type are grouped by quadtree according to the spatial position characteristics to obtain a point element grouping result; The elements of the layer type of line or surface are grouped according to spatial distribution characteristics using the Douglas-Peucker algorithm to obtain a line element grouping result or a surface element grouping result; 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 coefficient of the frequency domain matrix using an encryption key to obtain an encrypted DC coefficient; Recombining and inverse frequency domain transforming the encrypted DC coefficient and the AC coefficient of the frequency domain matrix to obtain grouped encrypted elements; The encrypted elements and unencrypted points of the group are scrambled and confused using a scrambling key to obtain encrypted vector data; the scrambling key is derived based on the encryption key; the unencrypted points are unencrypted points in the elements whose layer type is line or surface.

2. The vector data encryption method according to claim 1, characterized in that: The point elements of the layer type are grouped by quadtree according to the spatial positions of the elements to obtain the point element grouping results, which specifically include: The elements whose layer type is point are divided into blocks by quadtree according to the spatial position characteristics to obtain a block result; the number of elements whose layer type is point in each leaf node of the quadtree is less than or equal to a set number threshold; The elements of the layer type being points are grouped according to the block results to obtain point element grouping results; the number of elements in the block results is greater than 1.

3. The vector data encryption method according to claim 1, characterized in that: The elements of the layer type of line or surface are grouped according to the spatial distribution characteristics using the Douglas-Peucker algorithm to obtain the line element grouping result or the surface element grouping result, which specifically includes: Select spatial distribution feature points of the elements whose layer type is line or surface by using Douglas-Peucker algorithm; The elements whose layer type is line or surface are grouped according to the spatial distribution feature points to obtain a line element grouping result or a surface element grouping result.

4. The vector data encryption method according to claim 3, characterized in that: The Douglas-Peucker algorithm is used to select spatial distribution feature points of the line or surface elements of the layer type, specifically including: For the elements whose layer type is a surface, the boundary lines in the elements are split into elements whose layer type is a line; For the element whose layer type is line, determine the straight line according to the starting and ending points of the element; Calculate the distances from all points on the element curve whose layer type is line to the straight line; Obtaining the maximum distance among the distances and recording the point corresponding to the maximum distance; Determine whether the maximum distance is less than a set distance threshold, and obtain a determination result; If the judgment result is yes, connecting the first and last points of the straight line as spatial distribution feature points; If the judgment result is no, retaining the point corresponding to the maximum distance, and dividing the curve of the element whose layer type is line into a left part of the curve and a right part of the curve with the point corresponding to the maximum distance as a boundary; Determine the straight lines for the left part and the right part of the curve according to the starting and ending points of the elements respectively and return to the step of "calculating the distances from all points on the element curve whose layer type is line to the straight line".

5. The vector data encryption method according to claim 1, characterized in that: Encrypting the DC coefficient of the frequency domain matrix using an encryption key to obtain an encrypted DC coefficient specifically includes: The DC coefficient of the frequency domain matrix is ​​encrypted in a format-preserving manner using the SM4 algorithm to obtain an encrypted DC coefficient.

6. A vector data decryption method, characterized in that: The vector data decryption method comprises: Reading the vector data to be decrypted and selecting a decryption area according to the vector data to be decrypted; Descrambling the decryption area using a scrambling key to obtain a block encryption identifier; the scrambling key is derived from the encryption key and scrambled; Identify according to the group encryption identifier to obtain group encrypted data; Performing frequency domain transformation on the grouped encrypted data to obtain a frequency domain matrix; Decrypting the DC coefficient in the frequency domain matrix using an encryption key to obtain a decrypted DC coefficient; The decrypted DC coefficient and the AC coefficient of the frequency domain matrix are reorganized and inversely transformed in the frequency domain to obtain decrypted vector data.

7. A vector data encryption device, characterized in that: The vector data encryption device comprises: A reading and extraction module, used 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 is used to perform quadtree grouping on the elements of the layer type being points according to spatial position characteristics to obtain a point element grouping result; A line or surface element grouping module is used to group the elements of the layer type of line or surface according to spatial distribution characteristics using the Douglas-Peucker algorithm to obtain a line element grouping result or a surface element grouping result; A frequency domain transformation module, used for 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; An encryption module, used for encrypting the DC coefficient of the frequency domain matrix using an encryption key to obtain an encrypted DC coefficient; A reorganization and inverse frequency domain transformation module, used for reorganizing and inverse frequency domain transformation the encrypted DC coefficient and the AC coefficient of the frequency domain matrix to obtain grouped encrypted elements; The scrambling module is used to scramble and confuse the encrypted elements and unencrypted points of the group using a scrambling key to obtain encrypted vector data; the scrambling key is derived based on the encryption key; the unencrypted point is an unencrypted point in the element whose layer type is a line or a surface.

8. A computer device comprising: A memory, a processor, and a computer program stored in 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 to 5.

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

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the vector data encryption method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Vector geographic data encryption and decryption method and system

    CN112989394A

  • 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

  • Commutative encryption and watermarking method based on chaotic system and zero watermark for vector geospatial data

    US12158928B1