Data processing method and apparatus
By using TEE to collect and sign sensor data in a secure state, the problem of tampering with the geographical location information of mobile terminals is solved, thus achieving data security and accuracy and reducing hardware requirements.
Patent Information
- Application Number
- PCT/CN2025/074711
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-20
- Filing Date
- 2025-01-24
- Publication Date
- 2025-12-26
AI Technical Summary
On mobile devices, geolocation information is easily tampered with, posing a risk of false positioning and affecting the security and accuracy of scenarios such as marketing campaigns, virtual street sales, game cheats, and evasion of risk control detection.
Sensor data is acquired and a signature is generated through a Trusted Execution Environment (TEE), ensuring that the data is collected and transmitted in a secure state. Applications use the data after verifying the signature, reducing the need for hardware and preventing data tampering and replay.
It achieves secure acquisition and integrity of sensor data, prevents tampering, ensures data accuracy and real-time performance, and reduces hardware requirements.
Smart Images

Figure CN2025074711_26122025_PF_FP_ABST
Abstract
Description
Data processing method and apparatus thereof
[0001] The present application claims priority from the Chinese patent application No. 202410808219.8 filed on June 20, 2024, and entitled "A data processing method and apparatus thereof", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the field of computer, in particular to a data processing method and apparatus thereof. BACKGROUND
[0003] On a mobile terminal device, the application obtained geographic location information is at risk of being tampered with. In the Android system, the fake location is obtained by "Hook" means to hijack the related functions in the LocationManagerService service to achieve the purpose of modifying the location.
[0004] For example, in the following scenarios, there may be a risk of modifying the location:
[0005] 1. Marketing activity wool picking: E-commerce and bank Apps often develop marketing activities in designated cities. Fake Location can be used to quickly switch to the target city to obtain the qualification to participate in the marketing activity.
[0006] 2. Virtual street station: By tampering with the geographic location information through Fake Location, a virtual location can be set in a social software to achieve a virtual street station behavior to attract social users who are not aware of the truth.
[0007] 3. Game plug-in: By tampering with the geographic location information through Fake Location, some Apps that rely on geographic location information can be attacked. By tampering with the location, the corresponding coordinates can be moved instantly, which seriously damages the game balance and is not conducive to the healthy and orderly development of the game business.
[0008] 4. Escaping risk detection: By collecting previous fraud data and implanting Trojan horses (stealing verification codes and passwords), fraud groups can return false geographic locations or faces to escape risk detection during transactions.
[0009] In addition, data may also be tampered with in other scenarios.
[0010] Based on the above problems, there is an urgent need for a method that can provide secure and accurate data to the application. SUMMARY
[0011] In a first aspect, the present application provides a data processing method, the method comprising: a trusted execution environment (TEE) obtaining target data, the target data being obtained according to data collected from a management module; the management module being in a secure state; the TEE generating a key for a target application and generating a signature of the target data according to the key; and the TEE delivering the target data and the signature to the target application.
[0012] The target data can be sensor data itself or data obtained based on sensor data. For example, the sensor data can be WIFI data or GPS, and the target data can be position data obtained based on the sensor data. For another example, the sensor data can be data collected by a magnetometer or a thermometer.
[0013] The management module can also be a sensor management module, which is a module for managing sensors in a secure state and can achieve hardware abstraction of sensor devices, device management and data processing.
[0014] The management module is in a secure state, and data collection is completed by the management module, so the collected data will not be directly connected to a non-secure state and will not be tampered with by a role in a non-secure state, thereby ensuring the security of data collection. Moreover, after data collection is completed in a secure state and the data is signed, the data can be returned to an application. Specifically, the TEE can return the signed data to the application. Since the application can use the data only after verifying the signature, the integrity of the data can be ensured.
[0015] The sensor management module is in a secure state, and sensor data collection is completed by the sensor management module, so the sensor will not be directly connected to a non-secure state and will not be tampered with by a role in a non-secure state, thereby ensuring the security of sensor data collection. Moreover, after sensor data collection is completed in a secure state and the sensor data is signed, the sensor data can be returned to an application. Specifically, the TEE can return the signed sensor data to the application. Since the application can use the sensor data (or data obtained based on the sensor data) only after verifying the signature, the integrity of the data can be ensured.
[0016] Moreover, the collection of sensor data by the TEE can also reduce the introduction of new hardware.
[0017] In a possible implementation, the sensor management module is a sensor hub module, and the data collected by the sensor management module is specifically sensor data.
[0018] In a possible implementation, the target data is position data of the terminal device.
[0019] The method further comprises:
[0020] The TEE sends the sensor data (e.g., wireless fidelity (WIFI) data) and a signature of the sensor data to a server.
[0021] The TEE receives location data of the terminal device sent by the server, which is determined by the server according to the sensor data in a case where the signature is verified.
[0022] In a possible implementation, the sensor data is global positioning system (GPS) data, WIFI data, data of a cell phone signal tower (base station), IP data, location information provided by an APP, a Bluetooth beacon, or the like.
[0023] In a possible implementation, the method further comprises: the TEE receiving a challenge value passed by the target application.
[0024] The signature of the sensor data is generated according to the key, comprising:
[0025] The signature of the sensor data and the challenge value is generated according to the key.
[0026] The TEE passes the target data and the signature to the target application, comprising:
[0027] The TEE passes the target data, the challenge value, and the signature to the target application.
[0028] The application can ensure the real-time of the data by checking the challenge value, that is, the data replay cannot occur.
[0029] In a possible implementation, the method further comprises:
[0030] The target application uses the target data in a case where the signature is verified.
[0031] In a possible implementation, the trusted execution environment (TEE) acquires target data, which is obtained according to data collected from a management module, comprising:
[0032] The trusted execution environment (TEE) acquires the target data from a shared memory of the TEE and the management module.
[0033] In a second aspect, the present application provides a data processing apparatus, comprising:
[0034] The acquisition module in the TEE is configured to acquire target data, wherein the target data is obtained according to data collected by a management module; and the management module is located in a secure state.
[0035] The processing module in the TEE is configured to generate a key for a target application, and generate a signature of the sensor data according to the key.
[0036] The transceiver module in the TEE is configured to deliver the target data and the signature to the target application.
[0037] In a possible implementation, the management module is a sensor management module, and the data collected by the sensor management module is specifically sensor data.
[0038] In a possible implementation, the target data is position data of the terminal device.
[0039] The transceiver module is further configured to send the sensor data and the signature of the sensor data.
[0040] The position data of the terminal device is received, and the position data of the terminal device is determined by the server according to the sensor data in a case where the signature is verified.
[0041] In a possible implementation, the transceiver module is further configured to receive a challenge value delivered by the target application.
[0042] The processing module is specifically configured to:
[0043] generate a signature of the sensor data and the challenge value according to the key;
[0044] The transceiver module is specifically configured to:
[0045] The TEE delivers the target data, the challenge value and the signature to the target application.
[0046] In a possible implementation, the acquisition module is specifically configured to:
[0047] acquire target data from a shared memory of the TEE and the management module.
[0048] In a possible implementation, the apparatus further includes:
[0049] The processing module in the target application is configured to use the target data in a case where the signature is verified.
[0050] In a third aspect, an embodiment of the present application provides a data processing apparatus, which can include a memory, a processor and a bus system, wherein the memory is configured to store a program, and the processor is configured to execute the program in the memory to perform the method of the first aspect and any optional method thereof.
[0051] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and when the computer program is run on a computer, the computer is enabled to perform the method of the first aspect and any optional method thereof.
[0052] In a fifth aspect, an embodiment of the present application provides a computer program, which, when run on a computer, enables the computer to perform the method of the first aspect and any optional method thereof.
[0053] In a sixth aspect, the present application provides a chip system, which includes a processor configured to support the execution device or the training device to implement the functions involved in the above aspects, for example, to send or process the data involved in the above method; or, information. In a possible design, the chip system further includes a memory, and the memory is configured to store the necessary program instructions and data for the execution device or the training device. The chip system can be composed of a chip, or can include a chip and other discrete devices. BRIEF DESCRIPTION OF DRAWINGS
[0054] FIG. 1 is a schematic diagram of an application system framework of the present application;
[0055] FIG. 2 is a schematic diagram of a data processing method provided by an embodiment of the present application;
[0056] FIGS. 3 to 5 are schematic diagrams of an application architecture according to an embodiment of the present application;
[0057] FIG. 6 is a schematic diagram of a structure of a data processing apparatus provided by an embodiment of the present application;
[0058] FIG. 7 is a schematic diagram of a structure of a terminal device provided by an embodiment of the present application;
[0059] FIG. 8 is a schematic diagram of a structure of a server provided by an embodiment of the present application. DETAILED DESCRIPTION
[0060] The embodiments of the present application are described below in conjunction with the accompanying drawings. The terms used in the embodiment part of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0061] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art can know that, with the development of technology and the appearance of new scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0062] The terms "first", "second", and the like, as used in the description and the claims of the application and the preceding figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of use in either order. It is further to be understood that the terminology used herein is for the purpose of describing particular embodiments of the application only and is not intended to be limiting. Embodiments of the present application will address some of the concerns that have been expressed regarding the prior art.
[0063] The terms "substantially", "about", and the like, are used as terms of approximation and not as terms of degree, unless expressed otherwise, and are intended to account for the inherent deviations in measured or calculated values that would be recognized by those of ordinary skill in the art. Further, the use of "may" when describing embodiments of the present application is intended to mean that one or more embodiments of the present application "can", "might", or "will" include such feature in some way. The use of the terms "use", "using", and "used" in the context of describing embodiments of the present application is not intended to mean that the described embodiments are the only way to use a feature, but rather, that the feature can be used in any way that provides the desired results. Further, the term "exemplary" is intended to mean an example or an illustration.
[0064] Referring to FIG. 1, FIG. 1 is a schematic diagram of an application architecture according to an embodiment of the present application, wherein, in the non-secure side, a "secure sensor interface" is provided to the application: the application can call this interface to securely obtain sensor data; the architecture includes: a sensorhub: the sensorhub is responsible for collecting data of various sensors; a TEE: the TEE is responsible for processing data of the secure sensor and returns the data to the application in the non-secure side.
[0065] The following first introduces related terms involved in the embodiments of the present application.
[0066] sensorhub: a software and hardware combined solution based on a low-power microcontroller and an operating system. It is mainly responsible for connecting and processing data from various sensor devices. The original intention of the design of the sensorhub is mainly to solve the problem of power consumption of mobile terminals, and to reduce the overall power consumption by realizing real-time control of the sensor in the case of CPU sleep.
[0067] Sensor: A sensor is a detection device that can sense the information being measured and transform the sensed information into an electrical signal or other form of information output according to a certain rule, so as to meet the requirements of information transmission, processing, storage, display, recording and control.
[0068] On mobile devices, the geographical location information obtained by applications is at risk of being tampered with. In the Android system, Fake Location uses "Hook" to hijack relevant functions in the LocationManagerService service to modify the location.
[0069] For example, there is a risk of location modification in the following scenarios:
[0070] 1. Exploiting Marketing Campaigns: E-commerce and banking apps frequently launch marketing campaigns in designated cities. Using Fake Location allows you to quickly switch to the target city and gain eligibility to participate in these campaigns.
[0071] 2. Virtual Street Stalking: By tampering with geographical location information through Fake Location and setting a virtual location on social media software, virtual street stalking behavior is achieved to attract unsuspecting social media users;
[0072] 3. Game cheats: Using Fake Location to tamper with geolocation information, attacks are launched against some apps that rely on geolocation information. By tampering with the location, the attacker can teleport to the corresponding coordinates, which seriously disrupts the game balance and is not conducive to the healthy and orderly development of the game business.
[0073] 4. Evading risk control detection: Fraud groups collect fraudulent information in advance and implant Trojans (to steal verification codes and passwords), and evade risk detection by returning fake geographical locations or faces during transactions.
[0074] In addition, in other scenarios, sensor data (or data obtained based on sensor-collected data) may be tampered with.
[0075] Based on the above problems, there is an urgent need for a method that can provide applications with secure and accurate sensor data (or data obtained from sensor-acquired data).
[0076] To address the aforementioned problems, embodiments of this application provide a data processing method. The model training method of this application embodiment will be described in detail below with reference to the accompanying drawings.
[0077] Referring to Figure 2, which is a flowchart of a data processing method provided in an embodiment of this application, as shown in Figure 2, the data processing method provided in an embodiment of this application may include steps 201 to 203, which will be described in detail below.
[0078] 201. The Trusted Execution Environment (TEE) acquires target data, which is obtained from data collected by the management module; the management module is in a secure state.
[0079] For example, the management module can be a sensor management module, such as a sensorhub module.
[0080] For ease of description, this application uses location data as the target data in the embodiments. It should be understood that the target data can also be replaced with other types of sensor data or data obtained based on sensor data.
[0081] The rapid development of smart mobile terminals has brought great convenience to our lives, with the vast majority of these terminals running on ARM central processing units (CPUs). As the performance of ARM CPUs continues to improve, they are increasingly being used in servers. Today, smart terminals and cloud servers carry more and more personal user information, and users are paying increasing attention to device security. The current mainstream system-level solution for ARM CPUs is TrustZone technology.
[0082] ARM TrustZone technology, first introduced as a security extension in ARMv6, divides hardware resources into two worlds: the insecure world (Rich Execution Environment (REE) side) and the secure world (Trusted Execution Environment (TEE) side). The operating system, which is closely related to the user, operates in the insecure world, while TrustZone, as a hardware security feature, operates in the secure world. The insecure world does not mean that the operating system or software running in it is malicious; rather, its security is lower than that of the secure world. When the CPU operates in the insecure world, resources in the secure world (such as registers, memory, cache, and peripherals) are inaccessible. If the CPU attempts to access these resources, the system will crash. For example, TrustZone can configure the TZASC (TrustZone Address Space Controller) and TZMA (TrustZone Memory Adapter) registers to set sensitive memory as Secure Memory, preventing the insecure world from accessing that memory. When the CPU operates in the secure world, it can access resources in both the secure and insecure worlds. Because it possesses higher privileges than the operating system in the insecure world, TrustZone can act as a root of trust to provide a higher level of security protection for the operating system in the insecure world.
[0083] In this system, the sensor management module operates in a secure state, where it handles sensor data acquisition. The sensor is not directly connected to insecure connections, preventing unsecured entities from tampering with the acquired data and ensuring the security of the sensor data acquisition. For example, in one possible implementation, the sensor data is GPS data.
[0084] In one possible implementation, the sensor data is Wi-Fi data;
[0085] In one possible implementation, the Trusted Execution Environment (TEE) acquires target data, which is obtained based on data collected from the sensor management module. This includes the TEE acquiring the target data from the shared memory of the TEE and the sensor management module (i.e., both the TEE and the sensor management module can access the shared memory).
[0086] For example, referring to Figure 3, both the TEE and sensorhub register for secure interrupts. They communicate via these secure interrupts. The system reserves a segment of secure memory, which is mapped by both the TEE and sensorhub. Data transfer is completed through shared memory. This setup ensures the security of the sensor acquisition process. After acquiring sensor data, the sensorhub stores it in shared memory. The sensorhub then sends a secure interrupt to the TEE. Upon receiving the interrupt request, the TEE reads the sensor data from the shared memory.
[0087] 202. The TEE generates a key for the target application and generates a signature for the target data based on the key.
[0088] Referring to Figure 4, the TEE can generate a key pair for the application. After reading the sensor data, the TEE can use the key corresponding to the application to sign the sensor data.
[0089] In one possible implementation, the sensor data is Wi-Fi data; therefore, since the Wi-Fi data itself is not a location, but rather location information needs to be inferred from the Wi-Fi data, this inference process can be performed by the server. Specifically, the TEE sends the sensor data and a signature of the sensor data to the server, and the TEE receives the location data of the terminal device sent by the server. The location data of the terminal device is determined by the server based on the sensor data after the signature verification is successful.
[0090] 203. The TEE transmits the target data and the signature to the target application.
[0091] When the Sensorhub is in a secure state, the sensor data collected through the Sensorhub can be protected from being tampered with by the REE.
[0092] For example, taking GPS information as sensor data, as shown in Figure 5, the Sensorhub is in a secure state. GPS information is collected through the Sensorhub, and the obtained information cannot be tampered with by the REE. The TEE obtains GPS information from the Sensorhub through the Sensorhub driver. The TEE generates a proof key for each application and uses the corresponding key to sign the GPS information. In order to prevent replay attacks, the signature data can also include challenge value and other information. The location service returns GPS location information, challenge value and signature.
[0093] In one possible implementation, the target application may use the target data if the signature verification passes.
[0094] In other words, after completing sensor data acquisition in a secure state, the sensor data can be signed and returned to the application. Specifically, the TEE can sign the sensor data and return it to the application. The application or application server verifies the signature before using the sensor data. Because the application can verify the signature before using the target data, data integrity can be guaranteed.
[0095] Furthermore, having the TEE collect sensor data can reduce the need to introduce new hardware.
[0096] In one possible implementation, the TEE can also receive the challenge value transmitted by the target application; then, it can generate the sensor data and a signature of the challenge value based on the key; the TEE transmits the target data, the challenge value, and the signature to the target application. The application can ensure the real-time nature of the data by verifying the challenge value, that is, to prevent data replay.
[0097] Referring to Figure 6, which is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application, as shown in Figure 6, a data processing apparatus 600 provided in an embodiment of this application includes:
[0098] The acquisition module 601 located in the TEE is used to acquire target data, which is obtained from data collected from the management module; the management module is in a safe state.
[0099] For a detailed description of the acquisition module 601, please refer to the description of the embodiment corresponding to Figure 2 in the above embodiments. The similarities will not be repeated here.
[0100] The processing module 602 located in the TEE is used to generate a key for the target application and generate a signature of the sensor data based on the key;
[0101] For a detailed description of the processing module 602, please refer to the description of the embodiment corresponding to Figure 2 in the above embodiments. The similarities will not be repeated here.
[0102] The transceiver module located in the TEE is used to transmit the target data and the signature to the target application.
[0103] For a detailed description of the transceiver module 603, please refer to the description of the embodiment corresponding to Figure 2 in the above embodiments. The similarities will not be repeated here.
[0104] In one possible implementation, the management module is a sensor management module, and the data collected by the sensor management module is specifically sensor data.
[0105] In one possible implementation, the target data is the location data of the terminal device;
[0106] The transceiver module is also used to send the sensor data and the signature of the sensor data;
[0107] The server receives the location data of the terminal device, which is determined by the server based on the sensor data after the signature verification is passed.
[0108] In one possible implementation, the transceiver module 603 is further configured to receive a challenge value transmitted by the target application;
[0109] The processing module 602 is specifically used for:
[0110] Generate a signature of the sensor data and the challenge value based on the key;
[0111] The transceiver module 603 is specifically used for:
[0112] The TEE transmits the target data, the challenge value, and the signature to the target application.
[0113] In one possible implementation, the device further includes:
[0114] The processing module located in the target application is used to use the target data if the signature verification passes.
[0115] In one possible implementation, the acquisition module 601 is specifically used for:
[0116] The target data is obtained from the shared memory of the TEE and the management module.
[0117] The following describes an execution device provided in an embodiment of this application. Please refer to Figure 7, which is a schematic diagram of the structure of an execution device provided in an embodiment of this application. Specifically, the execution device 700 includes: a receiver 701, a transmitter 702, a processor 703, and a memory 704 (wherein the execution device 700 may have one or more processors 703; Figure 7 shows one processor as an example). The processor 703 may include an application processor 7031 and a communication processor 7032. In some embodiments of this application, the receiver 701, transmitter 702, processor 703, and memory 704 may be connected via a bus or other means.
[0118] Memory 704 may include read-only memory and random access memory, and provides instructions and data to processor 703. A portion of memory 704 may also include non-volatile random access memory (NVRAM). Memory 704 stores processor and operation instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0119] Processor 703 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together through a bus system, which may include not only the data bus, but also power buses, control buses, and status signal buses. However, for clarity, all buses are referred to as the bus system in the diagram.
[0120] The methods disclosed in the embodiments of this application can be applied to processor 703, or implemented by processor 703. Processor 703 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by the integrated logic circuits in the hardware of processor 703 or by instructions in software form. Processor 703 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and may further include application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Processor 703 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 704, and processor 703 reads the information from memory 704 and, in conjunction with its hardware, completes the steps of the above method.
[0121] Receiver 701 can be used to receive input digital or character information, and to generate signal inputs related to the settings and function control of the execution device. Transmitter 702 can be used to output digital or character information through the first interface; transmitter 702 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; transmitter 702 may also include a display device such as a display screen.
[0122] This application embodiment also provides a server device. Referring to Figure 8, Figure 8 is a schematic diagram of a server structure provided in this application embodiment. Specifically, server 800 is implemented by one or more servers. Server 800 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 88 (e.g., one or more processors) and memory 832, and one or more storage media 830 (e.g., one or more mass storage devices) for storing application programs 842 or data 844. The memory 832 and storage media 830 can be temporary or persistent storage. The program stored in storage media 830 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the server. Furthermore, the CPU 88 may be configured to communicate with storage media 830 and execute a series of instruction operations in storage media 830 on server 800.
[0123] Server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input / output interfaces 858; or one or more operating systems 841, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0124] In this embodiment, the central processing unit 88 is used to execute the data processing method described in the above embodiment.
[0125] This application also provides a computer program product that, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.
[0126] This application also provides a computer-readable storage medium storing a program for signal processing, which, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.
[0127] The execution device, training device, or terminal device provided in this application embodiment can specifically be a chip. The chip includes a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer execution instructions stored in the storage unit to cause the chip within the execution device to execute the data processing method described in the above embodiments, or to cause the chip within the training device to execute the data processing method described in the above embodiments. Optionally, the storage unit can be a storage unit within the chip, such as a register or cache. Alternatively, the storage unit can be a storage unit located outside the chip within the wireless access device, such as a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).
[0128] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0129] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0130] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0131] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A data processing method, characterized in that, The method includes: The Trusted Execution Environment (TEE) acquires target data, which is obtained from data collected by the management module; the management module is in a secure state. The TEE generates a key for the target application and generates a signature for the target data based on the key; The TEE transmits the target data and the signature to the target application.
2. The method according to claim 1, characterized in that, The management module is a sensor management module, and the data collected by the sensor management module is specifically sensor data.
3. The method according to claim 2, characterized in that, The target data is the location data of the terminal device; the method further includes: The TEE sends the sensor data and the signature of the sensor data to the server; The TEE receives the location data of the terminal device sent by the server. The location data of the terminal device is determined by the server based on the sensor data after the signature verification is passed.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: the TEE receiving the challenge value transmitted by the target application; The step of generating a signature for the target data based on the key includes: Generate a signature of the target data and the challenge value based on the key; The TEE transmits the target data and the signature to the target application, including: The TEE transmits the target data, the challenge value, and the signature to the target application.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The target application uses the target data if the signature verification passes.
6. The method according to any one of claims 1 to 5, characterized in that, The Trusted Execution Environment (TEE) acquires target data, including: The Trusted Execution Environment (TEE) obtains the target data from the shared memory of the TEE and the management module.
7. A data processing apparatus, characterized in that, The device includes: The acquisition module located in the TEE is used to acquire target data, which is obtained from data collected from the management module; the management module is in a safe state. The processing module located in the TEE is used to generate a key for the target application and generate a signature of the sensor data based on the key; The transceiver module located in the TEE is used to transmit the target data and the signature to the target application.
8. The apparatus according to claim 7, characterized in that, The management module is a sensor management module, and the data collected by the sensor management module is specifically sensor data.
9. The apparatus according to claim 7 or 8, characterized in that, The target data is the location data of the terminal device; The transceiver module is also used to send the sensor data and the signature of the sensor data; The server receives the location data of the terminal device, which is determined by the server based on the sensor data after the signature verification is passed.
10. The apparatus according to any one of claims 7 to 9, characterized in that, The transceiver module is also used to receive the challenge value transmitted by the target application; The processing module is specifically used for: Generate a signature of the sensor data and the challenge value based on the key; The transceiver module is specifically used for: The TEE transmits the target data, the challenge value, and the signature to the target application.
11. The apparatus according to any one of claims 7 to 10, characterized in that, The device further includes: The processing module located in the target application is used to use the target data if the signature verification passes.
12. The apparatus according to any one of claims 7 to 11, characterized in that, The acquisition module is specifically used for: The target data is obtained from the shared memory of the TEE and the management module.
13. A computer storage medium, characterized in that, The computer storage medium stores one or more instructions that, when executed by one or more computers, cause the one or more computers to perform the operation of the method according to any one of claims 1 to 6.
14. A computer program product, characterized in that, Includes computer-readable instructions that, when executed on a computer device, cause the computer device to perform the method as described in any one of claims 1 to 6.
15. A system comprising at least one processor and at least one memory; the processor and the memory are connected via a communication bus and communicate with each other. The at least one memory is used to store code; The at least one processor is used to execute the code to perform the method as described in any one of claims 1 to 6.
16. A chip, characterized in that, It includes at least one processing unit and an interface circuit, the interface circuit being used to provide program instructions or data to the at least one processing unit, the at least one processing unit being used to execute the program instructions to implement the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Anti-fake method for locating terminal, anti-fake terminal, and system
CN108668216A
Position data processing method and device, electronic equipment and storage medium
CN115086959A
Trusted sensors
US20110320823A1