Method, apparatus, electronic device, and storage medium for processing location data

By signing and verifying location data in the sensor hub of electronic devices, the risk of location information being maliciously modified is solved, and the secure transmission of location data and the security of location services are achieved.

CN115086959BActive Publication Date: 2025-05-30GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210706491.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-21
Publication Date
2025-05-30
Estimated Expiration
2042-06-21

AI Technical Summary

Technical Problem

In the process of providing location information to the service server, there is a risk that the location information is maliciously modified, resulting in the user of the location information being unable to determine its authenticity and credibility.

Method used

After obtaining the position data in the sensor hub of the electronic device, the original position data is directly signed, the signed position data is generated, and sent to the server, and the server verifies before using the position data.

Benefits of technology

Ensure the security of location data during transmission, prevent malicious tampering, and improve the security of location services and user trust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115086959B_ABST
    Figure CN115086959B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, electronic device, and storage medium for processing location data. The method for processing location data is applied to an electronic device, and the electronic device includes a sensor hub. The method includes: in response to a positioning request sent by a server, obtaining location data of the electronic device through the sensor hub, where the positioning request is used to obtain the location data of the electronic device; signing the location data through the sensor hub to obtain signed location data; and sending the signed location data to the server, where the server is used to verify and use the signed location data. In this method, since the original location data is directly signed through the sensor hub, the security of the positioning service can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of electronic devices, and more specifically, to a method, apparatus, electronic device, and storage medium for processing location data. Background Art

[0002] With the rapid progress of technology and living standards, electronic devices (such as smartphones, tablets, etc.) have become one of the commonly used electronic products in people's lives. Since electronic devices usually have a positioning function, they are often used for applications to obtain location information and upload it to the server of the service provider for further applications. However, during the process of the electronic device providing location information to the server of the service provider, there may be a risk that the location information is maliciously modified. Summary of the Invention

[0003] This application proposes a method, apparatus, electronic device, and storage medium for processing location data, which can ensure the security of location data.

[0004] In a first aspect, an embodiment of this application provides a method for processing location data, which is applied to an electronic device. The electronic device includes a sensor hub. The method includes: in response to a positioning request sent by a server, obtaining the location data of the electronic device through the sensor hub, where the positioning request is used to obtain the location data of the electronic device; signing the location data through the sensor hub to obtain signed location data; and sending the signed location data to the server, where the server is used to verify and then use the signed location data.

[0005] In a second aspect, an embodiment of this application provides a device for processing location data, which is applied to an electronic device. The electronic device includes a sensor hub. The device includes: a data acquisition module, a data signature module, and a data sending module. Among them, the data acquisition module is used to obtain the location data of the electronic device through the sensor hub in response to a positioning request sent by the server, where the positioning request is used to obtain the location data of the electronic device; the data signature module is used to sign the location data through the sensor hub to obtain signed location data; and the data sending module is used to send the signed location data to the server, where the server is used to verify and then use the signed location data.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more applications, where the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method for processing location data provided in the first aspect above.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which program code is stored, and the program code can be called by a processor to execute the method for processing location data provided in the first aspect above.

[0008] The solution provided by the present application is as follows: in response to a positioning request sent by a server, location data of an electronic device is obtained through a sensor hub, the positioning request is used to obtain the location data of the electronic device, then the location data is signed by the sensor hub to obtain signed location data, and the signed location data is sent to the server, and the server is used to verify and use the signed location data. Thus, since the sensor hub is in an isolated and independent subsystem, after obtaining the location data, the sensor hub directly signs the original location data, which can ensure the security of the location data and further improve the security of the positioning service. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0010] Figure 1 FIG. shows a schematic diagram of an application environment provided by an embodiment of the present application.

[0011] Figure 2 FIG. shows a schematic flowchart of a method for processing location data according to an embodiment of the present application.

[0012] Figure 3 FIG. shows a schematic flowchart of a method for processing location data according to another embodiment of the present application.

[0013] Figure 4 FIG. shows a schematic flowchart of a method for processing location data according to still another embodiment of the present application.

[0014] Figure 5 FIG. shows a schematic flowchart of a method for processing location data according to yet another embodiment of the present application.

[0015] Figure 6 A schematic flowchart of a method for processing location data according to still another embodiment of the present application is shown.

[0016] Figure 7 A block diagram of a location data processing apparatus according to an embodiment of the present application is shown.

