A method and apparatus for enhancing security of power line location information
By encrypting the integer and decimal latitude and longitude coordinates of the transmission line location information with random numbers and mixing them with encoding, the security problem caused by the leakage of fixed keys is solved, the latitude and longitude coordinates are effectively protected, and the security of the transmission line location information is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG SENTER ELECTRONICS
- Filing Date
- 2022-01-21
- Publication Date
- 2026-08-04
AI Technical Summary
When existing technologies use fixed keys to encrypt the latitude and longitude coordinates of transmission lines, the security of the transmission line location information is greatly affected if the key is leaked.
The integer and decimal latitude and longitude coordinates in the transmission line location information are encrypted using first and second randomly generated random numbers to generate initial encrypted data for the integer and decimal parts respectively. The longitude and latitude encrypted data are generated through mixed encoding, and the key is dynamically changed to avoid leakage.
By using dynamically changing random number keys, key leakage during transmission is avoided, effectively protecting latitude and longitude coordinates during storage and transmission, and improving the security of transmission line location information.
Smart Images

Figure CN116502243B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of data encryption technology, and in particular to a method and device for enhancing the security of transmission line location information. Background Technology
[0002] With the rapid development of internet technology, data security during transmission has become a major concern. Encryption algorithms are typically used for data storage and transmission. Data encryption methods are categorized into two-way encryption and one-way encryption. One-way encryption prevents the decryption of data to retrieve the original plaintext; two-way encryption, on the other hand, allows the ciphertext to be decrypted back to the original plaintext when needed.
[0003] In the field of power transmission technology, encryption is necessary to protect the location information of transmission lines. Since the latitude and longitude coordinates of transmission lines require decryption to obtain the original plaintext before they can be used after encryption storage and transmission, two-way encryption algorithms are commonly used. However, existing technologies using two-way encryption algorithms require a fixed key to encrypt and decrypt the entire latitude and longitude data. If this fixed key is leaked, all encrypted data of the latitude and longitude coordinates of transmission lines using that key may be compromised, significantly compromising the security of the transmission line location information. Summary of the Invention
[0004] This specification provides one or more embodiments of a method and apparatus to enhance the security of transmission line location information, which addresses the following technical problem: a fixed key is required to encrypt and decrypt the entire latitude and longitude data. If the fixed key is leaked, the encrypted data of all transmission line latitude and longitude coordinates encrypted using that fixed key may be cracked, greatly affecting the security of transmission line location information.
[0005] One or more embodiments of this specification employ the following technical solutions:
[0006] This specification provides one or more embodiments of a method for enhancing the security of transmission line location information, the method comprising:
[0007] The process involves: acquiring the location information of a transmission line to be encrypted, wherein the location information includes the longitude coordinates and latitude coordinates of the transmission line; determining the integer and decimal longitude values in the longitude coordinates and the integer and decimal latitude values in the latitude coordinates; randomly generating a first random number and a second random number, wherein both the first and second random numbers are integer values of arbitrary digits; encrypting the integer longitude and integer latitude values in the transmission line location information using the first random number to obtain initial encrypted data for the integer longitude and integer latitude values, respectively; and encrypting the decimal longitude and decimal latitude values in the transmission line location information using the second random number to obtain initial encrypted data for the decimal longitude values, respectively. The data and transmission line location information include: initial encrypted data of decimal latitude; mixing the initial encrypted data of integer longitude and the initial encrypted data of decimal longitude with the first random number and the second random number to obtain the integer part and the decimal part of the encrypted longitude data, respectively; mixing the initial encrypted data of integer latitude and the initial encrypted data of decimal latitude with the first random number and the second random number to obtain the integer part and the decimal part of the encrypted latitude data, respectively; obtaining the encrypted longitude coordinates of the transmission line based on the integer part and the decimal part of the encrypted longitude data; obtaining the encrypted latitude coordinates of the transmission line based on the integer part and the decimal part of the encrypted latitude data; and determining the encrypted transmission line location information based on the encrypted longitude coordinates and the encrypted latitude coordinates of the transmission line.
[0008] Further, the step of encrypting the integer longitude and integer latitude in the transmission line location information using the first random number to obtain initial encrypted data for the integer longitude and initial encrypted data for the integer latitude in the transmission line location information, respectively, specifically includes: dividing the first random number into a first value and a second value, wherein the first value is the same as the second random number, and the second value is the difference between the first random number and the first value; encrypting the integer longitude in the transmission line longitude coordinates using the first value and the second value to obtain initial encrypted data for the integer longitude of the transmission line; and encrypting the integer latitude in the transmission line longitude coordinates using the first value and the second value to obtain initial encrypted data for the integer latitude of the transmission line.
[0009] Furthermore, the step of encrypting the integer longitude in the transmission line location information using the first and second values to obtain the initial encrypted data of the transmission line integer longitude specifically includes: adding the integer longitude in the transmission line location information to the first value to obtain a first-encrypted integer longitude; calculating the product of the first-encrypted integer longitude and the second value, and using the result as the initial encrypted data of the transmission line integer longitude.
[0010] Further, the step of mixing and encoding the initial encrypted data of integer longitude and the initial encrypted data of fractional longitude with the first random number and the second random number to obtain the integer part and the fractional part of the longitude encrypted data, specifically includes: obtaining the number of data bits of the initial encrypted data of integer longitude and the number of data bits of the initial encrypted data of fractional longitude in the transmission line location information; generating initial first encoded data of a preset number of bits in the transmission line location information based on the number of data bits of the initial encrypted data of integer longitude in the transmission line location information, wherein the preset number of bits is one bit less than the number of data bits of the initial encrypted data of integer longitude; and generating initial second encoded data of a specified number of bits in the transmission line location information based on the number of data bits of the initial encrypted data of fractional longitude in the transmission line location information. Wherein, the specified number of digits is one less than the number of digits in the initial encrypted data of the decimal longitude; the first random number and the second random number are sequentially filled into the corresponding positions of the initial first encoded data and the initial second encoded data; if the sum of the number of digits of the first random number and the second random number is less than the number of digits of the first encoded data, it is padded with 0 to generate the first encoded data; if the sum of the number of digits of the first random number and the second random number is less than the number of digits of the second encoded data, it is padded with 0 to generate the second encoded data; the integer part of the longitude encrypted data is obtained according to the initial encrypted data of the integer longitude in the transmission line location information and the first encoded data; the decimal part of the longitude encrypted data is obtained according to the initial encrypted data of the decimal longitude in the transmission line location information and the second encoded data.
[0011] Further, obtaining the fractional part of the longitude encrypted data based on the initial encrypted longitude data and the second encoded data specifically includes: splitting the initial encrypted longitude data and the second encoded data of the fractional part of the transmission line location information according to the number of data bits to obtain multiple fractional longitude encrypted sub-data and multiple encoded sub-data; binding the fractional longitude encrypted sub-data and encoded sub-data in the same position to generate multiple combined data; and sorting the multiple combined data according to a preset arrangement rule to generate the fractional part of the longitude encrypted data in the transmission line location information.
[0012] Further, obtaining the encrypted transmission line longitude coordinates based on the integer part and the fractional part of the encrypted longitude data specifically includes: determining the number of digits in the fractional part of the transmission line longitude coordinates, the number of digits in the first random number of the first random number, and the number of digits in the second random number of the second random number; determining the number of digits in the integer part of the encrypted longitude data and the number of digits in the fractional part of the encrypted longitude data; arranging the number of digits in the fractional part of the transmission line longitude coordinates, the first random number of the first random number, the second random number of the second random number, the number of digits in the integer part of the encrypted longitude data, the number of digits in the fractional part of the encrypted longitude data, the integer part of the encrypted longitude data, and the fractional part of the encrypted longitude data according to a preset method to obtain the encrypted transmission line longitude coordinates.
[0013] This specification also provides a method for enhancing the security of transmission line location information. The method includes: acquiring encrypted transmission line location information, the encrypted transmission line location information including encrypted transmission line longitude coordinates and encrypted transmission line latitude coordinates; determining the integer and fractional parts of the encrypted longitude data in the encrypted transmission line longitude coordinates, and determining the integer and fractional parts of the encrypted latitude data in the encrypted transmission line longitude coordinates; parsing the integer and fractional parts of the encrypted transmission line longitude data to obtain initial encrypted integer longitude data, initial encrypted fractional longitude data, a first random number, and a second random number in the encrypted transmission line location information; and parsing the integer and fractional parts of the encrypted latitude data to obtain initial encrypted integer latitude data, initial encrypted fractional latitude data, a first random number, and a second random number in the encrypted transmission line location information; and parsing the integer and fractional parts of the encrypted latitude data to obtain initial encrypted integer latitude data, initial encrypted fractional latitude data, a first random number, and a second random number in the encrypted transmission line location information. The process involves: 1) Decrypting the initial encrypted data of integer longitude and integer latitude in the encrypted transmission line location information based on the first random number, obtaining the integer longitude and integer latitude in the transmission line location information; 2) Decrypting the initial encrypted data of decimal longitude and decimal latitude in the encrypted transmission line location information based on the second random number, obtaining the decimal part of the longitude coordinate and the decimal part of the latitude coordinate in the transmission line location information; 3) Obtaining the longitude coordinate in the transmission line location information based on the integer longitude and the decimal part of the longitude coordinate; 4) Obtaining the latitude coordinate in the transmission line location information based on the integer latitude and the decimal part of the latitude coordinate; and finally, obtaining the location information of the transmission line based on the longitude coordinate and the latitude coordinate.
[0014] Further, the step of decrypting the initial encrypted data of integer longitude and integer latitude in the encrypted transmission line location information according to the first random number to obtain the integer longitude and integer latitude in the transmission line location information specifically includes: dividing the first random number into a first value and a second value, wherein the first value is the same as the second random number, and the second value is the difference between the first random number and the first value; performing a quotient operation on the initial encrypted data of integer longitude in the encrypted transmission line location information and the second value to obtain the first encrypted integer longitude data in the encrypted transmission line location information; performing a subtraction operation on the first encrypted integer longitude data and the first value to obtain the integer longitude in the transmission line location information; and performing a subtraction operation on the initial encrypted data of integer latitude in the encrypted transmission line location information and the first value to obtain the integer latitude in the transmission line location information.
[0015] Further, the step of decrypting the initial encrypted data of the decimal longitude and the initial encrypted data of the decimal latitude in the encrypted transmission line location information according to the second random number to obtain the decimal longitude and decimal latitude in the transmission line location information specifically includes: performing a quotient operation between the initial encrypted data of the decimal longitude in the encrypted transmission line location information and the second random number to obtain the first-order encrypted decimal longitude data in the encrypted transmission line location information; performing a quotient operation between the initial encrypted data of the decimal latitude in the encrypted transmission line location information and the second random number to obtain the first-order encrypted decimal latitude data in the encrypted transmission line location information; determining the number of decimal places in the longitude coordinates and the number of decimal places in the latitude coordinates in the encrypted transmission line location information based on the encrypted transmission line longitude coordinates and the encrypted transmission line latitude coordinates; and determining the... The system checks whether the number of digits in the encrypted longitude decimal data is the same as the number of digits in the decimal part of the longitude coordinate in the transmission line location information. If the number of digits in the encrypted longitude decimal data is different from the number of digits in the decimal part of the longitude coordinate in the transmission line location information, zeros are added before the encrypted longitude decimal data to obtain the decimal part of the longitude coordinate in the transmission line location information. The system then checks whether the number of digits in the encrypted latitude decimal data is the same as the number of digits in the latitude coordinate decimal part of the transmission line location information. If the number of digits in the encrypted latitude decimal data is different from the number of digits in the latitude coordinate decimal part of the transmission line location information, zeros are added before the encrypted latitude decimal data to obtain the decimal part of the latitude coordinate in the transmission line location information.
[0016] This specification provides one or more embodiments of a device for enhancing the security of transmission line location information, including:
[0017] At least one processor; and,
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0020] The process involves: acquiring the location information of a transmission line to be encrypted, wherein the location information includes the longitude coordinates and latitude coordinates of the transmission line; determining the integer and decimal longitude values in the longitude coordinates and the integer and decimal latitude values in the latitude coordinates; randomly generating a first random number and a second random number, wherein both the first and second random numbers are integer values of arbitrary digits; encrypting the integer longitude and integer latitude values in the transmission line location information using the first random number to obtain initial encrypted data for the integer longitude and integer latitude values, respectively; and encrypting the decimal longitude and decimal latitude values in the transmission line location information using the second random number to obtain initial encrypted data for the decimal longitude values, respectively. The data and transmission line location information include: initial encrypted data of decimal latitude; mixing the initial encrypted data of integer longitude and the initial encrypted data of decimal longitude with the first random number and the second random number to obtain the integer part and the decimal part of the encrypted longitude data, respectively; mixing the initial encrypted data of integer latitude and the initial encrypted data of decimal latitude with the first random number and the second random number to obtain the integer part and the decimal part of the encrypted latitude data, respectively; obtaining the encrypted longitude coordinates of the transmission line based on the integer part and the decimal part of the encrypted longitude data; obtaining the encrypted latitude coordinates of the transmission line based on the integer part and the decimal part of the encrypted latitude data; and determining the encrypted transmission line location information based on the encrypted longitude coordinates and the encrypted latitude coordinates of the transmission line.
[0021] The above-mentioned technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects: the above method realizes the encryption processing of latitude and longitude coordinates, the dynamic change of the key is realized by using changing random numbers, and the leakage of the key during transmission is avoided by mixing and encoding the key and ciphertext, thus achieving the effect of effectively protecting latitude and longitude coordinates during storage and transmission. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0023] Figure 1This is a schematic flowchart illustrating a method for enhancing the security of transmission line location information, provided in an embodiment of this specification.
[0024] Figure 2 This is a schematic flowchart illustrating another method for enhancing the security of transmission line location information provided in the embodiments of this specification.
[0025] Figure 3 A schematic flowchart illustrating an encryption method for enhancing the security of transmission line location information, provided in an embodiment of this specification.
[0026] Figure 4 A schematic flowchart illustrating a decryption method for enhancing the security of transmission line location information, provided in an embodiment of this specification.
[0027] Figure 5 This is a structural schematic diagram of a device for enhancing the security of transmission line location information, provided as an embodiment of this specification. Detailed Implementation
[0028] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0029] With the rapid development of internet technology, data security during transmission has become a major concern. Encryption algorithms are typically used for data storage and transmission. Data encryption methods are categorized into two-way encryption and one-way encryption. One-way encryption prevents the decryption of data to retrieve the original plaintext; two-way encryption, on the other hand, allows the ciphertext to be decrypted back to the original plaintext when needed.
[0030] In the field of power transmission technology, encryption is necessary to protect the location information of transmission lines. Since the latitude and longitude coordinates of transmission lines require decryption to obtain the original plaintext before they can be used after encryption storage and transmission, two-way encryption algorithms are commonly used. However, existing technologies using two-way encryption algorithms require a fixed key to encrypt and decrypt the entire latitude and longitude data. If this fixed key is leaked, all encrypted data of the latitude and longitude coordinates of transmission lines using that key may be compromised, significantly compromising the security of the transmission line location information.
[0031] This specification provides a method for enhancing the security of transmission line location information. The method enhances the security of transmission line location information by encrypting it. It should be noted that the executing entity of this specification embodiment can be a server or other devices with data processing capabilities. Figure 1 A flowchart illustrating a method for enhancing the security of transmission line location information provided in this specification is shown in the embodiments. Figure 1 As shown, the method mainly includes the following steps:
[0032] Step S101: Obtain the location information of the transmission line to be encrypted, determine the integer and decimal longitude in the longitude coordinates of the transmission line, and determine the integer and decimal latitude in the latitude coordinates of the transmission line.
[0033] It should be noted that the location information of a transmission line includes both its longitude and latitude coordinates. This location information can refer to the position of a specific point within the transmission line, such as the location of a transmission tower, or it can represent the location of a section of the transmission line. When representing the location of a transmission tower, the longitude and latitude coordinates of the tower are obtained and then encrypted to enhance the security of the transmission line's location information. When representing the location of a section of the transmission line, which typically consists of transmission towers and a certain length of cable, this section can be divided into multiple key location points, and the longitude and latitude coordinates of each key location point are obtained. Encryption of the longitude and latitude coordinates of each key location point further enhances the security of the transmission line's location information.
[0034] In one embodiment of this specification, the location information of a power transmission line is determined based on its latitude and longitude information. This latitude and longitude information is divided into longitude coordinates and latitude coordinates. In actual coordinate information, longitude and latitude coordinates typically consist of integer and fractional parts. Therefore, longitude coordinates are divided into integer and fractional longitude, and latitude coordinates are divided into integer and fractional latitude. The integer and fractional parts of the latitude and longitude information are encrypted respectively to improve the security of the location information.
[0035] Step S102: Randomly generate a first random number and a second random number.
[0036] In one embodiment of this specification, a positive integer value of any number of digits is randomly generated as the first random number and the second random number. That is, both the first random number and the second random number are integer values of any number of digits.
[0037] Step S103: Encrypt the integer longitude and integer latitude in the transmission line location information using the first random number to obtain the initial encrypted data of the integer longitude and the initial encrypted data of the integer latitude in the transmission line location information, respectively.
[0038] Step S104: Encrypt the decimal longitude and decimal latitude in the transmission line location information using the second random number to obtain the initial encrypted data of the decimal longitude and the initial encrypted data of the decimal latitude in the transmission line location information, respectively.
[0039] In one embodiment of this specification, the integer and fractional parts of the latitude and longitude coordinates are encrypted using the first and second random numbers generated in step S102, respectively. The first random number can be divided into two values based on the second random number: the first value is the same as the second random number, and the second value is the difference between the first and second random numbers. For example, if the first random number is 110 and the second random number is 30, then the first random number is divided into a first value of 30 and a second value of 80.
[0040] In one embodiment of this specification, the integer part of the longitude and latitude coordinates of the transmission line is encrypted using a first value and a second value. That is, the integer longitude of the transmission line is encrypted using the first value and the second value to obtain the initial encrypted data of the integer longitude of the transmission line, and the integer latitude of the transmission line is encrypted using the first value and the second value to obtain the initial encrypted data of the integer latitude of the transmission line.
[0041] In one embodiment of this specification, the specific encryption method for encrypting the integer portion of the latitude and longitude coordinates of a transmission line using a first value and a second value can be as follows: Calculate the sum of the integer longitude in the transmission line location information and the first value to generate a first-order encrypted integer longitude; calculate the product of the first-order encrypted integer longitude and the second value, and use the result as the initial encrypted data for the integer longitude of the transmission line. Calculate the sum of the integer latitude in the transmission line location information and the first value to generate a first-order encrypted integer latitude; calculate the product of the first-order encrypted integer latitude and the second value, and use the result as the initial encrypted data for the integer latitude of the transmission line. For example, if the longitude is 116.00399988 and the latitude is 39.00009310, then the integer longitude is 116 and the integer latitude is 39. The first random number is 54 and the second random number is 97. Then, the sum of 116 and 54 is calculated to obtain the first encrypted integer longitude 170. The product of 170 and 97 is calculated to obtain the initial encrypted integer longitude data 16490. The sum of 39 and 54 is calculated to obtain the first encrypted integer latitude 93. The product of 93 and 97 is calculated to obtain the initial encrypted integer latitude data 9021.
[0042] In one embodiment of this specification, the decimal longitude and decimal latitude in the transmission line location information can be encrypted using a second random number to obtain the initial encrypted data of the decimal longitude and the initial encrypted data of the decimal latitude in the transmission line location information, respectively.
[0043] The encryption of the decimal longitude and decimal latitude in the transmission line location information can be achieved by calculating the product of a second random number and the decimal longitude as the initial encrypted data for the decimal longitude, and the product of the second random number and the decimal latitude as the initial encrypted data for the decimal latitude. Continuing with the previous example, with a decimal longitude of 399988 and a decimal latitude of 9310, the product of 399988 and the second random number 97 is calculated as the initial encrypted data for the decimal longitude, 38798836, and the product of 9310 and 97 is calculated as the initial encrypted data for the decimal latitude, 903070.
[0044] Step S105: Mix the initial encrypted data of integer longitude and the initial encrypted data of decimal longitude with the first random number and the second random number to obtain the integer part and the decimal part of the encrypted longitude data, respectively.
[0045] In one embodiment of this specification, the number of data bits for the initial encrypted data of integer longitude and the number of data bits for the initial encrypted data of fractional longitude in the transmission line location information are obtained. Continuing with the previous example, the initial encrypted data of integer longitude is 16490, with 5 data bits, and the initial encrypted data of fractional longitude is 38798836, with 8 data bits.
[0046] Based on the number of bits in the initial encrypted data of integer longitude in the transmission line location information, generate initial first encoded data of a preset number of bits in the transmission line location information. The preset number of bits is one bit less than the number of bits in the initial encrypted data of integer longitude. The number of bits in the initial encrypted data of integer longitude is 5, and generate 4 bits of initial first encoded data. The initial first encoded data here can be blank data, and the value of each bit is set to 0, for example, 0000.
[0047] Similarly, based on the number of bits in the initial encrypted data of the decimal longitude in the transmission line location information, initial second encoded data of a specified number of bits is generated from the transmission line location information. This specified number of bits is one bit less than the number of bits in the initial encrypted data of the decimal longitude. For example, if the initial encrypted data of the decimal longitude is 38798836, with 8 bits, then the initial second encoded data will be 7 bits. This initial second encoded data can be blank data, with each bit set to 0, for example, 0000000.
[0048] The first and second random numbers are sequentially filled into the corresponding positions of the initial first and second encoded data. If the sum of the number of bits of the first and second random numbers is less than the number of bits of the first encoded data, it is padded with 0s to generate the first encoded data. For example, filling the 0000 with the random numbers 54 and 97 sequentially yields the first encoded data 5497. If the sum of the number of bits of the first and second random numbers is less than the number of bits of the second encoded data, it is padded with 0s to generate the second encoded data. For example, filling the 0000000 with the random numbers 54 and 97 sequentially yields the second encoded data 5497000.
[0049] In one embodiment of this specification, the integer part of the longitude encrypted data is obtained based on the initial encrypted data of integer longitude and the first encoded data in the transmission line location information, and the fractional part of the longitude encrypted data is obtained based on the initial encrypted data of fractional longitude and the second encoded data in the transmission line location information. It should be noted that the method for obtaining the integer part of the longitude encrypted data is the same as the method for obtaining the fractional part of the longitude encrypted data; the following explanation will use the method for obtaining the fractional part of the longitude encrypted data as an example.
[0050] The initial encrypted longitude data and the second encoded data of the decimal part of the transmission line location information are split according to the number of bits, resulting in multiple decimal longitude encrypted sub-data and multiple encoded sub-data. For example, the initial encrypted longitude data 38798836 can be divided into 8 decimal longitude encrypted sub-data corresponding to 3, 8, 7, 9, 8, 8, 3, and 6, and the second encoded data 5497000 can be divided into 7 encoded sub-data corresponding to 5, 4, 9, 7, 0, 0, and 0. The decimal longitude encrypted sub-data and encoded sub-data in the same position are bound to generate multiple combined data; for example, binding the first digit 3 in the initial encrypted longitude data with the first digit 5 in the encoded sub-data generates the combined data 35, and so on, generating 35, 84, 79, 97, 80, 80, 30, and 6. It should be noted that since the initial encrypted longitude data has one more bit than the second encoded data, when generating combined data, the last bit of the initial encrypted longitude data can be used as the last group of combined data. Multiple combined data are sorted according to a preset arrangement rule to generate the decimal part of the longitude encrypted data in the transmission line location information. It should be noted that the preset arrangement rule here can be sequential, for example, obtaining 358479978080306 sequentially, which is then used as the decimal part of the longitude encrypted data; or it can be sorted in other ways. Furthermore, the method for the integer part of the longitude encrypted data is the same as that for the decimal part, and will not be repeated here.
[0051] Step S106: Mix the initial encrypted data of integer latitude and the initial encrypted data of fractional latitude with the first random number and the second random number to obtain the integer part and the fractional part of the encrypted latitude data respectively.
[0052] In one embodiment of this specification, the method of mixing and encoding the initial integer latitude encrypted data with a first random number and a second random number to obtain the integer part of the latitude encrypted data is the same as the method of obtaining the integer part of the longitude encrypted data in step S105; the method of mixing and encoding the initial decimal latitude encrypted data with a first random number and a second random number to obtain the decimal part of the latitude encrypted data is the same as the method of obtaining the decimal part of the longitude encrypted data in step S105, and will not be described again in this embodiment.
[0053] Step S107: Obtain the encrypted longitude coordinates of the transmission line based on the integer part and the fractional part of the longitude encrypted data, and obtain the encrypted latitude coordinates of the transmission line based on the integer part and the fractional part of the latitude encrypted data.
[0054] In one embodiment of this specification, the number of digits in the decimal part of the transmission line's longitude coordinates, the number of digits in the first random number of the first random number, and the number of digits in the second random number of the second random number are determined. For example, if the latitude coordinate is 39.00009310, then the number of digits in the decimal part is 8. The number of digits in the integer part of the longitude encryption data and the number of digits in the decimal part of the longitude encryption data are determined. The number of digits in the decimal part of the transmission line's longitude coordinates, the number of digits in the first random number of the first random number, the number of digits in the second random number of the second random number, the number of digits in the integer part of the longitude encryption data, the number of digits in the decimal part of the longitude encryption data, the integer part of the longitude encryption data, and the decimal part of the longitude encryption data are arranged according to a preset method to obtain the encrypted longitude coordinates of the transmission line. For example, continuing with the previous example, the obtained encrypted longitude coordinates of the transmission line are (5,8,2,2,156449970,358479978080306,8). Using the same method, the encrypted transmission line latitude coordinates are obtained as (4,6,2,2,95042917,95043907700,8).
[0055] In one embodiment of this specification, the encrypted transmission line latitude coordinates are obtained from the integer part and the fractional part of the latitude encryption data. The method for obtaining the encrypted transmission line latitude coordinates is the same as that for this embodiment, and will not be described again here.
[0056] Step S108: Determine the location information of the encrypted transmission line based on the encrypted longitude coordinates and the encrypted latitude coordinates of the transmission line.
[0057] In one embodiment of this specification, encrypted longitude and latitude coordinates are obtained by encrypting them, and the encrypted longitude and latitude coordinates are used as encrypted transmission line location information.
[0058] The above method achieves encryption of latitude and longitude coordinates. The key is dynamically changed by using changing random numbers. By mixing and encoding the key with the ciphertext, the leakage of the key during transmission is avoided, thus achieving effective protection of latitude and longitude coordinates during storage and transmission.
[0059] This specification also provides another method for enhancing the security of transmission line location information. The method provided in this specification enhances the security of transmission line location information by encrypting the transmission line location information. Figure 2 This is a flowchart illustrating another method for enhancing the security of transmission line location information provided in an embodiment of this specification. It should be noted that the executing entity in this embodiment can be a server or other devices with data processing capabilities. Figure 2 As shown, the method mainly includes the following steps:
[0060] Step S201: Obtain the encrypted transmission line location information, determine the integer part and fractional part of the encrypted longitude data in the encrypted longitude coordinates of the transmission line, and determine the integer part and fractional part of the encrypted latitude data in the encrypted longitude coordinates of the transmission line.
[0061] It should be noted that the encrypted transmission line location information includes both the encrypted longitude coordinates and the encrypted latitude coordinates of the transmission line.
[0062] Step S202: Parse the integer part of the encrypted longitude data of the transmission line and the fractional part of the encrypted longitude data of the transmission line to obtain the initial encrypted integer longitude data, the initial encrypted fractional longitude data, the first random number, and the second random number in the encrypted longitude location information of the transmission line.
[0063] For example, if the decimal part of the encrypted longitude data is 358479978080306, parsing this data yields the first random number 54 and the second random number 97, resulting in the initial encrypted decimal longitude data of 38798836.
[0064] Step S203: Parse the integer part and the fractional part of the latitude encryption data to obtain the initial encrypted data of the integer latitude, the initial encrypted data of the fractional latitude, the first random number, and the second random number in the encrypted transmission line location information.
[0065] Similarly, the integer and fractional parts of the lattice encrypted data are parsed to obtain the initial encrypted data for integer lattice, the initial encrypted data for fractional lattice, the first random number, and the second random number.
[0066] Step S204: Based on the first random number, decrypt the initial encrypted data of integer longitude and integer latitude in the encrypted transmission line location information respectively to obtain the integer longitude and integer latitude in the transmission line location information.
[0067] In one embodiment of this specification, the first random number is divided into a first value and a second value, wherein the first value is the same as the second random number, and the second value is the difference between the first random number and the first value. The initial encrypted data of the integer longitude in the encrypted transmission line location information is divided by the second value to obtain the first encrypted integer longitude data in the encrypted transmission line location information; the difference between the first encrypted integer longitude data and the first value is calculated to obtain the integer longitude in the transmission line location information; the initial encrypted data of the integer latitude in the encrypted transmission line location information is divided by the first value to obtain the integer latitude in the transmission line location information.
[0068] Step S205: Based on the second random number, decrypt the initial encrypted data of the decimal longitude and the initial encrypted data of the decimal latitude in the encrypted transmission line location information respectively to obtain the decimal longitude and the decimal latitude in the transmission line location information.
[0069] In one embodiment of this specification, the initial encrypted data of the decimal longitude in the encrypted transmission line location information is divided by a second random number to obtain the first-order encrypted decimal longitude data in the encrypted transmission line location information. For example, the initial encrypted data of the decimal longitude 38798836 is divided by the second random number 97 to obtain the first-order encrypted decimal longitude data of 399988 in the encrypted transmission line location information. Similarly, the initial encrypted data of the decimal latitude in the encrypted transmission line location information is divided by a second random number to obtain the first-order encrypted decimal latitude data in the encrypted transmission line location information.
[0070] Based on the encrypted longitude and latitude coordinates of the transmission line, determine the number of decimal places for the longitude and latitude coordinates in the transmission line location information. For example, if the encrypted longitude coordinates are (5,8,2,2,156449970,358479978080306,8), the last digit 8 corresponds to the number of decimal places for the longitude coordinates. Similarly, if the encrypted latitude coordinates are (4,6,2,2,95042917,95043907700,8), the last digit 8 corresponds to the number of decimal places for the latitude coordinates in the transmission line location information.
[0071] Determine whether the number of digits in the first-encryption longitude decimal data is the same as the number of digits in the decimal part of the longitude coordinate in the transmission line location information. If the number of digits in the first-encryption longitude decimal data is different from the number of digits in the decimal part of the longitude coordinate in the transmission line location information, then pad the first-encryption longitude decimal data with zeros according to the number of digits in the decimal part of the longitude coordinate in the transmission line location information. For example, if the first-encryption longitude decimal data is 399988 and the number of digits in the decimal part of the longitude coordinate is 8, padding with zeros before 399988 will result in 0.00399988.
[0072] Determine whether the number of digits in the first-order encrypted latitude decimal data is the same as the number of digits in the decimal part of the latitude coordinates in the transmission line location information; if the number of digits in the first-order encrypted latitude decimal data is different from the number of digits in the decimal part of the latitude coordinates in the transmission line location information, then pad the first-order encrypted latitude decimal data with zeros according to the number of digits in the decimal part of the latitude coordinates in the transmission line location information to obtain the decimal part of the latitude coordinates in the transmission line location information.
[0073] Step S206: Obtain the longitude coordinates in the transmission line location information based on the integer longitude and the decimal part of the longitude coordinates in the transmission line location information; obtain the latitude coordinates in the transmission line location information based on the integer latitude and the decimal part of the latitude coordinates in the transmission line location information.
[0074] For example, if the integer longitude is 116 and the decimal part of the longitude coordinate is 0.00399988, then the longitude coordinate is 116.00399988.
[0075] Step S207: Obtain the location information of the transmission line based on the longitude coordinates and latitude coordinates in the transmission line location information.
[0076] This specification also provides another method for enhancing the security of transmission line location information, such as... Figure 3 and Figure 4 As shown. Figure 3 An encryption method for enhancing the security of transmission line location information is provided in the embodiments of this specification, such as... Figure 3 As shown, the encryption methods mainly include:
[0077] When storing the latitude and longitude coordinates of the transmission line, two random integers are generated and denoted as a and b. The number of digits in integer a is denoted as La; the number of digits in integer b is denoted as Lb. Integer a is used as a salt value and added to the longitude coordinate value to obtain the encrypted longitude coordinate value G1. The precision L of the decimal part of the encrypted longitude coordinate value G1 is recorded. It should be noted that since a is an integer, after adding it to the longitude coordinate to obtain the encrypted longitude coordinate value G1, the precision L of its decimal part is the longitude of the decimal part of the longitude coordinate. Alternatively, the latitude and longitude coordinates can be divided into an integer part and a decimal part, and then the integer a can be added to the integer part.
[0078] Take b as the multiplier. Multiply the integer part of the first-encrypted longitude coordinate value G1 with this multiplier, and record the resulting product (J1) as the encrypted data for the integer part of the longitude coordinate value, with its length denoted as L_J1. Multiply the decimal part of the first-encrypted longitude coordinate value G1 with this multiplier, and record the resulting product (J2) as the encrypted data for the decimal part of the longitude coordinate value, with its length denoted as L_J2; record this data as the second-encrypted data G2. Interleave the second-encrypted data G2 with random numbers a and b bit by bit, padding missing digits with 0s to obtain the third-encrypted data G3. The interleave encoding here can be a mixed encoding of types.
[0079] The lengths of the integer part L_J1, the fractional part L_J2, the length of random number a La, the length of random number b Lb, the precision L of the fractional part of the third encryption data G3, and the fourth encryption result G4 are added to obtain the encrypted data of the longitude coordinates. Using the latitude coordinates, follow steps 2-6 to obtain the encrypted data of the latitude coordinates. For example, the longitude and latitude coordinates are:
[0080] The generated random number 'a' from (116.00399988, 39.00009310) is 54; the generated random number 'b' is 97. The longitude value after one encryption is 116.00399988 + 54 = 170.00399988, with a precision of 8 for the decimal part. Multiplying the integer part of the encrypted longitude value yields lng_i: 170 * 97 = 16490, with a digit count of lng_lj1 = 5. Multiplying the decimal part of the encrypted longitude value yields lng_f: 399988 * 97 = 38798836, with a digit count of lng_lj2 = 8. The integer and fractional parts of the encrypted longitude coordinate value are cross-encoded with random numbers. The encoded integer part of the longitude value is 156449970, and the fractional part is 358479978080306. The encryption result includes the lengths of the encrypted integer part (L_J1 = 5), the fractional part (L_J1 = 8), the number of digits in the two random numbers (La = 2, Lb = 2), and the precision (L) of the fractional part of the first-order encrypted longitude coordinate value G1.
[0081] (5,8,2,2,156449970,358479978080306,8). Similarly, the encrypted latitude coordinates are (4,6,2,2,95042917,95043907700,8).
[0082] Figure 4 This specification provides a decryption method to enhance the security of transmission line location information, as an example. Figure 4 As shown, the decryption method mainly includes the following steps:
[0083] The encrypted data is parsed to obtain: the length of the integer part of longitude L_J1, the length of the decimal part of longitude L_J2, the length of random number a La, the length of random number b Lb, the three-fold encrypted data G3, and the precision of the decimal part of longitude L. The three-fold encrypted data G3 is then parsed using the lengths of the integer part of longitude L_J1, the length of the decimal part of longitude L_J2, the length of random number a La, and the length of random number b Lb to obtain random number a, random number b, the integer part of the second-fold encrypted data, and the decimal part of the second-fold encrypted data. The integer and decimal parts of the second-fold encrypted data G2 are then divided by the random number b, and the decimal places are padded according to the length of the decimal part of longitude L to obtain the first-fold encrypted data G1. The difference between the first-fold encrypted data G1 and the random number a is calculated to obtain the source data of the longitude coordinate values. Following the above method, the source data of the latitude coordinate values is obtained. For example, encrypted data...
[0084] The parsing of {(5,8,2,2,156449970,358479978080306,8),(4,6,2,2,95042917,95043907700,8)} yields the following: the integer part of longitude has a length of 5, the decimal part of longitude has a length of 8, the length of random number 'a' is 2, the length of random number 'b' is 2, the integer part of the triple-encrypted data is 156449970, the decimal part of the triple-encrypted data is 358479978080306, and the precision of the decimal part of longitude is 8. Parsing this yields the following data: random number 'a' is 54, random number 'b' is 97, the integer part of the double-encrypted data is 16490, and the decimal part of the double-encrypted data is 38798836. Calculate the integer part of the longitude: 16490 / 97 = 170; calculate the decimal part of the longitude: 38798836 / 97 = 399988; the decimal part of the longitude has a precision of 8, so it is padded with zeros to make 8 digits: Therefore, it is recorded as: 0.00399988. The obtained longitude coordinate value is:
[0085] 170.00399988-54=116.00399988. Similarly, the latitude value is: 93.00009310-54=39.00009310.
[0086] This specification also provides an embodiment of a device to enhance the security of transmission line location information. Figure 5 A flowchart illustrating a method for enhancing the security of transmission line location information provided in this specification is shown in the embodiments. Figure 5As shown, the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: acquire the location information of a transmission line to be encrypted, wherein the location information of the transmission line includes the longitude coordinates and latitude coordinates of the transmission line; determine the integer longitude and decimal longitude in the longitude coordinates of the transmission line, and determine the integer latitude and decimal latitude in the latitude coordinates of the transmission line; randomly generate a first random number and a second random number, wherein the first random number and the second random number are both integer values of arbitrary digits; encrypt the integer longitude and integer latitude in the location information of the transmission line using the first random number, respectively obtaining initial encrypted data of the integer longitude and initial encrypted data of the integer latitude in the location information of the transmission line; encrypt the integer longitude and integer latitude in the location information of the transmission line using the second random number. The decimal longitude and decimal latitude in the transmission line location information are encrypted to obtain initial encrypted data for decimal longitude and decimal encrypted latitude in the transmission line location information, respectively. The initial encrypted data for integer longitude and decimal longitude are then mixed and encoded with a first random number and a second random number to obtain the integer part and decimal part of the encrypted longitude data, respectively. Similarly, the initial encrypted data for integer latitude and decimal latitude are mixed and encoded with a first random number and a second random number to obtain the integer part and decimal part of the encrypted latitude data, respectively. Based on the integer and decimal parts of the encrypted longitude data, the encrypted longitude coordinates of the transmission line are obtained; based on the integer and decimal parts of the encrypted latitude data, the encrypted latitude coordinates of the transmission line are obtained. Finally, based on the encrypted longitude and latitude coordinates of the transmission line, the encrypted location information of the transmission line is determined.
[0087] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0088] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0089] The above description is merely one or more embodiments of this specification and is not intended to limit this specification. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of this specification.
Claims
1. A method for enhancing the security of transmission line location information, characterized in that, The method includes: Obtain the location information of the transmission line to be encrypted, wherein the location information of the transmission line includes the longitude coordinates and latitude coordinates of the transmission line; Determine the integer and decimal longitudes in the longitude coordinates of the transmission line, and determine the integer and decimal latitudes in the latitude coordinates of the transmission line; A first random number and a second random number are randomly generated, wherein the first random number and the second random number are both integer values of arbitrary digits; The integer longitude and integer latitude in the transmission line location information are encrypted using the first random number to obtain the initial encrypted data of the integer longitude and the initial encrypted data of the integer latitude in the transmission line location information, respectively. The decimal longitude and decimal latitude in the transmission line location information are encrypted using the second random number to obtain the initial encrypted data of the decimal longitude and the initial encrypted data of the decimal latitude in the transmission line location information, respectively. The initial encrypted data of integer longitude and the initial encrypted data of fractional longitude are mixed and encoded with the first random number and the second random number to obtain the integer part and the fractional part of the encrypted longitude data, respectively. The initial encrypted data of the integer latitude and the initial encrypted data of the fractional latitude are mixed and encoded with the first random number and the second random number to obtain the integer part and the fractional part of the latitude encrypted data, respectively. The encrypted longitude coordinates of the transmission line are obtained based on the integer part and the fractional part of the encrypted longitude data; the encrypted latitude coordinates of the transmission line are obtained based on the integer part and the fractional part of the encrypted latitude data. The location information of the encrypted transmission line is determined based on the encrypted longitude coordinates and the encrypted latitude coordinates of the transmission line.
2. The method for enhancing the security of transmission line location information according to claim 1, characterized in that, The step of encrypting the integer longitude and integer latitude in the transmission line location information using the first random number to obtain initial encrypted data of the integer longitude and integer latitude in the transmission line location information, respectively, specifically includes: The first random number is divided into a first value and a second value, wherein the first value is the same as the second random number, and the second value is the difference between the first random number and the first value. The integer longitudes in the longitude coordinates of the transmission line are encrypted using the first and second values to obtain the initial encrypted data of the integer longitudes of the transmission line. The integer latitude of the transmission line is encrypted using the first and second values to obtain the initial encrypted data of the integer latitude of the transmission line.
3. The method for enhancing the security of transmission line location information according to claim 2, characterized in that, The step of encrypting the integer longitude in the transmission line location information using a first value and a second value to obtain initial encrypted data for the integer longitude of the transmission line specifically includes: The integer longitude in the location information of the transmission line is added to the first value to obtain a first encrypted integer longitude; Calculate the product of the first encrypted integer longitude and the second value, and use the result as the initial encrypted data for the integer longitude of the transmission line.
4. The method for enhancing the security of transmission line location information according to claim 1, characterized in that, The step of mixing and encoding the initial encrypted data of integer longitude and the initial encrypted data of decimal longitude with the first random number and the second random number to obtain the integer part and the decimal part of the encrypted longitude data, specifically includes: Obtain the number of data bits for the initial encrypted data of integer longitude in the transmission line location information and the number of data bits for the initial encrypted data of fractional longitude in the transmission line location information; Based on the number of bits in the initial encrypted data of integer longitude in the transmission line location information, an initial first encoded data of a preset number of bits in the transmission line location information is generated, wherein the preset number of bits is one bit less than the number of bits in the initial encrypted data of integer longitude; Based on the number of data bits in the initial encrypted data of the fractional longitude in the transmission line location information, an initial second encoded data of a specified number of bits in the transmission line location information is generated, wherein the specified number of bits is one bit less than the number of data bits in the initial encrypted data of the fractional longitude; The first random number and the second random number are sequentially filled into the corresponding positions of the initial first encoded data and the initial second encoded data; If the sum of the number of bits of the first random number and the second random number is less than the number of bits of the first encoded data, then pad with 0 to generate the first encoded data; If the sum of the number of bits of the first random number and the second random number is less than the number of bits of the second encoded data, then pad with 0 to generate the second encoded data; The integer part of the longitude encryption data is obtained based on the initial encrypted data of integer longitude in the transmission line location information and the first encoded data; The fractional part of the longitude encryption data is obtained based on the initial encrypted data of the fractional longitude in the transmission line location information and the second encoded data.
5. The method for enhancing the security of transmission line location information according to claim 4, characterized in that, The step of obtaining the decimal part of the longitude encryption data based on the initial encrypted longitude data and the second encoded data specifically includes: The initial encrypted longitude data of the fractional part of the longitude in the location information of the transmission line and the second encoded data are split according to the number of data bits to obtain multiple fractional longitude encrypted sub-data and multiple encoded sub-data. Bind the encrypted and encoded sub-data of decimal longitudes in the same position to generate multiple combined data; The multiple combined data are sorted according to a preset arrangement rule to generate the decimal part of the longitude encrypted data in the transmission line location information.
6. The method for enhancing the security of transmission line location information according to claim 1, characterized in that, The step of obtaining the encrypted transmission line longitude coordinates based on the integer part and the fractional part of the encrypted longitude data specifically includes: The number of decimal places in the longitude coordinates of the transmission line, the number of digits in the first random number, and the number of digits in the second random number are determined. Determine the number of bits in the integer part of the longitude encrypted data and the number of bits in the fractional part of the longitude encrypted data; The encrypted longitude coordinates of the transmission line are obtained by arranging the number of digits in the decimal part of the longitude coordinates, the number of digits in the first random number, the number of digits in the second random number, the number of digits in the integer part of the encrypted longitude data, the number of digits in the decimal part of the encrypted longitude data, the integer part of the encrypted longitude data, and the decimal part of the encrypted longitude data in a preset manner.
7. A method for enhancing the security of transmission line location information, characterized in that, The method includes: Obtain encrypted transmission line location information, wherein the encrypted transmission line location information includes encrypted transmission line longitude coordinates and encrypted transmission line latitude coordinates; Determine the integer part and the fractional part of the encrypted longitude data in the encrypted longitude coordinates of the transmission line, and determine the integer part and the fractional part of the encrypted latitude data in the encrypted longitude coordinates of the transmission line; The integer part of the encrypted longitude data of the transmission line and the fractional part of the encrypted longitude data of the transmission line are parsed to obtain the initial encrypted integer longitude data, the initial encrypted fractional longitude data, the first random number, and the second random number in the encrypted longitude location information of the transmission line. The integer part and the fractional part of the latitude encryption data are parsed to obtain the initial encrypted data of the integer latitude, the initial encrypted data of the fractional latitude, the first random number, and the second random number in the encrypted transmission line location information. Based on the first random number, the initial encrypted data of integer longitude and the initial encrypted data of integer latitude in the encrypted transmission line location information are decrypted respectively to obtain the integer longitude and integer latitude in the transmission line location information. Based on the second random number, the initial encrypted data of the decimal longitude and the initial encrypted data of the decimal latitude in the encrypted transmission line location information are decrypted respectively to obtain the decimal part of the longitude coordinate and the decimal part of the latitude coordinate in the transmission line location information. The longitude coordinates in the transmission line location information are obtained by using the integer longitude and the decimal part of the longitude coordinates in the transmission line location information. Similarly, the latitude coordinates in the transmission line location information are obtained by using the integer latitude and the decimal part of the latitude coordinates in the transmission line location information. The location information of the transmission line is obtained based on the longitude coordinates and latitude coordinates in the location information of the transmission line.
8. A method for enhancing the security of transmission line location information according to claim 7, characterized in that, The step of decrypting the initial encrypted data of integer longitude and integer latitude in the encrypted transmission line location information according to the first random number to obtain the integer longitude and integer latitude in the transmission line location information specifically includes: The first random number is divided into a first value and a second value, wherein the first value is the same as the second random number, and the second value is the difference between the first random number and the first value. The initial encrypted integer longitude data in the encrypted transmission line location information is divided by the second value to obtain the first encrypted integer longitude data in the encrypted transmission line location information. The integer longitude data of the first encryption is subtracted from the first value to obtain the integer longitude in the location information of the transmission line. The integer latitude in the encrypted transmission line location information is subtracted from the first value to obtain the integer latitude in the transmission line location information.
9. A method for enhancing the security of transmission line location information according to claim 7, characterized in that, The step of decrypting the initial encrypted data of the decimal longitude and the initial encrypted data of the decimal latitude in the encrypted transmission line location information according to the second random number to obtain the decimal longitude and decimal latitude in the transmission line location information specifically includes: The initial encrypted longitude data of the decimal longitude in the encrypted transmission line location information is divided by the second random number to obtain the first encrypted decimal longitude data in the encrypted transmission line location information. The initial encrypted data of the decimal latitude in the encrypted transmission line location information is divided by the second random number to obtain the first encrypted decimal latitude data in the encrypted transmission line location information. Based on the encrypted longitude coordinates and the encrypted latitude coordinates of the transmission line, determine the number of decimal places for the longitude coordinates and the number of decimal places for the latitude coordinates in the transmission line location information. Determine whether the number of digits in the encrypted longitude decimal data is the same as the number of digits in the decimal part of the longitude coordinates in the transmission line location information; If the number of digits in the first encrypted longitude decimal data is different from the number of digits in the decimal part of the longitude coordinate in the transmission line location information, then zeros are added before the first encrypted longitude decimal data to make up the number of digits in the decimal part of the longitude coordinate in the transmission line location information, so as to obtain the decimal part of the longitude coordinate in the transmission line location information. Determine whether the number of digits in the encrypted latitude decimal data is the same as the number of digits in the decimal part of the latitude coordinates in the transmission line location information; If the number of digits in the first-order encrypted latitude decimal data is different from the number of digits in the decimal part of the latitude coordinates in the transmission line location information, then zeros are added before the first-order encrypted latitude decimal data to obtain the decimal part of the latitude coordinates in the transmission line location information.
10. A device for enhancing the security of transmission line location information, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: Obtain the location information of the transmission line to be encrypted, wherein the location information of the transmission line includes the longitude coordinates and latitude coordinates of the transmission line, determine the integer longitude and decimal longitude in the longitude coordinates of the transmission line, and determine the integer latitude and decimal latitude in the latitude coordinates of the transmission line; A first random number and a second random number are randomly generated, wherein the first random number and the second random number are both integer values of arbitrary digits; The integer longitude and integer latitude in the transmission line location information are encrypted using the first random number to obtain the initial encrypted data of the integer longitude and the initial encrypted data of the integer latitude in the transmission line location information, respectively. The decimal longitude and decimal latitude in the transmission line location information are encrypted using the second random number to obtain the initial encrypted data of the decimal longitude and the initial encrypted data of the decimal latitude in the transmission line location information, respectively. The initial encrypted data of integer longitude and the initial encrypted data of fractional longitude are mixed and encoded with the first random number and the second random number to obtain the integer part and the fractional part of the encrypted longitude data, respectively. The initial encrypted data of the integer latitude and the initial encrypted data of the fractional latitude are mixed and encoded with the first random number and the second random number to obtain the integer part and the fractional part of the latitude encrypted data, respectively. The encrypted longitude coordinates of the transmission line are obtained based on the integer part and the fractional part of the encrypted longitude data; the encrypted latitude coordinates of the transmission line are obtained based on the integer part and the fractional part of the encrypted latitude data. The location information of the encrypted transmission line is determined based on the encrypted longitude coordinates and the encrypted latitude coordinates of the transmission line.