Symmetric point correction-based encrypted coordinate system reverse conversion method and device
By using the symmetry point correction method and the publicly available forward encryption algorithm of the target map manufacturer to calculate the initial encrypted coordinate points, an efficient and accurate reverse coordinate transformation is achieved, which solves the problems of large error and high computational load in the existing technology and meets the requirements of high-precision applications.
Patent Information
- Application Number
- CN202511085529.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-07
AI Technical Summary
Existing technologies cannot efficiently achieve high-precision inverse coordinate transformation. They suffer from large errors, high computational load, and dependence on vendor APIs, and cannot meet the needs of high-precision applications, such as high-concurrency scenarios for autonomous driving or drone navigation.
By using a symmetry point correction method, the initial encrypted coordinate points are calculated using the publicly available forward encryption algorithm of the target map manufacturer. Symmetry points are obtained and two-level corrections are performed, including offset calculation and coordinate error correction. The calculation is iterated until the error is less than a set threshold, thus achieving a reverse conversion with sub-meter accuracy.
It achieves efficient and accurate reverse coordinate transformation, eliminating dependence on manufacturer interfaces, meeting the centimeter-level positioning accuracy of autonomous driving equipment in offline scenarios and multi-platform data compatibility of drones in border inspection, and providing a lightweight, high-concurrency location service solution.
Smart Images