[0017] Figure 8 It is a block diagram of an electronic device for executing the method for processing location data according to an embodiment of the present application in an embodiment of the present application.

[0018] Figure 9 It is a storage unit for storing or carrying program codes for implementing the method for processing location data according to an embodiment of the present application in an embodiment of the present application. Detailed implementation manners

[0019] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application.

[0020] With the progress of technology, electronic devices usually have a positioning function, and are therefore often used for application programs to obtain location information and upload it to the server of the service provider for further applications. Currently, for the positioning method based on the Global Positioning System (GPS), the basic idea is that the application layer calls the software driver of the GPS through the operating system, and then the driver code sends a positioning request to the GPS module. The GPS searches for satellites and obtains the location information of the current longitude and latitude, and returns the final location information data to the application layer; the application software gives the obtained location information to the receiving end for data consumption according to the requirements of the service scenario.

[0021] In the current processing of positioning information, an electronic device generally obtains the original location information from a positioning sensor and then directly provides it for use by the application. The acquisition and processing of data do not run in a relatively secure execution environment. However, due to malicious software or man-in-the-middle attacks, the location information is replaced, resulting in the inability of the location information user to determine whether the location information is true and reliable.

[0022] In view of the above problems, the inventors have proposed a method, apparatus, electronic device, and storage medium for processing location data provided in the embodiments of the present application. After obtaining the location data through the sensor hub, the original location data is directly signed, which can ensure the security of the location data and thus improve the security of the positioning service. Among them, the specific method for processing location data will be described in detail in the subsequent embodiments.

[0023] The electronic device involved in the method for processing location data provided in the embodiments of the present application will be introduced first below.

[0024] As Figure 1 shown, in Figure 1 the electronic device 100 shown includes a processor 110, a sensor hub 130, and a positioning device 140. The sensor hub 130 is respectively connected to the processor 110 and the positioning device 140. The processor 110 can obtain the location data located by the positioning device 140 through the sensor hub 130, and provide the location data to the running application. The application can send the location data to the corresponding service server through the network.

[0025] Among them, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc.

[0026] The sensor hub 130 is also called a sensor hub. The sensor hub 130 can be a microcontroller unit (MCU), and it is installed with a lightweight operating system, so as to be able to provide a solution combining software and hardware of a low-power MCU and a lightweight operating system. The sensor hub 130 usually connects and processes the data of various sensor devices. In the embodiments of the present application, the sensor hub 130 is at least connected to the positioning device 140 to obtain and process the location data located by the positioning device 140.

[0027] The positioning device 140 may include a satellite positioning module, a baseband module, a wireless fidelity (WIFI) network module, etc. The satellite positioning module may provide a solution for the global navigation satellite system (GNSS), and can be used to provide satellite positioning data, which is used to indicate the satellite positioning result of the electronic device, such as information on longitude, latitude, altitude, positioning accuracy, etc. The satellite positioning module may determine the satellite positioning result of the electronic device based on any one or more of the above satellite positioning technologies. The above GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the beidou navigation satellite system (BDS), the Galileo positioning system, the quasi-zenith satellite system (QZSS), and / or the satellite based augmentation systems (SBAS).

[0028] The baseband module may provide the identifier of the communication base station near the electronic device (for example, the baseband module may provide the cell ID of the cell that can detect the signal). In this application, the positioning server may determine the network positioning result of the electronic device according to the identifier of the communication base station provided by the baseband module of the electronic device.

[0029] The WIFI network module may be used to provide network positioning information, and the network positioning information may be used to determine the network positioning result of the electronic device. The network positioning result of the electronic device may include information such as longitude, latitude, altitude, positioning accuracy, etc. Exemplarily, the network positioning information may include the media access control address (MAC address) of the WIFI network that the WIFI network module can detect. The MAC address may also be referred to as the local area network address (LAN address), the ethernet address, or the physical address. In this application, the positioning server may determine the network positioning result of the electronic device according to the MAC address of the electronic device.

[0030] Understandably, some or all of the above satellite positioning module, WIFI network module, and baseband module can be integrated into one body or can be set in a discrete manner, and this is not limited in the embodiments of the present application. For example, the satellite positioning module and the WIFI network module can be integrated into a positioning chip (connectivity).

[0031] In some embodiments, the sensor hub 130 and the processor 110 can be integrated on the same chip. For example, the sensor hub 130 and the processor 110 can be integrated into a system-on-chip (SOC), thereby reducing the chip size and further reducing the internal occupied space of the electronic device.

