Local encryption and decryption method for vector data network transmission based on multi-level spatial index
Through the local encryption and decryption method of vector data network transmission based on multi-level spatial index, the R* tree index and Logistics chaotic function are used to solve the problem of low transmission efficiency in the existing technology, and the efficient, safe and flexible localization of vector data is achieved. Encrypt and decrypt.
Patent Information
- Application Number
- CN202111152918.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-09-29
AI Technical Summary
The existing vector geographic data encryption technology has a large amount of data transmission and lacks flexibility, and cannot fully utilize the spatial position relationship and multi-level spatial index structure of entities in vector data, resulting in low transmission efficiency.
The local encryption and decryption method of vector data network transmission based on multi-level spatial index is adopted, and the minimum external rectangle of vector geographic data is constructed through the R* tree index, and the feature set is generated, and the Logistics chaotic function is used for encryption and decryption to realize local information encryption and decryption.
It improves the transmission efficiency, security and adaptability of vector data during network transmission, and reduces the burden of non-essential data transmission and encryption and decryption computing.
Smart Images

Figure CN113901159B_ABST
Abstract
Description
Technical Field
[0001] The disclosed embodiments relate to the field of data processing technology, and in particular to a local encryption and decryption method for vector data network transmission based on multi-level spatial indexing. Background Art
[0002] At present, as the core data type in the field of modern surveying and mapping geographic information, spatial vector geographic data has a wide range of applications in production and life. How to safely store and transmit vector geographic data has become an urgent problem to be solved in the field of surveying and mapping geographic information. Most of the existing vector geographic data encryption technologies only consider the security of overall encryption, often with large amounts of data to be transmitted, lack of flexibility, and failure to fully utilize the spatial position relationship and multi-level spatial index structure of entities in vector data, and unable to encrypt local information. After overall encryption, users need to receive the entire data and perform overall decryption to obtain the required local spatial information, which causes a large amount of unnecessary data transmission and encryption and decryption calculation burden, resulting in low overall transmission efficiency.
[0003] It can be seen that there is an urgent need for a secure, efficient and adaptable local encryption and decryption method for vector data network transmission based on multi-level spatial indexing. Summary of the invention
[0004] In view of this, an embodiment of the present disclosure provides a local encryption and decryption method for vector data network transmission based on multi-level spatial indexing, which at least partially solves the problems of poor security, transmission efficiency and adaptability in the prior art.
[0005] The embodiment of the present disclosure provides a method for local encryption and decryption of vector data network transmission based on multi-level spatial index, including:
[0006] Obtaining the element location and attribute information of the vector geographic data according to its type, constructing an R* tree index of the vector geographic data with a minimum circumscribed rectangle, and generating an element set with all leaf nodes of the R* tree index;
[0007] Generate initial parameter values according to the outline coordinates of the minimum circumscribed rectangle of each leaf node, and calculate bifurcation parameters and secret key strings with the initial parameter values;
[0008] After converting the secret key character string into a numerical value, a parameter value of a Logistic chaos function is calculated, and a cosine transformation result of a point coordinate set of the element set is substituted into an encryption formula for encryption and the encryption result is subjected to chaotic random scrambling;
[0009] Performing a local area search in the R* tree index according to the received query instruction, and defining the searched leaf node element set as a target set;
[0010] After converting the secret key string corresponding to each leaf node in the target set into a numerical value, the parameter value of the Logistic chaos function is calculated, and the encryption result is subjected to chaotic random descrambling and the inverse cosine transform of the descrambled result is substituted into the decryption formula to obtain the decryption result.
[0011] According to a specific implementation of an embodiment of the present disclosure, the vector geographic data includes point elements, line elements and surface elements, and the steps of obtaining element positions and attribute information according to the type of the vector geographic data, constructing an R* tree index of the vector geographic data with a minimum circumscribed rectangle, and generating an element set with all leaf nodes of the R* tree index include:
[0012] Acquire the attribute information and coordinate data of each point element, and acquire the upper left corner coordinates and the lower right corner coordinates of the minimum circumscribed rectangle corresponding to each line element and each surface element;
[0013] Traversing all the point elements, the line elements and the surface elements to obtain a spatial coordinate set corresponding to the vector geographic data, wherein the spatial coordinate set includes a point coordinate set corresponding to all the point elements and a minimum circumscribed rectangle coordinate set corresponding to the line elements and the surface elements;
[0014] Construct a hash table to store the coordinates and attribute values of each feature;
[0015] Initialize and construct an R* tree structure and set the maximum value of the node capacity of the R* tree structure;
[0016] Input the spatial coordinate set into the R* tree structure, construct the R* tree index, insert entries and record the number of leaf nodes;
[0017] Searching for a corresponding element in the hash table according to an entry in the leaf node;
[0018] Traverse all the leaf nodes to generate the element set.
[0019] According to a specific implementation of an embodiment of the present disclosure, the step of generating an initial parameter value according to the outline coordinates of the minimum circumscribed rectangle of each leaf node, and calculating the bifurcation parameter and the key string with the initial parameter value includes:
[0020] Calculate the length and height of each leaf node according to the outline coordinates of the minimum circumscribed rectangle;
[0021] Calculate an initial parameter value of each leaf node according to the length and the height;
[0022] The bifurcation parameter and the secret key string are calculated according to the initial parameter value.
[0023] According to a specific implementation of the embodiment of the present disclosure, the steps of converting the secret key string into a numerical value and then calculating the parameter value of the Logistics chaotic function, and substituting the cosine transformation result of the point coordinate set of the element set into the encryption formula for encryption and performing chaotic random scrambling on the encryption result include:
[0024] In the sequence of each leaf node, obtain the ASCII code of the corresponding key string, convert the key string into a binary value, and then convert it into a decimal value;
[0025] Calculating the initial state value and the number of iterations of the Logistics chaotic function according to the decimal value;
[0026] Calculating the updated state value of the Logistics chaotic function according to the bifurcation parameter, the initial state value and the number of iterations;
[0027] Iteratively calculate the point coordinate set according to the update state value, the bifurcation parameter and the iteration number to obtain a first transformation parameter set;
[0028] Performing discrete cosine transform operations on two columns in the first transform parameter set respectively to obtain a calculation result sequence;
[0029] Substituting the integer part and the decimal part in the calculation result sequence into the encryption formula respectively for encryption, and recombining the encrypted integer part and the decimal part to obtain the encryption result;
[0030] A logical chaotic map is used to generate a random scrambling coefficient of a corresponding length, the encryption result is chaotically scrambled, and other attributes of the leaf node are symmetrically encrypted and uniformly saved.
[0031] According to a specific implementation of an embodiment of the present disclosure, the step of performing a local area search in the R* tree index according to the received query instruction and defining the searched leaf node element set as a target set includes:
[0032] The area range corresponding to the query instruction is set as a rectangle, and a coordinate sequence is generated according to the area range;
[0033] Retrieving the intersection areas of different rectangles from the coordinate sequence through the R* tree index;
[0034] The leaf nodes in the intersection area are taken as a set, the corresponding spatial coordinates therein are traversed, the insert marks are used as the segmentation and the header information of the insert attributes are inserted, and the set is saved as the target set through serialization operation and the hash value of the target set is calculated.
[0035] According to a specific implementation of an embodiment of the present disclosure, the steps of converting the key string corresponding to each leaf node in the target set into a numerical value, calculating the parameter value of the Logistics chaotic function, and performing chaotic random descrambling on the encryption result and substituting the inverse cosine transform of the descrambled result into the decryption formula to obtain the decryption result include:
[0036] Segment the target set according to the mark to obtain a coordinate sequence set to be decrypted and header information;
[0037] Using a logical chaotic map to generate a random scrambling coefficient with the same length as the coordinate sequence set to be decrypted, and performing reverse chaotic scrambling to obtain a coordinate set of points to be decrypted;
[0038] Obtain the ASCII code of the secret key string corresponding to each sequence in the set of coordinate sequences to be decrypted, convert the secret key string into a binary value and then convert it into a decimal value;
[0039] Calculate the bifurcation parameter, the first state value and the number of iterations of the Logistics chaotic function according to the decimal value corresponding to the coordinate sequence set to be decrypted;
[0040] Calculating the second state value of the Logistics chaotic function according to the bifurcation parameter, the first state value and the number of iterations corresponding to the coordinate sequence set to be decrypted;
[0041] Iteratively calculate the coordinate set of the points to be decrypted according to the second state value, bifurcation parameter and iteration number corresponding to the coordinate sequence set to be decrypted, to obtain a second transformation parameter set;
[0042] Performing an inverse discrete cosine transform operation on two columns in the second transform parameter set respectively to obtain a decryption result sequence;
[0043] The integer part and the decimal part in the decryption result sequence are respectively substituted into the decryption formula for decryption, and the decrypted integer part and the decimal part are recombined, and the attributes on the corresponding leaf nodes are decrypted to obtain the decryption result.
[0044] The local encryption and decryption scheme for network transmission of vector data based on multi-level spatial index in the embodiment of the present disclosure includes: obtaining the element position and attribute information of the vector geographic data according to the type of the vector geographic data, constructing the R* tree index of the vector geographic data with the minimum circumscribed rectangle, and generating an element set with all leaf nodes of the R* tree index; generating an initial parameter value according to the contour coordinates of the minimum circumscribed rectangle of each leaf node, and calculating the bifurcation parameter and secret key string with the initial parameter value; converting the secret key string into a numerical value and calculating the parameter value of the Logistics chaotic function, and substituting the cosine transformation result of the point coordinate set of the element set into the encryption formula for encryption and performing chaotic random scrambling on the encryption result; performing a local area search in the R* tree index according to the received query instruction, and defining the searched leaf node element set as a target set; converting the secret key string corresponding to each leaf node in the target set into a numerical value and calculating the parameter value of the Logistics chaotic function, and performing chaotic random descrambling on the encryption result and substituting the inverse cosine transformation of the descrambled result into the decryption formula to obtain the decryption result.
[0045] The beneficial effects of the embodiments of the present disclosure are as follows: through the scheme of the present disclosure, a geographic spatial vector data encryption method with multi-level spatial indexing technology is constructed, which fully utilizes the spatial position relationship of entities in the vector data and the multi-level spatial index structure to perform local information encryption and decryption, thereby improving the transmission efficiency, security and adaptability of vector data during network transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, 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 disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 A flowchart of a method for local encryption and decryption of vector data network transmission based on multi-level spatial indexing provided by an embodiment of the present disclosure;
[0048] Figure 2 A road network data schematic diagram provided by an embodiment of the present disclosure;
[0049] Figure 3 A schematic diagram of the construction result of an R* tree index provided in an embodiment of the present disclosure;
[0050] Figure 4 A schematic diagram of an overall encryption result provided by an embodiment of the present disclosure;
[0051] Figure 5A schematic diagram of an index area search result provided by an embodiment of the present disclosure;
[0052] Figure 6 A schematic diagram of a local decryption result provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0053] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0054] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0055] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0056] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0057] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0058] At present, as the core data type in the field of modern surveying and mapping geographic information, spatial vector geographic data has a wide range of applications in production and life. How to safely store and transmit vector geographic data has become an urgent problem to be solved in the field of surveying and mapping geographic information. Most of the existing vector geographic data encryption technologies only consider the security of overall encryption, often with large amounts of data to be transmitted, lack of flexibility, and failure to fully utilize the spatial position relationship and multi-level spatial index structure of entities in vector data, and unable to encrypt local information. After overall encryption, users need to receive the entire data and perform overall decryption to obtain the required local spatial information, which causes a large amount of unnecessary data transmission and encryption and decryption calculation burden, resulting in low overall transmission efficiency.
[0059] The embodiments of the present disclosure provide a local encryption and decryption method for vector data network transmission based on multi-level spatial indexing. The method can be applied to spatial data processing or vector data transmission in geographic information security scenarios.
[0060] See also Figure 1 , is a flow chart of a method for local encryption and decryption of vector data network transmission based on multi-level spatial indexing provided by an embodiment of the present disclosure. Figure 1 As shown, the method mainly comprises the following steps:
[0061] S101, obtaining the element position and attribute information of the vector geographic data according to its type, constructing an R* tree index of the vector geographic data with a minimum circumscribed rectangle, and generating an element set with all leaf nodes of the R* tree index;
[0062] In the specific implementation, considering that the vector geographic data generally includes multiple types of data such as point data, line data and surface data, for example, the element location and attribute information can be obtained according to different point data types, and then the R* tree index of the vector geographic data is constructed with the minimum circumscribed rectangle of the line data and the surface data, and the element set corresponding to the vector geographic data is generated with all leaf nodes of the R* tree index. Of course, other spatial indexing methods such as multi-level grid spatial index, quadtree spatial index, R-tree index, etc. can also be used to generate the element set corresponding to the vector geographic data.
[0063] S102, generating initial parameter values according to the outline coordinates of the minimum circumscribed rectangle of each leaf node, and calculating bifurcation parameters and a key string using the initial parameter values;
[0064] In specific implementation, after obtaining the element set corresponding to the R* tree index, the initial parameter value can be generated according to the contour coordinates of the minimum circumscribed rectangle of each leaf node, and the bifurcation parameter and secret key string can be calculated with the initial parameter value to facilitate the subsequent data decryption process.
[0065] S103, converting the secret key string into a numerical value and calculating the parameter value of the Logistics chaotic function, and substituting the cosine transformation result of the point coordinate set of the element set into the encryption formula for encryption and performing chaotic random scrambling on the encryption result;
[0066] In specific implementation, the spatial position relationship of entities in vector geographic data and the multi-level spatial index structure can be used to convert the key string into a numerical value and then calculate the parameter value of the Logistics chaotic function. In addition, the cosine transformation result of the point coordinate set of the feature set is substituted into the encryption formula for encryption and the encryption result is randomly scrambled, and each leaf node is encrypted separately.
[0067] S104, performing a local area search in the R* tree index according to the received query instruction, and defining the searched leaf node element set as a target set;
[0068] Taking into account that all the vector geographic data are encrypted, and in actual use, the query instruction may only need to query the vector geographic data of a part of the area, then after receiving the query instruction, a local area search can be performed in the R* tree index according to the query instruction, and the searched leaf node feature set can be defined as the target set.
[0069] S105, converting the secret key string corresponding to each leaf node in the target set into a numerical value, calculating the parameter value of the Logistics chaotic function, and performing chaotic random descrambling on the encryption result and substituting the inverse cosine transform of the descrambled result into the decryption formula to obtain the decryption result.
[0070] After obtaining the target set, the key string corresponding to each leaf node in the target set can be converted into a numerical value and then the parameter value of the Logistics chaotic function can be calculated. In addition, the encryption result can be subjected to chaotic random descrambling and the inverse cosine transform of the descrambled result can be substituted into the decryption formula. The decrypted result can be obtained by reversely decrypting the encrypted data.
[0071] The local encryption and decryption method for vector data network transmission based on multi-level spatial indexing provided in this embodiment constructs a geographic space vector data encryption method using multi-level spatial indexing technology, fully utilizes the spatial position relationship of entities in vector data and the multi-level spatial index structure, performs local information encryption and decryption, and improves the transmission efficiency, security and adaptability of vector data during network transmission.
[0072] On the basis of the above embodiment, the vector geographic data includes point elements, line elements and surface elements. The step S101, according to the type of the vector geographic data, obtains the element position and attribute information thereof, constructs an R* tree index of the vector geographic data with a minimum circumscribed rectangle, and generates an element set with all leaf nodes of the R* tree index, including:
[0073] Acquire the attribute information and coordinate data of each point element, and acquire the upper left corner coordinates and the lower right corner coordinates of the minimum circumscribed rectangle corresponding to each line element and each surface element;
[0074] Traversing all the point elements, the line elements and the surface elements to obtain a spatial coordinate set corresponding to the vector geographic data, wherein the spatial coordinate set includes a point coordinate set corresponding to all the point elements and a minimum circumscribed rectangle coordinate set corresponding to the line elements and the surface elements;
[0075] Construct a hash table to store the coordinates and attribute values of each feature;
[0076] Initialize and construct an R* tree structure and set the maximum value of the node capacity of the R* tree structure;
[0077] Input the spatial coordinate set into the R* tree structure, construct the R* tree index, insert entries and record the number of leaf nodes;
[0078] Searching for a corresponding element in the hash table according to an entry in the leaf node;
[0079] Traverse all the leaf nodes to generate the element set.
[0080] The present invention will be described below in conjunction with a specific embodiment. For example, the geographic spatial vector geographic line data of the Shapefile file of a road network in a city in my country is used to illustrate the specific implementation of the present invention. The vector data is as follows: Figure 2 As shown, get the minimum enclosing rectangle of each line element and record the coordinates of its lower left corner and upper right corner respectively (x min ,y min ) and (x max ,y max ), traverse all features to obtain the spatial position coordinate set of vector geographic data, and obtain the coordinate set of the minimum enclosing rectangle of each feature. Construct a hash table FeatureMap to save the coordinates and attribute values of each vector feature, where the Key is the coordinate position and the Value is the SimpleFeature attribute of each feature.
[0081] Then initialize and build the R* tree structure, and set the maximum value of the node capacity of the R* tree structure to 20. Input the spatial position set of the vector geographic elements into the R* tree structure, build the R* tree index, insert entries according to the principle of minimum expansion cost, and record the number of entries or child nodes in the node as Nk. k When it is greater than 20, the node needs to be split, and the splitting principle follows the minimum enclosing rectangle.
[0082] After the R* tree index of the vector geographic data is constructed, the corresponding feature object is found in the FeatureMap according to the entry in the leaf node. All leaf nodes are traversed to construct the index set FeatureIndex of all features, where the sequence of each leaf node is represented as node i , the sequence contains all the feature objects of the leaf node, and the R* tree index of the appropriate amount of geographic data is constructed. The result is as follows Figure 3 shown.
[0083] Furthermore, in step S102, generating initial parameter values according to the outline coordinates of the minimum circumscribed rectangle of each leaf node, and calculating the bifurcation parameter and the key string with the initial parameter values includes:
[0084] Calculate the length and height of each leaf node according to the outline coordinates of the minimum circumscribed rectangle;
[0085] Calculate an initial parameter value of each leaf node according to the length and the height;
[0086] The bifurcation parameter and the secret key string are calculated according to the initial parameter value.
[0087] In specific implementation, according to the minimum enclosing rectangle R of each leaf node i i The contour coordinates, that is, R i The lower left corner coordinate (x min ,y min ) i With the upper right corner coordinate (x max ,y max ) i , and calculate R i Length i and height i .
[0088] Now take R0 as an example, Rectangle[x min =110.2313198,y min =19.7305877,x max =110.2552547,y max=19.753232], we get:
[0089] Length0=x max0 -x min0 =0.0239349
[0090] Height t0=y max0 -y min0 =0.0226443
[0091] Calculate the initial parameter value para0 of the leaf node i:
[0092] para0=SUM(Length0,Heigh t0)*2 10 =47.6971008
[0093] Calculate the bifurcation parameter μ0 of the node according to para0:
[0094] μ0=(para0mod 0.430055)+3.569945=3.9609958
[0095] Let Key2 = "encryptTest" and calculate the key string E0 of the node according to para0:
[0096] E0=SM3([para0 / 2]+Num(R0))2*Key2)
[0097] =5789e08b08267472621bb126edb09b80e053768129f86052fbe93036f350508b.
[0098] On the basis of the above embodiment, the step S103, converting the key string into a numerical value and then calculating the parameter value of the Logistics chaotic function, and substituting the cosine transformation result of the point coordinate set of the element set into the encryption formula for encryption and performing chaotic random scrambling on the encryption result, includes:
[0099] In the sequence of each leaf node, obtain the ASCII code of the corresponding key string, convert the key string into a binary value, and then convert it into a decimal value;
[0100] Calculating the initial state value and the number of iterations of the Logistics chaotic function according to the decimal value;
[0101] Calculating the updated state value of the Logistics chaotic function according to the bifurcation parameter, the initial state value and the number of iterations;
[0102] Iteratively calculate the point coordinate set according to the update state value, the bifurcation parameter and the iteration number to obtain a first transformation parameter set;
[0103] Performing discrete cosine transform operations on two columns in the first transform parameter set respectively to obtain a calculation result sequence;
[0104] Substituting the integer part and the decimal part in the calculation result sequence into the encryption formula respectively for encryption, and recombining the encrypted integer part and the decimal part to obtain the encryption result;
[0105] A logical chaotic map is used to generate a random scrambling coefficient of a corresponding length, the encryption result is chaotically scrambled, and other attributes of the leaf node are symmetrically encrypted and uniformly saved.
[0106] For example, in the sequence of each leaf node i, the ASCII code of a single character of the key string E0 is obtained, the string is converted into a binary value, and then converted into a decimal value BigI0. Next, the initial value of the Iogistics chaotic function is calculated, and the required parameters include the bifurcation parameter μ i , the initial state value x0, the number of iterations n, where the random number μ0 generated in the second part is 3.9609958, x0 and n are calculated by the formula:
[0107]
[0108] n=(BigI i mod 2 14 )+500=14934
[0109] Calculate the three values using the chaotic mapping formula to get the updated state value x after n iterations n =0.7994300412699675;
[0110] The length of the point coordinate set is recorded as L = 71, and then μ0, x n and L are used as the initial values of the logical chaotic map and are brought into the formula for iterative calculation, and the result of each iteration is recorded to obtain the first transformation parameter set I0;
[0111] For the point coordinate set P x,y The two columns of coordinate values are discrete cosine transformed to obtain the discrete cosine transform calculation result sequence dctP x,y . x,y The sequence is brought into the encryption formula for encryption calculation, and the integer part result is recombined with the decimal part:
[0112] dctP i =Int i +Dec i
[0113]
[0114]
[0115]
[0116] Use logical chaotic mapping to generate chaotic random scrambling coefficients of corresponding lengths for chaotic scrambling. Then replace the initial coordinate points with all coordinate points, and process the other attributes of the initial point through SM4 symmetric encryption. The key is the last 16 bytes of E0 "e0537b8129f86052fbe93036f350508b". The result is saved in the original data format or saved in the database;
[0117] Since the leaf nodes do not affect each other, the parallel computing method can be used to perform encryption calculations on all leaf nodes, and the key parameters of each leaf node are saved. The encryption result is as follows: Figure 4 shown.
[0118] On the basis of the above embodiment, as described in step S104, a local area search is performed in the R* tree index according to the received query instruction, and the searched leaf node element set is defined as a target set, including:
[0119] The area range corresponding to the query instruction is set as a rectangle, and a coordinate sequence is generated according to the area range;
[0120] Retrieving the intersection areas of different rectangles from the coordinate sequence through the R* tree index;
[0121] The leaf nodes in the intersection area are taken as a set, the corresponding spatial coordinates therein are traversed, the insert marks are used as the segmentation and the header information of the insert attributes are inserted, and the set is saved as the target set through serialization operation and the hash value of the target set is calculated.
[0122] In specific implementation, when the user selects an area for local vector data query, the query needs to be used as the query instruction, and the area range S to be queried is obtained according to the query instruction. It is assumed that it is a rectangle, with lower left corner coordinates (110.30666, 20.04324) and upper right corner coordinates (110.35430, 20.08294). The range coordinate values of S are used to generate a coordinate sequence [110.30666, 20.04324, 110.35430, 20.08294] and transmitted to the server of the electronic device via the network for processing.
[0123] Then, the coordinate sequence can be searched for the area range through the R* tree index. The core method is to determine whether the rectangles intersect. Suppose the first rectangle is (x1, y1), (x2, y2), and the second rectangle is (x3, y3), (x4, y4). When the following formula is satisfied, the two rectangles intersect:
[0124] max(x1,x3)<=min(x2,x4)&&max(y1,y3)<=min(y2,y4)
[0125] Then take the leaf nodes with overlapping regions as a set, traverse the vector geographic spatial objects contained therein, and obtain the query results as follows Figure 5 As shown, the sequence is saved in the DeFeature, a marker is inserted as a segment, and finally the header information of the attribute is inserted. The sequence is saved as the target set by a serialization method, and its hash value SM3(F) is calculated, and it can also be transmitted back to the user through the network.
[0126] Further, as described in step S105, the key string corresponding to each leaf node in the target set is converted into a numerical value, and then the parameter value of the Logistics chaotic function is calculated, and the encryption result is subjected to chaotic random descrambling and the cosine inverse transform of the descrambling result is substituted into the decryption formula to obtain the decryption result, including:
[0127] Segment the target set according to the mark to obtain a coordinate sequence set to be decrypted and header information;
[0128] Using a logical chaotic map to generate a random scrambling coefficient with the same length as the coordinate sequence set to be decrypted, and performing reverse chaotic scrambling to obtain a coordinate set of points to be decrypted;
[0129] Obtain the ASCII code of the secret key string corresponding to each sequence in the set of coordinate sequences to be decrypted, convert the secret key string into a binary value and then convert it into a decimal value;
[0130] Calculate the bifurcation parameter, the first state value and the number of iterations of the Logistics chaotic function according to the decimal value corresponding to the coordinate sequence set to be decrypted;
[0131] Calculating the second state value of the Logistics chaotic function according to the bifurcation parameter, the first state value and the number of iterations corresponding to the coordinate sequence set to be decrypted;
[0132] Iteratively calculate the coordinate set of the points to be decrypted according to the second state value, bifurcation parameter and iteration number corresponding to the coordinate sequence set to be decrypted, to obtain a second transformation parameter set;
[0133] Performing an inverse discrete cosine transform operation on two columns in the second transform parameter set respectively to obtain a decryption result sequence;
[0134] The integer part and the decimal part in the decryption result sequence are respectively substituted into the decryption formula for decryption, and the decrypted integer part and the decimal part are recombined, and the attributes on the corresponding leaf nodes are decrypted to obtain the decryption result.
[0135] For example, after obtaining the encrypted target set, the target set is segmented by marking to obtain the coordinate sequence set and header information to be decrypted. The chaotic random scrambling coefficients of corresponding length are generated by logical chaotic mapping, and reverse chaotic scrambling is performed to obtain the coordinate set P of the point to be decrypted. x,y ;
[0136] In each sequence i, get the key string E j The ASCII code of a single character, convert the string into a binary value, and then convert it into a decimal value BigI i Next, the first state value of the logistics chaotic function is calculated. The required parameters include the bifurcation parameter μ i , initial state value x0, number of iterations n, where μ i The random numbers generated in the second part, x0 and n are calculated using the formula:
[0137] x0=(BigI i mod 10 20 ) / 10 20
[0138] n=(BigI i mod 2 14 )+500
[0139] The three values are calculated by the chaotic mapping formula to obtain the second state value x after n iterations. n :
[0140] x n+1 =μ i x n (1-x n )
[0141] Let the length of the coordinate point set be L, and then μ i , xn and L are taken as the initial values of the logical chaotic map and are brought into the formula for iterative calculation. The result of each iteration is recorded to obtain the second transformation parameter set I i ;
[0142] For the set of coordinate points P x,yThe two columns of coordinate values are subjected to inverse discrete cosine transform respectively to obtain the calculation result sequence idctP of inverse discrete cosine transform x,y . For idctP x,y The sequence is brought into the formula for encryption calculation, and the integer part of the result is recombined with the decimal part:
[0143] idctP i =Int i +Dec i
[0144]
[0145]
[0146]
[0147] Then replace all coordinate points with the initial coordinate points, and process the attributes of the initial points through SM4 symmetric decryption, with the key E j The last 16 bytes of "e0537b8129f86052fbe93036f350508b" are written into the original data format file.
[0148] Traverse all leaf nodes in the target set and repeat the above steps until all points are decrypted to obtain the decryption result of the vector geographic data. Figure 6 shown.
[0149] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A local encryption and decryption method for vector data network transmission based on multi-level spatial index, characterized in that: include: Obtaining the element location and attribute information of the vector geographic data according to its type, constructing an R* tree index of the vector geographic data with a minimum circumscribed rectangle, and generating an element set with all leaf nodes of the R* tree index; Generate initial parameter values according to the outline coordinates of the minimum circumscribed rectangle of each leaf node, and calculate bifurcation parameters and secret key strings with the initial parameter values; After converting the secret key string into a numerical value, the parameter value of the Logistics chaotic function is calculated, and the cosine transformation result of the point coordinate set of the element set is substituted into the encryption formula for encryption and the encryption result is subjected to chaotic random scrambling; Performing a local area search in the R* tree index according to the received query instruction, and defining the searched leaf node element set as a target set; The key character string corresponding to each leaf node in the target set is converted into a numerical value, and then the parameter value of the Logistics chaotic function is calculated. In addition, the encryption result is subjected to chaotic random descrambling and the inverse cosine transform of the descrambling result is substituted into the decryption formula to obtain the decryption result.
2. The method according to claim 1, characterized in that The vector geographic data includes point elements, line elements and surface elements. The steps of obtaining element positions and attribute information according to the type of the vector geographic data, constructing an R* tree index of the vector geographic data with a minimum circumscribed rectangle, and generating an element set with all leaf nodes of the R* tree index include: Acquire the attribute information and coordinate data of each point element, and acquire the upper left corner coordinates and the lower right corner coordinates of the minimum circumscribed rectangle corresponding to each line element and each surface element; Traversing all the point elements, the line elements and the surface elements to obtain a spatial coordinate set corresponding to the vector geographic data, wherein the spatial coordinate set includes a point coordinate set corresponding to all the point elements and a minimum circumscribed rectangle coordinate set corresponding to the line elements and the surface elements; Construct a hash table to store the coordinates and attribute values of each feature; Initialize and construct an R* tree structure and set the maximum value of the node capacity of the R* tree structure; Input the spatial coordinate set into the R* tree structure, construct the R* tree index, insert entries and record the number of leaf nodes; Searching for a corresponding element in the hash table according to an entry in the leaf node; Traverse all the leaf nodes to generate the element set.
3. The method according to claim 2, characterized in that The step of generating an initial parameter value according to the contour coordinates of the minimum circumscribed rectangle of each leaf node and calculating the bifurcation parameter and the key string with the initial parameter value includes: Calculate the length and height of each leaf node according to the outline coordinates of the minimum circumscribed rectangle; Calculate an initial parameter value of each leaf node according to the length and the height; The bifurcation parameter and the secret key string are calculated according to the initial parameter value.
4. The method according to claim 3, characterized in that The steps of converting the secret key string into a numerical value and calculating the parameter value of the Logistics chaotic function, and substituting the cosine transformation result of the point coordinate set of the element set into the encryption formula for encryption and performing chaotic random scrambling on the encryption result include: In the sequence of each leaf node, obtain the ASCII code of the corresponding key string, convert the key string into a binary value, and then convert it into a decimal value; Calculating the initial state value and the number of iterations of the Logistics chaotic function according to the decimal value; Calculating the updated state value of the Logistics chaotic function according to the bifurcation parameter, the initial state value and the number of iterations; Iteratively calculate the point coordinate set according to the update state value, the bifurcation parameter and the iteration number to obtain a first transformation parameter set; Performing discrete cosine transform operations on two columns in the first transform parameter set respectively to obtain a calculation result sequence; Substituting the integer part and the decimal part in the calculation result sequence into the encryption formula respectively for encryption, and recombining the encrypted integer part and the decimal part to obtain the encryption result; A logical chaotic map is used to generate a random scrambling coefficient of a corresponding length, the encryption result is chaotically scrambled, and other attributes of the leaf node are symmetrically encrypted and uniformly saved.
5. The method according to claim 4, characterized in that The step of performing a local area search in the R* tree index according to the received query instruction and defining the searched leaf node element set as the target set includes: The area range corresponding to the query instruction is set as a rectangle, and a coordinate sequence is generated according to the area range; Retrieving the intersection areas of different rectangles from the coordinate sequence through the R* tree index; The leaf nodes in the intersection area are taken as a set, the corresponding spatial coordinates therein are traversed, the insert marks are used as the segmentation and the header information of the insert attributes are inserted, and the set is saved as the target set through serialization operation and the hash value of the target set is calculated.
6. The method according to claim 5, characterized in that The steps of converting the secret key string corresponding to each leaf node in the target set into a numerical value and calculating the parameter value of the Logistics chaotic function, and performing chaotic random descrambling on the encryption result and substituting the inverse cosine transform of the descrambled result into the decryption formula to obtain the decryption result include: Segment the target set according to the mark to obtain a coordinate sequence set to be decrypted and header information; Using a logical chaotic map to generate a random scrambling coefficient with the same length as the coordinate sequence set to be decrypted, and performing reverse chaotic scrambling to obtain a coordinate set of points to be decrypted; Obtain the ASCII code of the secret key string corresponding to each sequence in the set of coordinate sequences to be decrypted, convert the secret key string into a binary value and then convert it into a decimal value; Calculate the bifurcation parameter, the first state value and the number of iterations of the Logistics chaotic function according to the decimal value corresponding to the coordinate sequence set to be decrypted; Calculating the second state value of the Logistics chaotic function according to the bifurcation parameter, the first state value and the number of iterations corresponding to the set of coordinate sequences to be decrypted; Iteratively calculate the coordinate set of the points to be decrypted according to the second state value, bifurcation parameter and iteration number corresponding to the coordinate sequence set to be decrypted, to obtain a second transformation parameter set; Performing an inverse discrete cosine transform operation on two columns in the second transform parameter set respectively to obtain a decryption result sequence; The integer part and the decimal part in the decryption result sequence are respectively substituted into the decryption formula for decryption, and the decrypted integer part and the decimal part are recombined, and the attributes on the corresponding leaf nodes are decrypted to obtain the decryption result.
Citation Information
Patent Citations
Method for encrypting and decrypting character string
CN109995504A
Vector geographic data encryption and decryption method and system
CN112989394A
A system and method for quantum-safe authentication, encryption and decryption of information
EP3692681A1
Method of generating successions of pseudo-random bits or numbers
US20060251250A1