Figure CN120907480A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of geographic information systems and coordinate conversion technology, and in particular to a symmetric point correction-based encrypted coordinate system reverse conversion method and device. BACKGROUND
[0002] In the field of geographic information systems (GIS) and coordinate conversion technology in China, the existing technology is mainly applied to the encryption and forward conversion of map data to meet the requirements of national security. According to relevant regulations, all publicly released map data must be subjected to nonlinear offset encryption processing to avoid the improper acquisition of high-precision geographic information. This has led mainstream map vendors (such as Baidu and Gaode) to adopt self-defined encrypted coordinate systems: for example, Gaode Map uses the GCJ-02 coordinate system (Mars coordinate system), which adds a nonlinear offset to the WGS-84 (global GPS standard coordinate system); Baidu Map further encrypts the GCJ-02 to form the BD-09 coordinate system (Baidu coordinate system). These encrypted coordinate systems are widely used in scenarios such as map positioning, navigation systems, location-based services (LPS), including map display, location sharing, and path planning in mobile apps. Developers often need to implement cross-platform data integration, but due to vendor competition strategies, forward conversion algorithms are disclosed and provided as API interfaces to facilitate user data migration. This application environment enhances user stickiness for map vendors while increasing the data migration costs for competitors.
[0003] Although the existing technology's forward conversion function is mature, its core defect lies in the inability to efficiently implement reverse conversion. First, the problem of coordinate system closure is prominent: map vendors only provide forward conversion interfaces and do not disclose or support reverse algorithms, which prevents third-party developers from accurately restoring real locations. Second, existing reverse conversion techniques have significant limitations: polynomial fitting methods often introduce random errors of several to 100 meters due to the neglect of the nonlinear characteristics of encryption algorithms; while linear interpolation methods can handle small-scale offsets, they require a large amount of computational resources in large-scale nonlinear scenarios and are insufficient in terms of accuracy. These problems cannot meet the high-precision application requirements, such as autonomous driving or unmanned aerial vehicle navigation, which require errors to be less than 1 meter. The existing methods are too inaccurate and inefficient in this scenario. In addition, reliance on vendor API calls limits the applicability of offline or high-concurrency scenarios, increasing development complexity and costs.
[0004] Therefore, how to invent and develop a symmetric point correction-based encrypted coordinate system reverse conversion method that can quickly achieve reverse conversion with an accuracy of within 1 meter has become a pressing problem. SUMMARY
[0005] To this end, the application provides a symmetric point correction-based encrypted coordinate system reverse conversion method and device, which solves the problems of large error, high calculation amount, dependence on manufacturer API and inability to achieve high-precision universal conversion in the prior art, and can quickly achieve reverse conversion with a precision within 1 meter.
[0006] To achieve the above object, the application provides the following technical scheme: a symmetric point correction-based encrypted coordinate system reverse conversion method, comprising:
[0007] According to an encrypted coordinate system of a target map manufacturer, an initial encrypted coordinate point A is obtained;
[0008] The initial encrypted coordinate point A is calculated by a forward encryption algorithm disclosed by the target map manufacturer to obtain a position B;
[0009] Based on the initial encrypted coordinate point A and the position B, a symmetric point C is obtained by calculation;
[0010] The symmetric point C is calculated by the forward encryption algorithm to obtain a position D;
[0011] The offset amount of the position D relative to the initial encrypted coordinate point A is calculated to obtain an offset amount DA;
[0012] Based on the offset amount DA, the symmetric point C is corrected to obtain a coordinate E;
[0013] The coordinate E and the initial encrypted coordinate point A are subjected to error calculation to obtain a coordinate error; if the coordinate error is less than a set threshold, the coordinate E is the accurate approximate solution of reverse conversion; if the coordinate error is not less than the set threshold, the symmetric point C is recalculated for iterative calculation until the coordinate error is less than the set threshold.
[0014] As a preferred scheme of the symmetric point correction-based encrypted coordinate system reverse conversion method, in the process of calculating the initial encrypted coordinate point A by the forward encryption algorithm disclosed by the target map manufacturer, the expression of the forward encryption algorithm is (taking Baidu Map BD-09 as an example):
[0015] P(y,x)=GCJ02(A(lat,lng))
[0016]
[0017] B(lat,lng)=(z*sin(θ)+0.006,z*cos(θ)+0.0065)
[0018] In the formula, P(y,x) represents the Mars coordinate system coordinates calculated based on point A; A(lat,lng) represents the coordinates of the initial encrypted coordinate point A; GCJ02 is the publicly available Mars coordinate system encryption formula; P y Let P be the latitude coordinate of point P; x Let P be the longitude coordinates; z be the corrected distance in the BD-09 coordinate system; θ be the corrected angle in the BD-09 coordinate system; and B(lat,lng) be the coordinates of position B.
[0019] As a preferred scheme for the encrypted coordinate system inverse transformation method based on symmetry point correction, the formula for calculating the symmetry point C is:
[0020] C(lat,lng)=(2*A.lat-B.lat,2*A.lng-B.lng)
[0021] In the formula, C(lat,lng) are the coordinates of the symmetrical point C; A.lat is the latitude coordinate of point A; A.lng is the longitude coordinate of point A; B.lat is the latitude coordinate of point B; B.lng is the longitude coordinate of point B.
[0022] As a preferred embodiment of the encrypted coordinate system inverse transformation method based on symmetry point correction, the formula for calculating the coordinate E is:
[0023] E(lat,lng)=(C.lat+A.lat-D.lat,C.lng+A.lng-D.lng)
[0024] In the formula, E(lat,lng) are the coordinates of point E; C.lat is the latitude coordinate of point C; D.lat is the latitude coordinate of point D; C.lng is the longitude coordinate of point C; and D.lng is the longitude coordinate of point D.
[0025] As a preferred embodiment of the encrypted coordinate system inverse transformation method based on symmetry point correction, the formula for calculating the offset ΔDA is:
[0026] △DA=(D.lat-A.lat,D.lng-A.lng)
[0027] In the formula, △DA is the offset.
[0028] This invention also provides a reverse transformation device for encrypted coordinate systems based on symmetry point correction, which, based on the above-mentioned reverse transformation method for encrypted coordinate systems based on symmetry point correction, includes:
[0029] The initial encrypted coordinate point acquisition module is used to obtain the initial encrypted coordinate point A according to the encrypted coordinate system of the target map manufacturer;
[0030] The first encryption calculation module is configured to calculate the initial encrypted coordinate point A by using a forward encryption algorithm disclosed by a target map manufacturer to obtain a position B.
[0031] The symmetry point calculation module is configured to obtain a symmetry point C by calculation based on the initial encrypted coordinate point A and the position B.
[0032] The second encryption calculation module is configured to calculate the symmetry point C by using the forward encryption algorithm to obtain a position D.
[0033] The offset calculation module is configured to obtain an offset ΔDA by calculating an offset of the position D relative to the initial encrypted coordinate point A.
[0034] The corrected coordinate acquisition module is configured to correct the symmetry point C based on the offset ΔDA to obtain a coordinate E.
[0035] The accurate approximate solution acquisition module is configured to obtain a coordinate error by calculating an error between the coordinate E and the initial encrypted coordinate point A. If the coordinate error is less than a set threshold, the coordinate E is an accurate approximate solution of the reverse conversion. If the coordinate error is not less than the set threshold, the symmetry point C is recalculated for iterative calculation until the coordinate error is less than the set threshold.
[0036] As a preferred scheme of the encryption coordinate system reverse conversion device based on symmetry point correction, in the first encryption calculation module, in the process of calculating the initial encrypted coordinate point A by using the forward encryption algorithm disclosed by the target map manufacturer, the expression of the forward encryption algorithm is as follows:
[0037] P(y,x) = GCJ02(A(lat,lng))
[0038]
[0039] B(lat,lng) = (z*sin(θ) + 0.006, z*cos(θ) + 0.0065)
[0040] In the formula, P(y,x) is a Mars coordinate system coordinate calculated according to the point A; A(lat,lng) is a coordinate of the initial encrypted coordinate point A; GCJ02 is a disclosed Mars coordinate system encryption formula; P y is a latitude coordinate of the P point; P x is a longitude coordinate of the P point; z is a correction distance of a BD-09 coordinate system; θ is a correction angle of the BD-09 coordinate system; and B(lat,lng) is a coordinate of the position B.
[0041] As a preferred scheme of the encrypted coordinate system reverse conversion device based on symmetric point correction, in the symmetric point calculation module, the formula for calculating the symmetric point C is:
[0042] C(lat,lng)=(2*A.lat-B.lat,2*A.lng-B.lng)
[0043] In the formula, C(lat,lng) is the coordinate of the symmetric point C; A.lat is the latitude coordinate of point A; A.lng is the longitude coordinate of point A; B.lat is the latitude coordinate of point B; and B.lng is the longitude coordinate of point B.
[0044] As a preferred scheme of the encrypted coordinate system reverse conversion device based on symmetric point correction, in the correction coordinate acquisition module, the calculation formula of the coordinate E is:
[0045] E(lat,lng)=(C.lat+A.lat-D.lat,C.lng+A.lng-D.lng)
[0046] In the formula, E(lat,lng) is the coordinate of point E; C.lat is the latitude coordinate of point C; D.lat is the latitude coordinate of point D; C.lng is the longitude coordinate of point C; and D.lng is the longitude coordinate of point D.
[0047] As a preferred scheme of the encrypted coordinate system reverse conversion device based on symmetric point correction, in the offset calculation module, the calculation formula of the offset △DA is:
[0048] △DA=(D.lat-A.lat,D.lng-A.lng)
[0049] In the formula, △DA is the offset.
[0050] The present application has the following advantages: the present application obtains an initial encrypted coordinate point A according to the encrypted coordinate system of a target map manufacturer; a position B is obtained by calculating the initial encrypted coordinate point A through a forward encryption algorithm disclosed by the target map manufacturer; a symmetric point C is obtained through calculation based on the initial encrypted coordinate point A and the position B; a position D is obtained by calculating the symmetric point C through the forward encryption algorithm; an offset △DA is obtained by calculating the offset of the position D relative to the initial encrypted coordinate point A; a coordinate E is obtained by correcting the symmetric point C based on the offset △DA; a coordinate error is obtained by error calculation on the coordinate E and the initial encrypted coordinate point A; if the coordinate error is less than a set threshold, the coordinate E is the accurate approximate solution of reverse conversion;
[0051] If the coordinate error is not less than a set threshold, the symmetric point C is recalculated, and iterative calculation is performed until the coordinate error is less than the set threshold. The present application achieves sub-meter accuracy with a simple calculation architecture, completely breaking away from the dependence on manufacturer interfaces. Unlike traditional schemes that rely on complex polynomial fitting or massive interpolation operations, the present application innovatively reveals the dual-state characteristics of encryption algorithms in large-scale nonlinearity and small-scale linearity, and realizes efficient conversion through a two-stage correction mechanism: first, the symmetric point structure is used to compress the kilometer-level offset to the order of ten meters, at which time the non-linear error is degraded to an approximate linear relationship; then, residual error is directly eliminated through single linear compensation, so that the final coordinate error is stably controlled within 1 meter. This design not only avoids the algorithm consumption of hundreds of iterations in traditional methods, but also breaks through the technical blockade of manufacturers - only the public forward encryption formula is called to complete the reverse calculation, so that the automatic driving device can still maintain centimeter-level positioning accuracy in offline scenes such as tunnels, and unmanned aerial vehicles can seamlessly compatible with multi-platform map data when patrolling the border. At the same time, the present application is universally applicable to domestic mainstream encryption systems (including BD09 / GCJ-02, etc.), providing a lightweight solution for high-concurrency location services. BRIEF DESCRIPTION OF DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only exemplary, and for those skilled in the art, other drawings can be derived from the provided drawings without creative labor.
[0053] The structures, proportions, sizes, etc. shown in the specification are only used to cooperate with the content disclosed in the specification, to be understood and read by those skilled in the art, and do not define the limiting conditions for the implementation of the present application, so they do not have technical significance. Any modification of the structure, change of the proportion relationship or adjustment of the size, without affecting the effect and purpose that can be achieved by the present application, should still fall within the scope covered by the disclosed technical content.
[0054] Figure 1 A flowchart of a symmetric point correction-based encrypted coordinate system reverse conversion method provided in embodiment 1 of the present application;
[0055] Figure 2 A point position calculation flowchart of a symmetric point correction-based encrypted coordinate system reverse conversion method provided in embodiment 1 of the present application;
[0056] Figure 3 An architecture diagram of a symmetric point correction-based encrypted coordinate system reverse conversion device provided in embodiment 2 of the present application. DETAILED DESCRIPTION
[0057] The present application is described in detail by specific embodiments below, and other advantages and effects of the present application can be easily understood by those skilled in the art from the disclosure of the specification. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0058] Embodiment 1
[0059] Referring to Figure 1 and Figure 2 , embodiment 1 of the present application provides a symmetric point correction-based encrypted coordinate system reverse conversion method, comprising the following steps:
[0060] S1, obtaining an initial encrypted coordinate point A according to the encrypted coordinate system of the target map vendor;
[0061] S2, calculating the initial encrypted coordinate point A by the forward encryption algorithm disclosed by the target map vendor to obtain a position B;
[0062] S3, obtaining a symmetric point C by calculation based on the initial encrypted coordinate point A and the position B;
[0063] S4, calculating the symmetric point C by the forward encryption algorithm to obtain a position D;
[0064] S5, calculating the offset amount DA of the position D relative to the initial encrypted coordinate point A to obtain an offset amount DA;
[0065] S6, correcting the symmetric point C based on the offset amount DA to obtain a coordinate E;
[0066] S7, calculating the coordinate error of the coordinate E and the initial encrypted coordinate point A to obtain a coordinate error; if the coordinate error is less than a set threshold, the coordinate E is the accurate approximate solution of the reverse conversion; if the coordinate error is not less than the set threshold, the symmetric point C is recalculated for iterative calculation until the coordinate error is less than the set threshold.
[0067] In this embodiment, in step S1, an initial encrypted coordinate point A is obtained according to the encrypted coordinate system of the target map vendor;
[0068] Specifically, according to the encrypted coordinates of the target map vendor (such as Baidu BD09 or Gaode GCJ-02), the initial encrypted coordinate point A can be obtained by map point selection, SDK interface or API calling.
[0069] In the embodiment, the coordinate legality needs to be verified in the implementation process to avoid invalid input leading to subsequent calculation error, and the principle is to provide a reference point for subsequent correction. In practical application, the developer needs to be compatible with different manufacturers' coordinate systems, and dynamically adapt the encryption algorithm type through the configuration file.
[0070] In step S2, the initial encrypted coordinate point A is calculated by the forward encryption algorithm disclosed by the target map manufacturer to obtain position B.
[0071] Specifically, the initial encrypted coordinate point A is calculated by the forward encryption algorithm disclosed by the target map manufacturer to simulate the original encryption process to obtain position B. Generally, the coordinates of B deviate from A by several kilometers.
[0072] For example, taking Baidu Map BD-09 as an example, the expression of the forward encryption algorithm is:
[0073] P(y,x)=GCJ02(A(lat,lng))
[0074]
[0075] B(lat,lng)=(z*sin(θ)+0.006,z*cos(θ)+0.0065)
[0076] In the formula, P(y,x) is the Mars coordinate system coordinate calculated according to point A; A(lat,lng) is the coordinate of the initial encrypted coordinate point A; GCJ02 is the public Mars coordinate system encryption formula; P y is the latitude coordinate of point P; P x is the longitude coordinate of point P; z is the correction distance of BD-09 coordinate system; θ is the correction angle of BD-09 coordinate system; B(lat,lng) is the coordinate of position B.
[0077] In step S3, based on the initial encrypted coordinate point A and the position B, the symmetric point C is obtained by calculation.
[0078] Specifically, the symmetric point C of position B relative to the initial encrypted coordinate point A is calculated to compress the large-scale offset to a small scale.
[0079] The formula for calculating the symmetric point C is:
[0080] C(lat,lng)=(2*A.lat-B.lat,2*A.lng-B.lng)
[0081] C(lat,lng) = (A.lat + B.lat, A.lng + B.lng), wherein C(lat,lng) is the coordinate of the symmetry point C; A.lat is the latitude coordinate of the point A; A.lng is the longitude coordinate of the point A; B.lat is the latitude coordinate of the point B; and B.lng is the longitude coordinate of the point B.
[0082] In this embodiment, in step S4, the symmetry point C is calculated by the forward encryption algorithm to obtain a position D.
[0083] Specifically, the position D is obtained by calculating the symmetry point C again by the forward encryption algorithm in step S2. Due to the non-linear error, the position D generally does not coincide with the original coordinate point A, but the error has been reduced to about 10 meters.
[0084] In this embodiment, in step S5, the offset amount DA is calculated by calculating the offset amount of the position D relative to the initial encryption coordinate point A to obtain the offset amount DA.
[0085] The calculation formula of the offset amount DA is:
[0086] DA = (D.lat - A.lat, D.lng - A.lng)
[0087] In the formula, DA is the offset amount.
[0088] In this embodiment, in step S6, the symmetry point C is corrected based on the offset amount DA to obtain a coordinate E.
[0089] Specifically, the offset amount DA is added to the symmetry point C to obtain the point E.
[0090] The calculation formula of the coordinate E is:
[0091] E(lat,lng) = (C.lat + A.lat - D.lat, C.lng + A.lng - D.lng)
[0092] In the formula, E(lat,lng) is the coordinate of the point E; C.lat is the latitude coordinate of the point C; D.lat is the latitude coordinate of the point D; C.lng is the longitude coordinate of the point C; and D.lng is the longitude coordinate of the point D.
[0093] In this embodiment, in step S7, the coordinate error is obtained by calculating the error of the coordinate E and the initial encryption coordinate point A. If the coordinate error is less than a set threshold value, the coordinate E is the accurate approximate solution of the reverse conversion. If the coordinate error is not less than the set threshold value, the symmetry point C is recalculated for iterative calculation until the coordinate error is less than the set threshold value.
[0094] Specifically, the set threshold is 1 meter; that is, if the coordinate error is less than 1 meter, the coordinate E is the accurate approximate solution of the reverse conversion; if the coordinate error is not less than 1 meter, steps S3-S6 are repeated until the coordinate error is less than 1 meter.
[0095] In a possible embodiment, a forward encryption BD09 of Baidu is provided as a basis, and an example of a randomly selected position in Beijing is as follows:
[0096] T1, a random position in Beijing is obtained by clicking on the Baidu map, and an initial coordinate position A based on BD09 is obtained, and the coordinates are: (39.99196315744, 116.4004067779).
[0097] T2, the initial coordinate position A is calculated by a forward encryption algorithm to obtain position B; the coordinates of B are: (39.99947129109, 116.4131262544) with an offset of about 1368 meters.
[0098] T3, based on the initial coordinate position A and position B, the symmetric point C is obtained by calculation; the coordinates of C are: (39.98445502379, 116.3876873015).
[0099] T4, the symmetric point C is calculated by a forward encryption algorithm to obtain position D; the coordinates of D are: (39.9919713402, 116.4003960072) with an offset of about 1.29 meters.
[0100] T5, the offset amount DA of position D relative to the initial coordinate position A is calculated to obtain the offset amount DA.
[0101] T6, based on the offset amount DA, the symmetric point C is corrected to obtain the coordinates E; the coordinates of E are: (39.9844468410, 116.3876980721).
[0102] T7, the error calculation is performed on the coordinates E and the initial coordinate position A, and the offset is less than 1 meter, and the coordinate E is the accurate approximate solution of the reverse conversion.
[0103] In summary, the application obtains an initial encrypted coordinate point A according to an encrypted coordinate system of a target map manufacturer; calculates the initial encrypted coordinate point A through a forward encryption algorithm disclosed by the target map manufacturer to obtain a position B; obtains a symmetric point C through calculation based on the initial encrypted coordinate point A and the position B; calculates the symmetric point C through the forward encryption algorithm to obtain a position D; obtains an offset amount DA by calculating the offset amount of the position D relative to the initial encrypted coordinate point A; corrects the symmetric point C based on the offset amount DA to obtain a coordinate E; obtains a coordinate error by error calculation on the coordinate E and the initial encrypted coordinate point A; if the coordinate error is less than a set threshold, the coordinate E is the accurate approximate solution of reverse conversion; if the coordinate error is not less than the set threshold, the symmetric point C is recalculated for iterative calculation until the coordinate error is less than the set threshold. The application achieves sub-meter precision with a simple calculation architecture and completely gets rid of the dependence on manufacturer interfaces. Unlike the traditional scheme which depends on complex polynomial fitting or massive interpolation operation, the application innovatively discloses the dual-state characteristics of the encryption algorithm in large-scale nonlinearity and small-scale linearity, and realizes efficient conversion through a two-stage correction mechanism: firstly, the kilometer-level offset is compressed to the order of ten meters by symmetric point construction, at this time the nonlinear error is degraded to an approximate linear relationship; then the residual error is directly eliminated through single linear compensation, so that the final coordinate error is stably controlled within 1 meter. This design not only avoids the algorithm consumption of hundreds of iterations in the traditional method, but also breaks through the technical blockade of manufacturers - only the public forward encryption formula is called to complete the reverse calculation, so that the automatic driving device can still maintain centimeter-level positioning accuracy in offline scenes such as tunnels, and unmanned aerial vehicles can seamlessly compatible with multi-platform map data when patrolling the border. At the same time, the application covers the domestic mainstream encryption system (including BD09 / GCJ-02, etc.), and provides a lightweight solution for high-concurrency location services.
[0104] It should be noted that the method of the embodiments of the present disclosure can be executed by a single device, such as a computer or a server. The method of the embodiments can also be applied in a distributed scenario, and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only execute one or more steps in the method of the embodiments of the present disclosure, and the multiple devices can interact with each other to complete the method.
[0105] It is to be understood that the foregoing description is directed to some embodiments of the disclosure. Various changes can be made to the application claimed without departing from the scope of the disclosure. In some cases, the acts or steps recited in the claims can be performed in a different order and still achieve the desired result. In addition, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.
[0106] Embodiment 2
[0107] Referring to Figure 3 Embodiment 2 of the present application also provides a symmetric point correction based encrypted coordinate system reverse conversion device, comprising:
[0108] An initial encrypted coordinate point acquisition module 001 is configured to acquire an initial encrypted coordinate point A according to an encrypted coordinate system of a target map vendor.
[0109] A first encryption calculation module 002 is configured to calculate the initial encrypted coordinate point A by using a forward encryption algorithm disclosed by the target map vendor to obtain a position B.
[0110] A symmetric point calculation module 003 is configured to obtain a symmetric point C by calculation based on the initial encrypted coordinate point A and the position B.
[0111] A second encryption calculation module 004 is configured to calculate the symmetric point C by using the forward encryption algorithm to obtain a position D.
[0112] An offset calculation module 005 is configured to calculate an offset DA of the position D relative to the initial encrypted coordinate point A to obtain an offset amount DA.
[0113] A corrected coordinate acquisition module 006 is configured to correct the symmetric point C based on the offset amount DA to obtain a coordinate E.
[0114] An accurate approximate solution acquisition module 007 is configured to calculate a coordinate error by calculating the coordinate E and the initial encrypted coordinate point A, and if the coordinate error is less than a set threshold, the coordinate E is the accurate approximate solution of the reverse conversion, and if the coordinate error is not less than the set threshold, the symmetric point C is recalculated for iterative calculation until the coordinate error is less than the set threshold.
[0115] In the first encryption calculation module 002, the expression of the forward encryption algorithm is:
[0116] P(y,x) = GCJ02(A(lat,lng))
[0117]
[0118] B(lat,lng) = (z*sin(0) + 0.006, z*cos(0) + 0.0065)
[0119] wherein P(y,x) is the coordinate of the Mars coordinate system calculated at point A; A(lat,lng) is the coordinate of the initial encrypted coordinate point A; GCJ02 is a disclosed encryption formula of the Mars coordinate system; P y is the latitude coordinate of point P; P x is the longitude coordinate of point P; z is a correction distance of the BD-09 coordinate system; 0 is a correction angle of the BD-09 coordinate system; and B(lat,lng) is the coordinate of position B.
[0120] In this embodiment, the formula for calculating the symmetric point C in the symmetric point calculation module 003 is:
[0121] C(lat,lng) = (2*A.lat-B.lat, 2*A.lng-B.lng)
[0122] wherein C(lat,lng) is the coordinate of the symmetric point C; A.lat is the latitude coordinate of point A; A.lng is the longitude coordinate of point A; B.lat is the latitude coordinate of point B; and B.lng is the longitude coordinate of point B.
[0123] In this embodiment, the formula for calculating the coordinate E in the correction coordinate acquisition module 006 is:
[0124] E(lat,lng) = (C.lat+A.lat-D.lat, C.lng+A.lng-D.lng)
[0125] wherein E(lat,lng) is the coordinate of point E; C.lat is the latitude coordinate of point C; D.lat is the latitude coordinate of point D; C.lng is the longitude coordinate of point C; and D.lng is the longitude coordinate of point D.
[0126] In this embodiment, the formula for calculating the offset amount DA in the offset amount calculation module 005 is:
[0127] DA = (D.lat-A.lat, D.lng-A.lng)
[0128] wherein DA is the offset amount.
[0129] It is illustrated that the information interaction, execution process and the like between the modules of the system are based on the same concept as the method embodiments in Embodiment 1 of the present application, and the technical effects brought by the method embodiments are the same as those of the method embodiments of the present application. For specific content, refer to the description in the method embodiments described above, which will not be repeated here.
[0130] Embodiment 3
[0131] Embodiment 3 of the present application provides a non-transitory computer readable storage medium, which stores a program code of a symmetric point correction based encrypted coordinate system reverse conversion method, the program code comprising instructions for executing the symmetric point correction based encrypted coordinate system reverse conversion method of embodiment 1 or any possible implementation manner thereof.
[0132] The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available media sets. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)), etc.
[0133] Embodiment 4
[0134] Embodiment 4 of the present application provides an electronic device, comprising a memory and a processor.
[0135] The processor and the memory complete mutual communication through a bus; the memory stores program instructions executable by the processor, and the processor calling the program instructions can execute the symmetric point correction based encrypted coordinate system reverse conversion method of embodiment 1 or any possible implementation manner thereof.
[0136] Specifically, the processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which realizes by reading software codes stored in a memory. The memory can be integrated in the processor or exist independently outside the processor.
[0137] In the embodiments described above, all or some of the modules / units can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or some of the modules / units can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded into and executed by a computer, all or some of the procedures or functions as described in the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable system. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner.
[0138] Obviously, a person skilled in the art should appreciate that each module or step of the present application described above can be implemented by a general computing system, which can be centralized on a single computing system or distributed on a network composed of multiple computing systems, and optionally, each module or step can be implemented by program codes executable by a computing system, so that each module or step can be stored in a storage system and executed by a computing system, and in some cases, the steps shown or described can be executed in an order different from that shown here, or each module or step can be manufactured as an individual integrated circuit module, or multiple modules or steps can be manufactured as a single integrated circuit module. Thus, the present application is not limited to any particular combination of hardware and software.
[0139] Although the present application has been described in detail above with general description and specific embodiments, some modifications or improvements can be made on the basis of the present application, which is obvious to those skilled in the art. Therefore, these modifications or improvements made on the basis of not deviating from the spirit of the present application are within the scope of the present application.
Claims
1. A method for inverse conversion of an encrypted coordinate system based on symmetrical point correction, characterized in that, The method comprises the following steps: According to the encrypted coordinate system of the target map manufacturer, an initial encrypted coordinate point A is obtained; A position B is obtained by calculating the initial encrypted coordinate point A through a forward encryption algorithm disclosed by the target map manufacturer; A symmetric point C is obtained by calculating the initial encrypted coordinate point A and the position B; A position D is obtained by calculating the symmetric point C through the forward encryption algorithm; An offset amount DA is obtained by calculating the offset amount of the position D relative to the initial encrypted coordinate point A; The symmetric point C is corrected based on the offset amount DA to obtain a coordinate E; An error of the coordinate E relative to the initial encrypted coordinate point A is calculated to obtain a coordinate error; if the coordinate error is less than a set threshold, the coordinate E is the accurate approximate solution of the reverse conversion; if the coordinate error is not less than the set threshold, the symmetric point C is recalculated for iterative calculation until the coordinate error is less than the set threshold.
2. The inverse conversion method of the encrypted coordinate system based on the symmetric point correction according to claim 1, characterized in that, In the process of calculating the initial encrypted coordinate point A through the forward encryption algorithm disclosed by the target map manufacturer, the expression of the forward encryption algorithm is: P(y, x) = GCJ02(A(lat, lng)) B(lat, lng) = (z * sin(theta) + 0.006, z * cos(theta) + 0.0065) In the formula, P(y, x) is the coordinate of the Mars coordinate system calculated at point A; A(lat, lng) is the coordinate of the initial encrypted coordinate point A; GCJ02 is a public encryption formula of the Mars coordinate system; P y is the latitude coordinate of point P; P x is the longitude coordinate of point P; z is a correction distance of the BD-09 coordinate system; θ is a correction angle of the BD-09 coordinate system; and B(lat, lng) is the coordinate of position B.
3. The inverse conversion method of the encrypted coordinate system based on the symmetric point correction according to claim 2, characterized in that, The formula for calculating the symmetric point C is: C(lat, lng) = (2 * A.lat - B.lat, 2 * A.lng - B.lng) In the formula, C(lat, lng) is the coordinate of the symmetric point C; A.lat is the latitude coordinate of point A; A.lng is the longitude coordinate of point A; B.lat is the latitude coordinate of point B; and B.lng is the longitude coordinate of point B.
4. The inverse conversion method of the encrypted coordinate system based on the symmetric point correction according to claim 3, characterized in that, The calculation formula of the coordinate E is: E(lat, lng) = (C.lat + A.lat - D.lat, C.lng + A.lng - D.lng) In the formula, E(lat, lng) is the coordinate of point E; C.lat is the latitude coordinate of point C; D.lat is the latitude coordinate of point D; C.lng is the longitude coordinate of point C; and D.lng is the longitude coordinate of point D.
5. The inverse conversion method of the encrypted coordinate system based on the symmetric point correction according to claim 4, characterized in that, The calculation formula of the offset amount DA is: DA = (D.lat - A.lat, D.lng - A.lng) In the formula, DA is the offset amount.
6. An apparatus for inverse conversion of a cryptographic coordinate system based on symmetric point correction, using the method for inverse conversion of a cryptographic coordinate system based on symmetric point correction according to any one of claims 1-5, characterized in that, The method comprises the following steps: An initial encrypted coordinate point acquisition module is configured to obtain an initial encrypted coordinate point A according to an encrypted coordinate system of a target map manufacturer; A first encryption calculation module is configured to calculate the initial encrypted coordinate point A through a forward encryption algorithm disclosed by the target map manufacturer to obtain a position B; A symmetric point calculation module is configured to obtain a symmetric point C by calculating the initial encrypted coordinate point A and the position B; A second encryption calculation module is configured to calculate the symmetric point C through the forward encryption algorithm to obtain a position D; An offset amount calculation module is configured to calculate an offset amount DA of the position D relative to the initial encrypted coordinate point A to obtain the offset amount DA; and The symmetric point C is corrected based on the offset amount DA to obtain a coordinate E. The correction coordinate acquisition module is configured to correct the symmetry point C based on the offset amount DA to obtain a coordinate E. The accurate approximate solution acquisition module is configured to calculate an error between the coordinate E and the initial encrypted coordinate point A to obtain a coordinate error, and if the coordinate error is less than a set threshold, the coordinate E is an accurate approximate solution of the reverse conversion, and if the coordinate error is not less than the set threshold, the symmetry point C is recalculated for iterative calculation until the coordinate error is less than the set threshold.
7. The apparatus for inverse conversion of an encrypted coordinate system based on a symmetric point correction according to claim 6, characterized in that In the first encryption calculation module, in the process of calculating the initial encrypted coordinate point A by using the forward encryption algorithm disclosed by a target map vendor, an expression of the forward encryption algorithm is as follows: P(y, x) = GCJ02(A(lat, lng)) B(lat, lng) = (z*sin(theta) + 0.006, z*cos(theta) + 0.0065) In the formula, P(y, x) is the coordinate of the Mars coordinate system calculated at point A; A(lat, lng) is the coordinate of the initial encrypted coordinate point A; GCJ02 is a published encryption formula of the Mars coordinate system; P y is the latitude coordinate of point P; P x is the longitude coordinate of point P; z is a correction distance of the BD-09 coordinate system; θ is a correction angle of the BD-09 coordinate system; and B(lat, lng) is the coordinate of position B.
8. The apparatus for inverse conversion of an encrypted coordinate system based on a symmetric point correction according to claim 7, characterized in that In the symmetry point calculation module, a formula for calculating the symmetry point C is as follows: C(lat, lng) = (2*A.lat-B.lat, 2*A.lng-B.lng) In the formula, C(lat, lng) is a coordinate of the symmetry point C, A.lat is a latitude coordinate of the point A, A.lng is a longitude coordinate of the point A, B.lat is a latitude coordinate of the point B, and B.lng is a longitude coordinate of the point B.
9. The apparatus for inverse conversion of an encrypted coordinate system based on a symmetric point correction according to claim 8, characterized in that In the correction coordinate acquisition module, a calculation formula of the coordinate E is as follows: E(lat, lng) = (C.lat+A.lat-D.lat, C.lng+A.lng-D.lng) In the formula, E(lat, lng) is a coordinate of the point E, C.lat is a latitude coordinate of the point C, D.lat is a latitude coordinate of the point D, C.lng is a longitude coordinate of the point C, and D.lng is a longitude coordinate of the point D.
10. The apparatus for inverse conversion of an encrypted coordinate system based on a symmetric point correction according to claim 9, characterized in that In the offset amount calculation module, a calculation formula of the offset amount DA is as follows: DA = (D.lat-A.lat, D.lng-A.lng) In the formula, DA is the offset amount.