[0032] Next, the method for processing location data provided in the embodiments of the present application will be introduced in detail with reference to the accompanying drawings.

[0033] Please refer to Figure 2 , Figure 2 which shows a schematic flowchart of the method for processing location data provided in an embodiment of the present application. In a specific embodiment, the method for processing location data is applied to the above-mentioned electronic device, and the electronic device includes a sensor hub. Understandably, the electronic device to which this embodiment is applied can be a smart phone, a tablet computer, a smart watch, an e-book, etc., which is not limited here. Next, the Figure 2 shown process will be elaborated in detail. The method for processing location data can specifically include the following steps:

[0034] Step S110: In response to a positioning request sent by the server, obtain the location data of the electronic device through the sensor hub, where the positioning request is used to obtain the location data of the electronic device.

[0035] In the embodiments of the present application, when the electronic device receives a positioning request sent by the server, it can respond to the positioning request and obtain the location data of the electronic device through the sensor hub, so as to process the location data and then feedback it to the server.

[0036] In some embodiments, an application program that requires a positioning service can be installed in the electronic device. When the electronic device runs this type of application program and receives a positioning request sent by the server corresponding to the application program, it can respond to the positioning request and obtain the location data of the electronic device through the sensor hub.

[0037] In some embodiments, when the electronic device obtains the location data of the electronic device through the sensor hub, the processor may send a location acquisition instruction to the sensor hub. Correspondingly, when the sensor hub receives the location acquisition instruction, it may obtain the location data of the electronic device through the positioning device. The obtained location data may be satellite positioning data, network positioning data, etc., which are not limited herein.

[0038] Step S120: Sign the location data through the sensor hub to obtain the signed location data.

[0039] In the embodiments of the present application, after the sensor hub obtains the location data, it may sign the location data so that when the subsequent server receives the location data, it can verify the security of the location data based on the signature of the location data.

[0040] In some embodiments, a signature algorithm may be pre-set in the sensor hub, such as a digital signature algorithm based on RSA or ECC (elliptic curve), etc. After the sensor hub obtains the location data, it may use the pre-set signature algorithm to sign the location data, thereby obtaining the signed location data. The signed location data may include the plaintext location data and a signature certificate, and the signature certificate is used for the server to verify the location data.

[0041] It can be understood that since the sensor hub has an independent lightweight system itself, the acquisition and signature processing of the location data are both completed in the independent subsystem. That is to say, the acquisition and signature processing of the location data are carried out in the trusted execution environment, so that the location data can be prevented from being tampered with after being provided to the system where the processor runs, ensuring the security of the location data.

[0042] Step S130: Send the signed location data to the server, and the server is used to use the signed location data after verification.

[0043] In the embodiments of the present application, after the sensor hub signs the obtained location data to obtain the signed location data, it may send the signed location data to the server. Correspondingly, after the server receives the signed location data, it may perform corresponding applications on the signed location data. The specific usage scenarios of the server for the location data may not be limited. For example, a taxi service may be provided for the electronic device according to the location data, or a location sharing service may be provided for the electronic device according to the location data.

[0044] In some embodiments, after obtaining the signed location data, the sensor hub can provide the signed location data to the application layer in the system running on the processor. Thus, the application program in the application layer can obtain the corresponding location data and send the signed location data to the server according to the requirements of the business scenario for the server to consume.

[0045] In some embodiments, the above signed location data can be obtained by signing with the private key in the public-private key pair; when the electronic device sends the signed location data to the server, it can send the public key in the public-private key pair to the server at the same time. Thus, the server can verify the signed location data according to the received public key. If the verification passes, it means that the location data is identified as authentic and available, so the verified location data can be used. Optionally, the electronic device can also pre-send the hash (HASH) value of the public key to the server. After receiving the above public key, the server can also use the HASH value to verify whether the public key has been tampered with. If the public key has not been tampered with, it verifies the signed location data according to the received public key.

[0046] The method for processing location data provided by the embodiments of the present application independently obtains and signs the location data through the sensor hub. Therefore, it can complete the signing of the location data in the trusted execution environment and then provide it to the application program running in the processor, thus avoiding the location data being tampered with; after the server receives the location data and before using the location data, it can verify the signature and only use the location data after the verification passes. Thus, the location data has security attributes, and the security during data consumption can be better guaranteed through the verification method, and the user's trust and security experience are also improved.

