Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
First embodiment
The first embodiment of the invention provides a positioning information transmission method, which performs hierarchical transmission on positioning information transmission, and performs biasing and encryption on the positioning information according to the authority of a receiving terminal, so as to ensure the safe transmission of the positioning information, meet the requirement of the hierarchical transmission of the positioning information, and enable different receiving terminals of different levels to acquire positioning information with different accuracies.
Referring to fig. 1, the method for transmitting positioning information includes:
step S100: and the current server biases and encrypts the positioning information according to the level and the authority of the next-level server of the current server to obtain the encrypted positioning information.
Step S100 is preceded by: the mobile terminal receives the satellite signal and acquires the positioning information of the mobile terminal; and the mobile terminal sends the positioning information to a server.
In the embodiment of the invention, the mobile terminal is a terminal for which a user needs to inquire the positioning information. The mobile terminal and the server are in a wireless docking state, and information can be transmitted between the mobile terminal and the server. The mobile terminal may be a mobile terminal with a beidou navigation function, and the specific navigation function of the mobile terminal in the embodiment of the present invention is not limited, and may also be a dual-mode navigation function with a GPS function and a beidou function.
The mobile terminal comprises a navigation chip, an antenna, a communication module and other functional devices. After receiving the satellite positioning signal, the antenna acquires positioning information through the processing of the navigation chip. Then, the positioning information is transmitted to the server through the communication module.
In an embodiment of the invention, the server comprises a plurality of tiers. The mobile terminal transmits the positioning information to the first-level server.
In the embodiment of the invention, different levels can be corresponded according to different areas where the servers are located. For example, the level of the server may be determined according to a hall level, a city level, and a county level, and the server level corresponds to the relationship: when the server is in the provincial control command center, the first-level server corresponds to the hall level; when the server is in the city control command center, the second-level server corresponds to the city level; and when the server is in the county control command center, the third-level server corresponds to the county level.
In the embodiment of the invention, each level of server has different authorities. The server at each level is in different areas and has different authorities. For example, the server authority of the provincial control command center is greater than that of the city control command center, and the server authority of the city control command center is greater than that of the county control command center.
In the embodiment of the present invention, the current server biases and then encrypts the positioning information according to the level and the authority of the next-level server of the current server, and the method further includes: the current server acquires information of a next-level server of the current server, wherein the information of the next-level server comprises the level and the authority of the next-level server.
Referring to fig. 2, the biasing, by the current server, the positioning information according to the level and the authority of the next server of the current server may include:
step S101: and the current server determines the preset offset which needs to be applied to each parameter of the positioning information according to the level and the authority of the next-level server of the current server.
In this step, the current server may be a first-level server. When the levels of the servers are divided into a hall level, a city level and a county level, the first-level server is the hall-level server. The first-level server determines the area of the second-level server in the transmission direction of the positioning information according to the area of the receiving terminal, and then determines that the level of the second-level server is a city level, and the authority of the second-level server is the server authority of a city control command center.
And the first-level server biases the positioning information according to the level and the authority of the second-level server, and the biasing means applying offset to each parameter of the positioning information.
The parameters of the positioning information may include: longitude, latitude, altitude, and other parameter information. When the mobile terminal transmitting the positioning information to the first-level server is a mobile terminal capable of monitoring the moving speed and direction, the parameters of the positioning information may further include parameter information such as the moving speed and direction.
In the embodiment of the present invention, the level and the authority of the server determine the size of the preset offset. When the server level and the authority are higher, the preset offset is relatively small. For example, when the server level is a city level, the authority is the server authority of a city command control center, and the offset of the longitude and latitude can be set to-0.005 or + 0.005; when the server level is a county level, the authority is the server authority of the county command control center, and the offset of the longitude and latitude can be set to be-0.008 or + 0.008. It should be noted that the preset offset is only an example, and does not represent a value of the preset offset for implementing the embodiment.
Step S102: and applying the preset offset to each parameter of the positioning information to obtain the biased positioning information.
And after the current server biases the positioning information, encrypting the biased positioning information.
Specifically, a user stamp, an authority stamp, and a time stamp are denoted by X, Y, Z, respectively. The user stamp is information of a user needing the positioning information, the authority stamp is authority information of the user needing the positioning information of the server, and the time stamp is time information. X, Y, Z is set at the initial position of the information chain of the positioning information as the marker information of the positioning information, so that the positioning information is easy to be found by the server in the transmission process.
And after the level stamp, the authority stamp and the time stamp are arranged at the initial position of the information chain of the positioning information, encrypting the information chain by using an encryption algorithm. In the embodiment of the present invention, the encryption algorithm is not limited. For example, an AES encryption algorithm, an RSA encryption algorithm, or the like may be employed.
Step S110: and the current server sends the encrypted positioning information to the next-level server, and the next-level server acquires the encrypted positioning information.
After the current server, namely the first-level server, acquires the encrypted positioning information, the encrypted positioning information is sent to the next-level server, namely the second-level server, in the application layer. Thus, the next-level server receives the encrypted positioning information.
Step S120: and the next-level server decrypts the encrypted positioning information to obtain the decrypted positioning information, and then uses the next-level server as a current server to perform biasing and encryption on the positioning information according to the level and the authority of the next-level server of the current server.
And the next-stage server, namely the second-stage server, finds out the corresponding encrypted positioning information from the received numerous information chains according to the user stamp, the authority stamp and the time stamp. And correspondingly decrypting the encrypted positioning information according to the encryption algorithm used in the step so as to obtain plaintext data corresponding to the positioning information.
And taking the next-level server as the current server, namely taking the current server as the second-level server. And acquiring the level and the authority information of a next-level server of the current server in the transmission path, namely the level and the authority information of a third-level server.
For example, when the second-level server is the current server, the second-level server is the city-level server, and the authority is the server authority of the city command control center, the next-level server is the third-level server, and the authority is the server authority of the county command control center corresponding to the county-level server.
And determining the applied preset offset according to the level and the authority of the next-level server, and then biasing the parameters in the positioning information according to the preset offset. After the biasing is completed, the positioning information chain provided with the user stamp, the authority stamp and the time stamp is encrypted, and the encrypted positioning information is obtained.
After the encryption is finished, the current server transmits the encrypted positioning information to the next-level server. For example, when the current server is the second-level server, the encrypted positioning information is transmitted to the third-level server.
Step S130: and when the encrypted positioning information is transmitted to a server in the area where the receiving terminal is located, the server in the area where the receiving terminal is located biases the positioning information according to the authority of the receiving terminal, encrypts the positioning information again and then transmits the positioning information to the receiving terminal.
And repeating the steps that the next-level server decrypts the encrypted positioning information to obtain the decrypted positioning information, then using the next-level server as a current server, and biasing and then encrypting the positioning information according to the level and the authority of the next-level server of the current server, and the steps that the current server sends the encrypted positioning information to the next-level server, and the next-level server obtains the encrypted positioning information.
When the encrypted positioning information is transmitted to the server of the area where the receiving terminal is located, the server of the area where the receiving terminal is located finds the encrypted positioning information according to the user stamp, the authority stamp and the time stamp.
In the embodiment of the invention, the receiving terminal is a user terminal which needs positioning information.
And the server of the area where the receiving terminal is located decrypts the encrypted positioning information. And then biasing the positioning information according to the authority of the receiving terminal.
In the embodiment of the invention, the authority of the receiving terminal is the authority of the user corresponding to the receiving terminal. The higher the authority of the receiving terminal, the smaller the offset applied to the positioning information in the case of biasing, and the more the offset applied to the positioning information in the case of biasing.
And after the biasing is completed, encrypting the positioning information to obtain the encrypted positioning information. And the server of the area where the receiving terminal is located sends the encrypted positioning information to the receiving terminal, so that the transmission of the positioning information is completed.
In the embodiment of the present invention, referring to fig. 3, step S130 is followed by step S140: and the receiving terminal decrypts the encrypted positioning information to obtain the positioning information of the mobile terminal.
And decrypting the encrypted positioning information according to an encryption algorithm adopted during encryption, so as to obtain the positioning information of the mobile terminal, of which the user needs to inquire the positioning information.
According to the positioning information transmission method provided by the embodiment of the invention, the positioning information is biased according to the server level and the authority, and is encrypted for transmission after being marked according to the mark information of the user, so that the safety of positioning information transmission is ensured, the requirement of graded transmission is met, irrelevant information during transmission is filtered, and the efficiency of positioning information transmission is improved.
Second embodiment
A second embodiment of the present invention provides a positioning information transmission system, please refer to fig. 4, which includes: a server and a receiving terminal 200. The servers include a plurality of stages of servers, and as shown in fig. 4, the servers include a first stage server 110, a second stage server 120, a third stage server 130, …, and a server 140 in an area where the receiving terminal is located. Wherein: the current server is used for biasing and encrypting the positioning information according to the level and the authority of the next-level server of the current server to obtain the encrypted positioning information, the current server is further configured to send the encrypted positioning information to the next-level server, the next-level server is used for acquiring the encrypted positioning information, decrypting the encrypted positioning information to acquire decrypted positioning information, and then taking the next-level server as the current server, the current server is used for biasing and encrypting the positioning information according to the level and the authority of the next-level server of the current server, the server of the area where the receiving terminal is located is used for biasing and encrypting the positioning information according to the authority of the receiving terminal and then sending the positioning information to the receiving terminal; and the receiving terminal is used for receiving the encrypted positioning information sent by the server in the area where the receiving terminal is located.
The server is in communication connection with the receiving terminal 200 through a network to perform data communication or interaction. The server may be a web server, a database server, or the like.
In this embodiment of the present invention, the receiving terminal 200 is further configured to decrypt the encrypted positioning information to obtain the positioning information of the mobile terminal.
In the embodiment of the present invention, the current server is further configured to obtain information of a next-level server of the current server, where the information of the next-level server includes a level and an authority of the next-level server.
In the embodiment of the invention, the current server is used for determining the preset offset which needs to be applied to each parameter of the positioning information according to the level and the authority of the next-level server of the current server; and the method is used for applying the preset offset to each parameter of the positioning information to obtain the biased positioning information.
In the embodiment of the present invention, the positioning information transmission system further includes a mobile terminal 300, where the mobile terminal 300 is configured to receive a satellite signal and obtain positioning information of the mobile terminal, and the mobile terminal is further configured to send the positioning information to a server.
The server is in communication connection with the mobile terminal 300 through a network to perform data communication or interaction.
In the embodiment of the invention, the areas where the servers are located are different and correspond to different levels.
In the embodiment of the present invention, the server in the area where the receiving terminal 200 is located determines the authority of the receiving terminal 200 according to the level of the user.
The embodiment of the invention provides a method and a system for transmitting positioning information. And when the encrypted positioning information is transmitted to the server of the area where the receiving terminal is located, the server of the area where the receiving terminal is located biases the positioning information according to the authority of the receiving terminal, encrypts the positioning information again and then transmits the positioning information to the receiving terminal. Therefore, the safety of positioning information transmission is ensured, the requirement of hierarchical transmission is met, irrelevant information in transmission is filtered, and the efficiency of positioning information transmission is improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, other, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.