[0047] Please refer to Figure 3 , Figure 3 shows a schematic flowchart of a method for processing location data provided by another embodiment of the present application. The method for processing location data is applied to the above-mentioned electronic device, and the electronic device includes a sensor hub. The following will elaborate in detail on the Figure 3 shown process. The method for processing location data may specifically include the following steps:

[0048] Step S210: In response to a positioning request sent by the server, obtain the location data of the electronic device through the sensor hub, where the positioning request is used to obtain the location data of the electronic device.

[0049] In the embodiments of the present application, step S210 can refer to the content of other embodiments and will not be elaborated here.

[0050] Step S220: Obtain the service type of the positioning request.

[0051] In an embodiment of the present application, after obtaining the location data of the electronic device through the sensor hub in response to the location request sent by the server, before performing signature processing on the location data, the service type of the location request may also be obtained to determine whether the obtained location data needs to be signed according to the service type. Among them, the service type may include a secure service type and a non-secure service type. The secure service type refers to a service type that has a requirement for the security of location data, and the non-secure service type refers to a service type that has no requirement for the security of location data. It can be understood that in the location service, some services have a higher requirement for the security of location data, while some services have a lower requirement for the security of location data. Therefore, the location services can be classified into a secure service type and a non-secure service type. Based on this, the service type of the location request can be determined according to the service type of the location service corresponding to the location request.

[0052] In some embodiments, when the server sends a location request to the electronic device, it may carry the type identifier of the service type in the location request. Correspondingly, the electronic device can determine the service type of the location request according to the service type carried in the received location request.

[0053] In other embodiments, the electronic device can pre-divide the application programs with location requirements according to the installed application programs, so that the location service of each application program is marked with a service type. When responding to a location request, the service type corresponding to the application program can be determined according to the application program corresponding to the current location request, and used as the service type of the location request.

[0054] Step S230: If the service type is a secure service type, sign the location data through the sensor hub to obtain the signed location data.

[0055] In an embodiment of the present application, after the electronic device obtains the service type of the location request, it can determine whether it is necessary to request the sensor hub to sign the obtained location data. Specifically, the electronic device can determine whether the service type is a secure service type. If it is a secure service type, it means that the location service of the current location request has a higher requirement for the security of location data. Therefore, the sensor hub can be used to sign the location data to obtain the signed location data.

[0056] In some embodiments, when the electronic device responds to a positioning request sent by the server and obtains the location data of the electronic device through the sensor hub, it can synchronously determine the service type of the service request. When the determined service type is a security service type, it can send a first indication message to the sensor hub. This first indication message is used to instruct the sensor hub to sign the obtained location data. Thus, after the sensor hub obtains the location data, it can sign the obtained location data according to the first indication message.

[0057] Step S240: Send the signed location data to the server, and the server is used to verify and then use the signed location data.

[0058] In the embodiments of the present application, the content of step S240 can refer to the content of other embodiments and will not be elaborated here.

[0059] Step S250: If the service type is not a security service type, send the location data to the server.

[0060] In the embodiments of the present application, after the electronic device obtains the service type of the positioning request, it can determine whether the service type is a security service type. If it is not a security service type (i.e., the service type is a non-security service type), it means that the security requirement for the location data of the current positioning request is relatively low. Therefore, the location data can be directly sent to the server without being signed.

[0061] In some embodiments, when the electronic device responds to a positioning request sent by the server and obtains the location data of the electronic device through the sensor hub, it can synchronously determine the service type of the service request. When the determined service type is a security service type, it can send a second indication message to the sensor hub. This second indication message is used to instruct the sensor hub not to sign the obtained location data. Thus, after the sensor hub obtains the location data, it can, according to the second indication message, not sign the location data but directly provide the location data to the application layer in the system where the processor runs. Then, the application program in the application layer can provide the location data to the server.

[0062] The location data processing method provided by the embodiment of the present application independently acquires and signs location data through a sensor hub. Therefore, it can complete the signing of location data in a trusted execution environment and then provide it to the application running in the processor, thereby avoiding the tampering of location data and ensuring the security of location data. In addition, when responding to a positioning request, the service type of the positioning request is also determined, and then it is decided whether to sign the location data according to the service type. When the service type is a secure service type, the location data is signed, which can save the power consumption of the electronic device and improve the efficiency of the electronic device in providing location data.

[0063] Please refer to Figure 4 , Figure 4 FIG. shows a schematic flowchart of a location data processing method provided by another embodiment of the present application. This location data processing method is applied to the above-mentioned electronic device, and the electronic device includes a sensor hub and a positioning device. The positioning device includes a satellite positioning module and a network positioning module. The following will elaborate in detail on Figure 4 the process shown in FIG., and the location data processing method may specifically include the following steps:

[0064] Step S310: In response to a positioning request sent by the server, obtain the satellite positioning data of the electronic device from the satellite positioning module through the sensor hub, and obtain the network positioning data of the electronic device from the network positioning module.

[0065] In the embodiment of the present application, when the electronic device responds to a positioning request and obtains the location data of the electronic device through the sensor hub, the sensor hub can jointly determine the location data of the electronic device through the satellite positioning module and the network positioning module. Specifically, the sensor hub can obtain the satellite positioning data of the electronic device from the satellite positioning module and obtain the network positioning data of the electronic device from the network positioning module.

[0066] In some embodiments, the satellite positioning module is a positioning module based on GNSS such as GPS, GLONASS, BDS, etc. When obtaining satellite positioning data from the satellite positioning module through the sensor hub, the electronic device can obtain the ephemeris data of the electronic device from the ephemeris server and provide the ephemeris data to the sensor hub; after the sensor hub obtains the ephemeris data, it can send the ephemeris data to the satellite positioning module. Thus, the satellite positioning module can determine the satellite positioning data of the electronic device according to the ephemeris data and transmit the satellite positioning data to the sensor hub.

[0067] In some embodiments, the network positioning module may be a baseband module, a WIFI network module, etc. Exemplarily, if the network positioning module includes a baseband module, the positioning server may determine the network positioning data of the electronic device according to the identifier of the communication base station provided by the baseband module of the electronic device, and receive the network positioning data returned by the positioning server; Exemplarily, if the network positioning module includes a WIFI network module, the positioning server may determine the network positioning data of the electronic device according to the MAC address of the electronic device, and receive the network positioning data returned by the positioning server. Of course, it can be understood that when the network positioning module includes multiple types of network modules, some network modules or all network modules can be used to obtain the network positioning data of the electronic device.

[0068] Step S320: Generate the position data of the electronic device through the sensor hub and according to the satellite positioning data and the network positioning data.

[0069] In the embodiment of the present application, after the sensor hub obtains the satellite positioning data and the network positioning data of the electronic device, the sensor hub can combine the satellite positioning data and the network positioning data to determine the position data of the electronic device, thereby ensuring the accuracy of the position data.

[0070] In some embodiments, the electronic device may perform weighted summation on the satellite positioning data and the network positioning data according to the first weight corresponding to the satellite positioning data and the second weight corresponding to the network positioning data, and use the data after weighted summation as the position data of the electronic device. Among them, the first weight corresponding to the satellite positioning data and the second weight corresponding to the network positioning data may be determined according to the signal strength of the satellite positioning module and the network positioning module. Among them, the magnitude of the first weight is positively correlated with the signal strength of the satellite positioning module, and the magnitude of the second weight is positively correlated with the signal strength of the network positioning module.

[0071] In some embodiments, when the sensor hub obtains the satellite positioning data and the network positioning data, if the satellite positioning data or the network positioning data is not obtained within a preset time period, the position data of the electronic device may be determined according to the obtained positioning data. For example, if the sensor hub does not obtain the satellite positioning data within the preset time period, the position data of the electronic device may be determined according to the network positioning data; Another example is that if the sensor hub does not obtain the network positioning data within the preset time period, the position data of the electronic device may be determined according to the satellite positioning data.

[0072] Step S330: Sign the position data through the sensor hub to obtain the signed position data.

[0073] Step S340: Send the signed location data to the server, which is used to verify and then use the signed location data.

[0074] In the embodiments of the present application, for Step S330 and Step S340, reference can be made to the content of other embodiments, which will not be elaborated here.

[0075] The method for processing location data provided by the embodiments of the present application independently obtains and signs location data through the sensor hub. Therefore, it can complete the signing of location data in a trusted execution environment and then provide it to the application program running in the processor, thereby avoiding the tampering of location data and ensuring the security of location data. In addition, when the sensor hub obtains the location data of the electronic device, by combining satellite positioning data and network positioning data to determine the location data of the electronic device, the accuracy of the location data can be improved.

[0076] Please refer to Figure 5 , Figure 5 shows a schematic flowchart of a method for processing location data provided by another embodiment of the present application. This method for processing location data is applied to the above-mentioned electronic device. The following will elaborate in detail on Figure 5 the shown process. The method for processing location data may specifically include the following steps:

[0077] Step S410: In response to a positioning request sent by the server, obtain the location data of the electronic device through the sensor hub. The positioning request is used to obtain the location data of the electronic device.

[0078] In some embodiments, when the sensor hub obtains the location data of the electronic device, since the accuracy of the satellite positioning module is usually relatively high, satellite positioning data of the satellite positioning module can be obtained as the original location data. After obtaining the original location data, if there is available network positioning data, that is, if there are available base stations or wireless communication networks currently, network positioning data can be obtained, and the original location data can be calibrated according to the network positioning data, thereby obtaining the location data of the electronic device.

[0079] Step S420: Generate a first public-private key pair based on the device information of the electronic device. The first public-private key pair includes a first public key and a first private key.

[0080] In an embodiment of the present application, when the sensor hub signs the location data, an asymmetric key pair can be used to sign the location data. Among them, a first public-private key pair can be generated based on the device information of the electronic device. The first public-private key pair can include a first public key and a first private key; the device information can be the device identity identifier of the electronic device, etc., which is not limited here. Since the first public-private key pair is generated according to the device information of the electronic device, the first public-private key pair can correspond to the device information of the electronic device.

[0081] Step S430: Sign the location data with the first private key by the sensor hub to obtain the signed location data.

[0082] In an embodiment of the present application, the sensor hub can use the first private key in the first public-private key pair to sign the location data, and then obtain the signed location data.

[0083] Step S440: Receive the second public key in the second public-private key pair sent by the server.

[0084] In an embodiment of the present application, after the sensor hub signs the location data to obtain the signed location data and provides the location data to the application layer before sending it to the server, the location data can also be encrypted to further ensure the security of the location data. Among them, the electronic device can receive the second public key in the second public-private key pair sent by the server. The second public-private key pair is generated by the server, and the server retains the second private key in the second public-private key pair. It should be noted that the second public key can be synchronously sent when the electronic device sends a positioning request, that is, the server sends the second public key when sending a positioning request so that the electronic device knows that the location data needs to be encrypted; of course, the second public key can also be sent by the server during the process of the electronic device obtaining the location data.

[0085] Step S450: Encrypt the location data based on the generated symmetric key.

[0086] In an embodiment of the present application, when encrypting the location data, a symmetric key can be generated to encrypt the location data based on the symmetric key.

[0087] Step S460: Encrypt the symmetric key with the second public key to obtain the ciphertext key.

[0088] In an embodiment of the present application, since encrypting the location data with a symmetric key requires providing the encryption key to the server, in order to ensure the security of the key transmission, the symmetric key can be encrypted with the above-mentioned second public key, and the encrypted key is used as the ciphertext key.

[0089] Step S470: Send the signed location data, the first public key, and the ciphertext key to the server, which is used to verify and then use the signed location data according to the first public key.

[0090] In the embodiment of the present application, after the sensor hub completes the signature and encryption of the location data, the location data and the above first public key can be provided to the application layer in the system where the processor runs. Thus, the application program in the application layer can send the location data and the above first public key to the server through the network. Correspondingly, after receiving the location data and the first public key, the server can verify the location data according to the first public key. After the signature verification passes, the second private key in the above second public-private key pair can be used to decrypt the ciphertext key to obtain the above symmetric key, and then the symmetric key can be used to decrypt the location data, where the decryption algorithm matches the encryption algorithm of the sensor hub for the location data. Furthermore, the server can perform corresponding services according to the verified and decrypted location data.

[0091] The method for processing location data provided by the embodiment of the present application independently completes the acquisition and signature of location data through the sensor hub. Therefore, the signature of location data can be completed in the trusted execution environment and then provided to the application program running in the processor, thereby avoiding the tampering of location data and ensuring the security of location data. In addition, before sending the signed location data to the server, the sensor hub also encrypts the location data, so the security of location data can be further ensured.

[0092] Next, Figure 6 introduce the method for processing location data involved in the foregoing embodiment.

[0093] As Figure 6 shown, after receiving the initiated positioning request, the sensor hub can drive the satellite positioning module to obtain the original location data; in the case of an available wireless communication network or base station, it can obtain network positioning data and calibrate the original location data based on the network positioning data; after obtaining the calibrated location data, it can generate a public-private key pair, and then sign the location data according to the public-private key pair to obtain a self-signed certificate; then package the location data and the self-signed certificate and send the packaged data to the server; after receiving the packaged data, the server can verify the self-signed certificate; if the verification passes, it means that the location data is true and reliable, so subsequent secure service processes can be based on the location data; if the verification fails, it is determined that the location data is not trustworthy and there is a risk of being tampered with, so it enters the abnormal processing process of the service, for example, sending an abnormal indication message to the electronic device, etc.

[0094] Please refer toFigure 7 which shows a structural block diagram of a processing device 400 for location data provided by an embodiment of the present application. The processing device 400 for location data applies the above-mentioned electronic device, and the electronic device includes a sensor hub. The processing device 400 for location data includes: a data acquisition module 410, a data signature module 420, and a data sending module 430. Among them, the data acquisition module 410 is configured to obtain the location data of the electronic device through the sensor hub in response to a positioning request sent by the server, and the positioning request is used to obtain the location data of the electronic device; the data signature module 420 is configured to sign the location data through the sensor hub to obtain the signed location data; the data sending module 430 is configured to send the signed location data to the server, and the server is configured to use the signed location data after verification.

[0095] In some embodiments, the data signature module 420 includes a type acquisition unit and a signature execution unit. The type acquisition unit is configured to obtain the service type of the positioning request; the signature execution unit is configured to, if the service type is a security service type, sign the location data through the sensor hub to obtain the signed location data.

[0096] In a possible embodiment, the data sending module 430 may further be configured to: if the service type is not a security service type, send the location data to the server.

[0097] In some embodiments, the electronic device includes a positioning device, and the data acquisition module 410 may specifically be configured to: obtain the location data of the electronic device from the positioning device through the sensor hub in response to a positioning request sent by the server.

[0098] In a possible embodiment, the positioning device includes a satellite positioning module and a network positioning module, and the data acquisition module 410 may specifically be configured to: obtain the satellite positioning data of the electronic device from the satellite positioning module through the sensor hub in response to a positioning request sent by the server, and obtain the network positioning data of the electronic device from the network positioning module; generate the location data of the electronic device through the sensor hub according to the satellite positioning data and the network positioning data.

[0099] In some embodiments, the data signature module 420 may be specifically configured to: generate a first public-private key pair based on the device information of the electronic device, where the first public-private key pair includes a first public key and a first private key; use the first private key to sign the location data through the sensor hub to obtain the signed location data. In this embodiment, the data sending module 430 may be specifically configured to: send the signed location data and the first public key to the server, and the server is configured to use the signed location data after verifying it according to the first public key.

[0100] In some embodiments, the processing device 400 for the location data may further include: a key receiving module and a data encryption module. The key receiving module is configured to receive the second public key in the second public-private key pair sent by the server before sending the signed location data to the server; the data encryption module is configured to encrypt the location data based on the generated symmetric key; encrypt the symmetric key based on the second public key to obtain a ciphertext key. In this manner, the data sending module 430 may be configured to: send the signed location data and the ciphertext key to the server.

[0101] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0102] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical, or other forms of coupling.

[0103] In addition, in each embodiment of the present application, each functional module may be integrated in one processing module, or each module may exist physically alone, or two or more modules may be integrated in one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0104] In summary, the solution provided in the present application, by responding to the positioning request sent by the server, obtains the location data of the electronic device through the sensor hub, where the positioning request is used to obtain the location data of the electronic device, and then signs the location data through the sensor hub to obtain the signed location data, and sends the signed location data to the server, and the server is configured to use the signed location data after verification. Thus, since the sensor hub is in an isolated and independent subsystem, the sensor hub directly signs the original location data after obtaining the location data, which can ensure the security of the location data and further improve the security of the positioning service.

[0105] Please refer to Figure 8, which shows a structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device 100 may be an electronic device capable of running application programs such as a smart phone, a tablet computer, a smart watch, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, where one or more application programs may be stored in the memory 120 and configured to be executed by one or more processors 110, and one or more application programs are configured to execute the methods described in the foregoing method embodiments.

[0106] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts within the entire electronic device 100, and by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and by calling data stored in the memory 120, it executes various functions of the electronic device 100 and processes data. Optionally, the processor 110 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 110 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing display content; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the processor 110 and may be implemented separately by a communication chip.

[0107] The memory 120 may include random access memory (RAM), and may also include read-only memory. The memory 120 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created during the use of the electronic device 100 (such as phone book, audio and video data, chat record data, etc.).

[0108] Please refer toFigure 9 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program code is stored in the computer-readable medium 800, and the program code can be called by a processor to execute the method described in the above method embodiment.

[0109] The computer-readable storage medium 800 may be an electronic memory such as a flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has a storage space for the program code 810 that executes any method step in the above method. These program codes can be read out from or written into one or more computer program products. The program code 810 may be compressed in a suitable form, for example.

[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for processing location data, characterized in that, it is applied to an electronic device, the electronic device includes a sensor hub, a positioning device and a processor, a lightweight operating system is installed in the sensor hub, the positioning device includes a satellite positioning module and a network positioning module, and the method includes: In response to a positioning request sent by a server, obtain the satellite positioning data of the electronic device from the satellite positioning module through the sensor hub, and obtain the network positioning data of the electronic device from the network positioning module, where the positioning request is used to obtain the location data of the electronic device; Through the sensor hub, and according to the first weight corresponding to the satellite positioning data and the second weight corresponding to the network positioning data, perform weighted calculation on the satellite positioning data and the network positioning data to obtain the location data of the electronic device, where the magnitude of the first weight is positively correlated with the signal strength of the satellite positioning module, and the magnitude of the second weight is positively correlated with the signal strength of the network positioning module; Sign the location data through the sensor hub to obtain the signed location data, and the acquisition of the location data and the signing of the location data are both completed within the lightweight operating system; Send the signed location data to the server through the processor, and the server is used to verify and use the signed location data.

2. The method according to claim 1, characterized in that, the signing the location data through the sensor hub to obtain the signed location data includes: Obtain the service type of the positioning request; If the service type is a security service type, sign the location data through the sensor hub to obtain the signed location data.

3. The method according to claim 2, characterized in that, after obtaining the service type of the positioning request, the method further includes: If the service type is not a security service type, send the location data to the server.

4. The method according to any one of claims 1-3, characterized in that, the signing the location data through the sensor hub to obtain the signed location data includes: Generate a first public-private key pair based on the device information of the electronic device, where the first public-private key pair includes a first public key and a first private key; Sign the location data through the sensor hub using the first private key to obtain the signed location data; the sending the signed location data to the server includes: Send the signed location data and the first public key to the server, and the server is used to verify and use the signed location data according to the first public key.

5. The method according to any one of claims 1-3, characterized in that, before sending the signed location data to the server, the method further includes: Receive the second public key in the second public-private key pair sent by the server; Encrypt the location data based on the generated symmetric key; Encrypt the symmetric key based on the second public key to obtain a ciphertext key; The step of sending the signed location data to the server includes: Sending the signed location data and the ciphertext key to the server.

6. A processing device for location data, characterized in that, Applied to an electronic device, the electronic device includes a sensor hub, a positioning device and a processor, a lightweight operating system is installed in the sensor hub, the positioning device includes a satellite positioning module and a network positioning module, and the device includes: a data acquisition module, a data signature module and a data sending module, wherein, The data acquisition module is configured to respond to a positioning request sent by the server, obtain the satellite positioning data of the electronic device from the satellite positioning module through the sensor hub, and obtain the network positioning data of the electronic device from the network positioning module, the positioning request is used to obtain the location data of the electronic device; through the sensor hub, and according to a first weight corresponding to the satellite positioning data and a second weight corresponding to the network positioning data, perform weighted calculation on the satellite positioning data and the network positioning data to obtain the location data of the electronic device, the magnitude of the first weight is positively correlated with the signal strength of the satellite positioning module, and the magnitude of the second weight is positively correlated with the signal strength of the network positioning module; The data signature module is configured to sign the location data through the sensor hub to obtain signed location data, and the acquisition of the location data and the signing of the location data are both completed within the lightweight operating system; The data sending module is configured to send the signed location data to the server through the processor, and the server is configured to use the signed location data after verification.

7. An electronic device, characterized in that, Comprising: One or more processors; A memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program codes, and the program codes can be called by a processor to execute the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Position information transmission method, transmission device and satellite positioning system

    CN109039651A