Ranging method and apparatus, electronic device, and storage medium
By generating and transmitting ranging security parameters within the processor security area of the terminal device, the problem of ranging parameter leakage in the terminal device is solved, security is improved, and the security of related scenarios is ensured.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2022-02-18
- Publication Date
- 2026-04-24
AI Technical Summary
Existing terminal devices are prone to parameter leakage when generating ranging and positioning parameters, which leads to a lack of security and affects user information and property security.
Ranging security parameters are generated within the processor security area of the terminal device and sent to the ranging chip through the communication channel between the security area and the ranging chip. Finally, the ranging chip performs ranging communication based on the security parameters, ensuring the security of the parameters during transmission.
This improves security during the ranging process, ensuring the security of scenarios such as location awareness, contactless payment, and contactless unlocking, and preventing threats to information and property security.
Smart Images

Figure CN116660824B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of terminal equipment technology, specifically to a ranging method, apparatus, electronic device, and storage medium. Background Technology
[0002] Current smartphones, wearable devices, and other terminal devices are equipped with UWB (Ultra Wide Band) technology, which can be used for ranging and positioning, thus playing a role in scenarios such as location awareness, contactless payment, contactless gate access, and contactless unlocking. These scenarios, which utilize ranging and positioning, have high security requirements. However, when generating parameters for ranging and positioning, the terminal devices using these technologies are prone to security incidents such as parameter leakage, which compromises the security of these scenarios and may even threaten users' information and property security. Summary of the Invention
[0003] To overcome the problems existing in the related technologies, the present disclosure provides a ranging method, apparatus, electronic device and storage medium to solve the defects in the related technologies.
[0004] According to a first aspect of the present disclosure, a ranging method is provided, applied to a terminal device, the terminal device having a processor and a ranging chip, the processor having a secure region, the secure region being communicatively connected to the ranging chip; the method includes:
[0005] Obtain the session parameters generated during the initial communication between the terminal device and the ranging device;
[0006] Within the safe area, ranging safety parameters are generated based on the session parameters;
[0007] The ranging safety parameters are sent to the ranging chip through the communication channel between the safe area and the ranging chip;
[0008] The ranging chip generates ranging time parameters based on the ranging safety parameters, and uses the ranging time parameters to communicate with the device to be ranging in order to obtain the ranging result.
[0009] In one embodiment, it also includes:
[0010] A communication channel is generated between the safe area and the ranging chip based on a first security parameter pre-set in the safe area and a second security parameter pre-set in the ranging chip.
[0011] In one embodiment, both the first security parameter and the second security parameter are common security parameters;
[0012] The step of generating a communication channel between the safe area and the ranging chip based on a first security parameter pre-set within the safe area and a second security parameter pre-set within the ranging chip includes:
[0013] A communication channel is generated between the security area and the ranging chip based on the public safety parameters.
[0014] In one embodiment, the first security parameter includes public security parameters of the security area, private security parameters, and public security parameters of the ranging chip; the second security parameter includes public security parameters of the ranging chip, private security parameters, and public security parameters of the security area.
[0015] The step of generating a communication channel between the safe area and the ranging chip based on a first security parameter pre-set within the safe area and a second security parameter pre-set within the ranging chip includes:
[0016] Within the safe area, common safety parameters are generated based on the first safety parameter;
[0017] The ranging chip generates the common safety parameter based on the second safety parameter;
[0018] A communication channel is generated between the security area and the ranging chip based on the public safety parameters.
[0019] In one embodiment, generating a communication channel between the security area and the ranging chip based on the public safety parameters includes:
[0020] Within the safe area, the public safety parameters are preset to generate temporary safety parameters;
[0021] The ranging chip performs preset processing on the public safety parameters to generate the temporary safety parameters;
[0022] A communication channel is generated between the security area and the ranging chip based on the temporary security parameters.
[0023] In one embodiment, the following initial communication process is also included:
[0024] The terminal device communicates with the device to be measured so that the terminal device and the device to be measured can mutually verify each other's identities.
[0025] When the terminal device and the distance measurement device have completed mutual authentication, the terminal device communicates with the distance measurement device to generate the same session parameters as the distance measurement device.
[0026] According to a second aspect of the present disclosure, a ranging method is provided, applied to a device to be ranging, comprising:
[0027] Acquire the session parameters generated during the initial communication between the ranging device and the terminal device;
[0028] Generate ranging safety parameters based on the session parameters;
[0029] The ranging time parameter is generated based on the ranging safety parameter, and the ranging time parameter is used to communicate with the device to be ranging to obtain the ranging result.
[0030] According to a third aspect of the present disclosure, a ranging device is provided, applied to a terminal device, the terminal device having a processor and a ranging chip, the processor having a secure area, the secure area being communicatively connected to the ranging chip; the device includes:
[0031] The first acquisition module is used to acquire session parameters generated during the initial communication between the terminal device and the ranging device to be measured.
[0032] The first parameter module is used to generate ranging security parameters based on the session parameters within the security area;
[0033] The transmitting module is used to transmit the ranging safety parameters to the ranging chip through the communication channel between the safe area and the ranging chip;
[0034] The second parameter module is used to control the ranging chip to generate ranging time parameters based on the ranging safety parameters, and to use the ranging time parameters to communicate with the device to be ranging in order to obtain the ranging result.
[0035] In one embodiment, a channel building module is also included for:
[0036] A communication channel is generated between the safe area and the ranging chip based on a first security parameter pre-set in the safe area and a second security parameter pre-set in the ranging chip.
[0037] In one embodiment, both the first security parameter and the second security parameter are common security parameters;
[0038] The channel construction module is specifically used for:
[0039] A communication channel is generated between the security area and the ranging chip based on the public safety parameters.
[0040] In one embodiment, the first security parameter includes public security parameters of the security area, private security parameters, and public security parameters of the ranging chip; the second security parameter includes public security parameters of the ranging chip, private security parameters, and public security parameters of the security area.
[0041] The channel construction module is specifically used for:
[0042] Within the safe area, common safety parameters are generated based on the first safety parameter;
[0043] The ranging chip generates the common safety parameter based on the second safety parameter;
[0044] A communication channel is generated between the security area and the ranging chip based on the public safety parameters.
[0045] In one embodiment, the channel construction module is used to generate a communication channel between the security area and the ranging chip based on the public safety parameters, specifically for the following purposes:
[0046] Within the safe area, the public safety parameters are preset to generate temporary safety parameters;
[0047] The ranging chip performs preset processing on the public safety parameters to generate the temporary safety parameters;
[0048] A communication channel is generated between the security area and the ranging chip based on the temporary security parameters.
[0049] In one embodiment, a communication module is further included for performing the following initial communication process:
[0050] The terminal device communicates with the device to be measured so that the terminal device and the device to be measured can mutually verify each other's identities.
[0051] When the terminal device and the distance measurement device have completed mutual authentication, the terminal device communicates with the distance measurement device to generate the same session parameters as the distance measurement device.
[0052] According to a fourth aspect of the present disclosure, a ranging device is provided, applied to a device to be ranging, comprising:
[0053] The second acquisition module is used to acquire session parameters generated during the initial communication process between the ranging device and the terminal device.
[0054] The third parameter module is used to generate ranging safety parameters based on the session parameters;
[0055] The fourth parameter module is used to generate a ranging time parameter based on the ranging safety parameter, and to use the ranging time parameter to communicate with the ranging device to be measured to obtain the ranging result.
[0056] According to a fifth aspect of the present disclosure, an electronic device is provided, the electronic device including a memory and a processor, the memory being configured to store computer instructions executable on the processor, and the processor being configured to execute the computer instructions based on the image detection method described in the first or second aspect.
[0057] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in the first or second aspect.
[0058] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0059] This disclosure establishes a secure communication zone between the processor and the ranging chip. This allows for the acquisition of session parameters generated during the initial communication between the terminal device and the device under test. Ranging security parameters are then generated within the secure zone based on these session parameters. These parameters are then transmitted to the ranging chip via the communication channel between the secure zone and the ranging chip. Finally, the ranging chip generates ranging time parameters based on these parameters and uses them to communicate with the device under test to obtain the ranging result. Because the ranging security parameters are generated within the processor's secure zone, and the communication channel between the secure zone and the ranging chip is secure, these parameters are relatively safe before entering the ranging chip and will not be leaked. This improves the security of the parameters during the ranging process, thereby ensuring the security of ranging-related scenarios such as location sensing, contactless payment, contactless gate access, and contactless unlocking, and preventing threats to user information and property security. Attached Figure Description
[0060] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0061] Figure 1 This is a flowchart illustrating a ranging method applied to a terminal device according to an exemplary embodiment of the present disclosure;
[0062] Figure 2 This is a schematic diagram of the structure of a terminal device shown in an exemplary embodiment of the present disclosure;
[0063] Figure 3 This is a flowchart illustrating an exemplary embodiment of the present disclosure of a ranging method applied to a ranging device;
[0064] Figure 4 This is a schematic diagram of the structure of a ranging device applied to a terminal device, as shown in an exemplary embodiment of this disclosure;
[0065] Figure 5 This is a schematic diagram of the structure of a ranging device applied to a device to be measured, as shown in an exemplary embodiment of this disclosure;
[0066] Figure 6 This is a structural block diagram of an electronic device illustrated in an exemplary embodiment of the present disclosure. Detailed Implementation
[0067] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0068] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0069] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0070] Firstly, at least one embodiment of this disclosure provides a ranging method; please refer to the appendix. Figure 1 The diagram illustrates the process of the method, including steps S101 and S104.
[0071] This ranging method can be applied to, for example... Figure 2 The terminal equipment shown is illustrated. Please refer to the appendix. Figure 2The terminal device has a processor 201 and a ranging chip 202. The processor has a secure area 2011, such as a TEE (trusted execution environment). The secure area 2011 of the processor 201 can communicate with the ranging chip 202, meaning it has the hardware capability for communication. For example, it can use communication buses such as SPI or I2C to achieve the communication connection between the two. Optionally, the terminal device can be equipped with software for ranging, which is used to specifically execute the ranging method. The ranging method can employ UWB technology or other ranging technologies. If UWB technology is used, the ranging chip can be a UWB chip. The following steps use UWB technology as an example to describe the details of this ranging method in detail.
[0072] This ranging method is used to detect the distance between the terminal device executing the method and the device to be measured. In one possible scenario, the terminal device can be a smartphone, tablet, wearable device, etc., and the device to be measured can be a vehicle or a door lock, etc. The terminal device uses this ranging method to start the vehicle and unlock the door lock, thus enabling the terminal device to be used as a digital key.
[0073] In step S101, the session parameters generated during the initial communication between the terminal device and the ranging device are obtained.
[0074] The initial communication process between the terminal device and the device to be ranged is the identification process before ranging. The terminal device can use software (UWB Key Service, hereinafter referred to as ranging software UKS) to perform the initial communication in a region outside the processor's secure region. In one possible scenario, the processor's secure region is a TEE (trusted execution environment), and the regions outside the processor's secure region are REEs (rich execution environments). The ranging software UKS has a TA (Trusted Application) part running in the secure region TEE (hereinafter referred to as UKS TA) and a CA (Client Application) part located in the REE region outside the secure region (hereinafter referred to as UKS CA). In this scenario, the initial communication can be performed by the UKS CA. The session parameter can be a session key.
[0075] For example, the initial communication process between the terminal device and the ranging device can be as follows: First, the terminal device communicates with the ranging device to mutually verify their identities. That is, during the communication process, the terminal device verifies whether the ranging device is a paired device, and the ranging device also verifies whether the terminal device is a paired device. After the terminal device and the ranging device have completed mutual authentication (i.e., the terminal device's verification result is that the ranging device is its paired device, and the ranging device's verification result is that the terminal device is its paired device), the terminal device communicates with the ranging device to generate the same session parameters. It is understood that the terminal device communicating with the ranging device can be achieved by using communication methods such as Bluetooth or NFC (Near Field Communication) for the ranging software; or the ranging software can communicate with the ranging device using standards such as CCC, FiRa, or ICCOA.
[0076] In step S102, within the safe area, ranging safety parameters are generated based on the session parameters.
[0077] The ranging software UKS can send session parameters to the UKS TA within the secure area TEE. The UKS TA has pre-set rules and methods for generating ranging security parameters, and it generates the ranging security parameters according to these rules and methods based on the session parameters. For example, if the session parameter is a session key, the generated ranging security parameter is URSK (UWB Ranging Secret key).
[0078] Generating ranging security parameters within a secure area of the processor avoids reliance on other chips outside the processor, such as NFC chips, thus improving the hardware configuration flexibility of terminal devices with UWB ranging capabilities.
[0079] In step S103, the ranging safety parameters are sent to the ranging chip through the communication channel between the safe area and the ranging chip.
[0080] Optionally, the UWB chip also has a secure area, meaning that data within the secure area cannot be read by programs in other areas. The communication channel between the processor's secure area and the UWB chip can be formed between the processor's secure area and the UWB chip's secure area. This communication channel exists between the two secure areas, making it relatively secure, and the communication data transmitted within this communication channel will not be leaked.
[0081] In step S104, the ranging chip generates a ranging time parameter based on the ranging safety parameter, and uses the ranging time parameter to perform ranging communication with the device to be ranging, thereby obtaining the ranging result.
[0082] The UWB chip has pre-set rules and methods for generating ranging time parameters. The UWB chip generates ranging time parameters according to these rules and methods based on the ranging safety parameters. For example, if the ranging safety parameter is URSK, the ranging time parameter can be STS (Scrambled Timestamp Sequence).
[0083] Understandably, the device under test also has a UWB chip. Therefore, the UWB chip of the device under test can also generate ranging security parameters, such as URSK, using the session parameters generated during the initial communication between the terminal device and the device under test. The UWB chip of the device under test can further generate ranging time parameters based on the ranging security parameters, such as STS based on URSK. After both the terminal device and the device under test have generated the same ranging time parameters, the UWB chips of the terminal device and the device under test can conduct ranging communication using ranging time parameters such as STS. This allows the UWB chip of the terminal device to calculate the ranging result, i.e., the distance between the two devices, based on the communication result, and also allows the UWB chip of the device under test to calculate the ranging result, i.e., the distance between the two devices. When the UWB chip of the terminal device and the UWB chip of the device to be ranged communicate for ranging, the terminal device can generate a first UWB data packet containing STS according to the data rules, and then send the first UWB data packet to the device to be ranged. The device to be ranged verifies whether the STS in the first UWB data packet is the same as the STS generated by the UWB chip of the device to be ranged. If they are the same, it generates a second UWB data packet containing STS according to the data rules and returns the second UWB data packet to the terminal device. The terminal device verifies whether the STS in the second UWB data packet is the same as the STS generated by the UWB chip of the terminal device. If they are the same, it generates a third UWB data packet containing STS again according to the data rules, and then sends the third UWB data packet to the device to be ranged, thereby completing the ranging communication.
[0084] This disclosure establishes a secure communication zone between the processor and the ranging chip. This allows for the acquisition of session parameters generated during the initial communication between the terminal device and the device under test. Ranging security parameters are then generated within the secure zone based on these session parameters. These parameters are then transmitted to the ranging chip via the communication channel between the secure zone and the ranging chip. Finally, the ranging chip generates ranging time parameters based on these parameters and uses them to communicate with the device under test to obtain the ranging result. Because the ranging security parameters are generated within the processor's secure zone, and the communication channel between the secure zone and the ranging chip is secure, these parameters are relatively safe before entering the ranging chip and will not be leaked. This improves the security of the parameters during the ranging process, thereby ensuring the security of ranging-related scenarios such as location sensing, contactless payment, contactless gate access, and contactless unlocking, and preventing threats to user information and property security.
[0085] In some embodiments of this disclosure, a first security parameter can be pre-set in the secure area of the processor and a second security parameter can be pre-set in the secure area of the ranging chip before the terminal device leaves the factory. The first and second security parameters can be keys. Based on this, the terminal device can generate a communication channel between the secure area and the ranging chip according to the first security parameter pre-set in the secure area and the second security parameter pre-set in the ranging chip.
[0086] In one possible embodiment, both the first security parameter and the second security parameter can be common security parameters, such as a symmetric key, meaning the first and second security parameters use the same key. In this embodiment, a communication channel can be generated between the secure area and the ranging chip based on this common security parameter. The specific generation process of the communication channel can be determined based on communication specifications such as SCP02 or SCP03.
[0087] In another possible embodiment, the first security parameter includes the public security parameter and private security parameter of the secure area and the public security parameter of the ranging chip, and the second security parameter includes the public security parameter and private security parameter of the ranging chip and the public security parameter of the secure area; for example, the first security parameter and the second security parameter can be asymmetric keys, the first security parameter being DEV.PK / SK,UWB.PK, which includes the private key and public key of the terminal device and the public key of the device to be ranging, and the second security parameter being DEV.PK,UWB.PK / SK, which includes the private key and public key of the terminal device and the public key of the device to be ranging. In this embodiment, a common safety parameter can first be generated within the secure area based on the first safety parameter. For example, UKS TA uses the Diffie-Hellman algorithm to generate the common safety parameter `scret` based on the first safety parameter. Then, the ranging chip generates the common safety parameter based on the second safety parameter. For example, the UWB chip uses the Diffie-Hellman algorithm to generate the common safety parameter `secret` based on the second safety parameter. Finally, a communication channel is generated between the secure area and the ranging chip based on the common safety parameter `secret`. The specific generation process of the communication channel can be determined based on communication specifications such as SCP11.
[0088] In the two embodiments described above, when generating a communication channel between the secure area and the ranging chip based on the public security parameters, the public security parameters can first be preset within the secure area to generate temporary security parameters. For example, UKS TA uses the public security parameters to hash preset data to obtain temporary security parameters such as a one-time session key. Then, the ranging chip performs the preset processing on the public security parameters to generate the temporary security parameters. The UWB chip can also use the public security parameters to hash preset data to obtain temporary security parameters such as a one-time session key. Finally, a communication channel is generated between the secure area and the ranging chip based on the temporary security parameters. This method of generating a communication channel using temporary security parameters uses the public security parameters as the root key, and then generates a one-time session key that is only valid for this time when the communication channel is built. This protects the security of the public security parameters, further protecting the security of the communication channel and the ranging security parameters transmitted within the communication channel. In other words, even if temporary security parameters are lost or leaked during the construction of the communication channel, due to the irreversibility of the hash processing, it will not pose a threat to the security of the next communication channel construction.
[0089] Secondly, at least one embodiment of this disclosure provides a ranging method, please refer to the appendix. Figure 3It illustrates the process of the method, including steps S301 and S303.
[0090] This method is applied to the distance measuring device mentioned in the first aspect.
[0091] In step S301, the session parameters generated during the initial communication between the ranging device and the terminal device are obtained;
[0092] In step S302, ranging security parameters are generated based on the session parameters;
[0093] In step S303, a ranging time parameter is generated based on the ranging safety parameter, and the ranging time parameter is used to perform ranging communication with the device to be ranging, so as to obtain the ranging result.
[0094] The steps in this embodiment are the same as the corresponding steps on the terminal device side in the first aspect. The difference is that all the steps in this embodiment are completed in the ranging chip of the ranging device to be measured, such as a UWB chip.
[0095] According to a third aspect of the present disclosure, a ranging device is provided, applied to a terminal device, the terminal device having a processor and a ranging chip, the processor having a secure area; please refer to the appendix. Figure 4 The device includes:
[0096] The first acquisition module 401 is used to acquire session parameters generated during the initial communication process between the terminal device and the ranging device to be measured.
[0097] The first parameter module 402 is used to generate ranging security parameters based on the session parameters within the security area.
[0098] The sending module 403 is used to send the ranging safety parameters to the ranging chip through the communication channel between the safe area and the ranging chip;
[0099] The second parameter module 404 is used to control the ranging chip to generate ranging time parameters according to the ranging safety parameters, and to use the ranging time parameters to communicate with the device to be ranging to obtain the ranging result.
[0100] In some embodiments of this disclosure, a channel construction module is also included, for:
[0101] A communication channel is generated between the safe area and the ranging chip based on a first security parameter pre-set in the safe area and a second security parameter pre-set in the ranging chip.
[0102] In some embodiments of this disclosure, both the first security parameter and the second security parameter are common security parameters;
[0103] The channel construction module is specifically used for:
[0104] A communication channel is generated between the security area and the ranging chip based on the public safety parameters.
[0105] In some embodiments of this disclosure, the first security parameter includes public security parameters of the security area, private security parameters, and public security parameters of the ranging chip; the second security parameter includes public security parameters of the ranging chip, private security parameters, and public security parameters of the security area.
[0106] The channel construction module is specifically used for:
[0107] Within the safe area, common safety parameters are generated based on the first safety parameter;
[0108] The ranging chip generates the common safety parameter based on the second safety parameter;
[0109] A communication channel is generated between the security area and the ranging chip based on the public safety parameters.
[0110] In some embodiments of this disclosure, when the channel construction module generates a communication channel between the security area and the ranging chip based on the public safety parameters, it is specifically used for:
[0111] Within the safe area, the public safety parameters are preset to generate temporary safety parameters;
[0112] The ranging chip performs preset processing on the public safety parameters to generate the temporary safety parameters;
[0113] A communication channel is generated between the security area and the ranging chip based on the temporary security parameters.
[0114] In some embodiments of this disclosure, a communication module is also included for performing the following initial communication process:
[0115] The terminal device communicates with the device to be measured so that the terminal device and the device to be measured can mutually verify each other's identities.
[0116] When the terminal device and the distance measurement device have completed mutual authentication, the terminal device communicates with the distance measurement device to generate the same session parameters as the distance measurement device.
[0117] According to a fourth aspect of the embodiments of this disclosure, a ranging device is provided, applied to a device to be ranging. Please refer to the appendix. Figure 5 ,include:
[0118] The second acquisition module 501 is used to acquire session parameters generated during the initial communication process between the ranging device and the terminal device.
[0119] The third parameter module 502 is used to generate ranging safety parameters based on the session parameters;
[0120] The fourth parameter module 503 is used to generate a ranging time parameter based on the ranging safety parameter, and to use the ranging time parameter to perform ranging communication with the device to be ranging, so as to obtain the ranging result.
[0121] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments of the method in the first and second aspects, and will not be elaborated upon here.
[0122] According to the fifth aspect of the embodiments of this disclosure, please refer to the appendix. Figure 6 The diagram illustrates, for example, a block diagram of an electronic device. For instance, device 600 could be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0123] Reference Figure 6 The device 600 may include one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.
[0124] Processing component 602 typically controls the overall operation of device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.
[0125] Memory 604 is configured to store various types of data to support the operation of device 600. Examples of this data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0126] The power supply component 606 provides power to the various components of the device 600. The power supply component 606 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 600.
[0127] Multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0128] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.
[0129] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0130] Sensor assembly 614 includes one or more sensors for providing status assessments of various aspects of device 600. For example, sensor assembly 614 can detect the on / off state of device 600, the relative positioning of components such as the display and keypad of device 600, image detection of changes in the position of device 600 or a component of device 600, the presence or absence of user contact with device 600, orientation or acceleration / deceleration of device 600, and temperature changes of device 600. Sensor assembly 614 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0131] Communication component 616 is configured to facilitate wired or wireless communication between device 600 and other devices. Device 600 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G or 5G, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0132] In an exemplary embodiment, device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the power supply method of the aforementioned electronic device.
[0133] Sixthly, in exemplary embodiments, this disclosure also provides a non-transitory computer-readable storage medium including instructions, such as a memory 604 including instructions, which can be executed by a processor 620 of device 600 to complete the power supply method of the electronic device. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0134] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0135] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A distance measurement method, characterized in that, The method is applied to a terminal device, the terminal device having a processor and a ranging chip, the processor having a secure area, the secure area being communicatively connected to the ranging chip; the method includes: Obtain the session parameters generated during the initial communication between the terminal device and the ranging device; Within the safe area, ranging safety parameters are generated based on the session parameters; The ranging security parameters are sent to the ranging chip through the communication channel between the security area and the ranging chip, wherein the communication channel is constructed based on the temporary security parameters generated within the security area and the temporary security parameters generated within the ranging chip; The ranging chip generates ranging time parameters based on the ranging safety parameters, and uses the ranging time parameters to communicate with the device to be ranging in order to obtain the ranging result.
2. The ranging method according to claim 1, characterized in that, Also includes: A communication channel is generated between the safe area and the ranging chip based on a first security parameter pre-set in the safe area and a second security parameter pre-set in the ranging chip. Both the first security parameter and the second security parameter are common security parameters; The step of generating a communication channel between the safe area and the ranging chip based on a first security parameter pre-set in the safe area and a second security parameter pre-set in the ranging chip includes: generating a communication channel between the safe area and the ranging chip based on the common security parameter; The step of generating a communication channel between the safe area and the ranging chip based on the public safety parameters includes: performing preset processing on the public safety parameters within the safe area to generate temporary safety parameters; the ranging chip performing preset processing on the public safety parameters to generate the temporary safety parameters; and generating a communication channel between the safe area and the ranging chip based on the temporary safety parameters.
3. The ranging method according to claim 1, characterized in that, Also includes: A communication channel is generated between the safe area and the ranging chip based on a first security parameter pre-set in the safe area and a second security parameter pre-set in the ranging chip. The first security parameter includes public security parameters and private security parameters of the secure area, and public security parameters of the ranging chip. The second security parameter includes public security parameters and private security parameters of the ranging chip, and public security parameters of the secure area. The step of generating a communication channel between the secure area and the ranging chip based on the first security parameter pre-installed within the secure area and the second security parameter pre-installed within the ranging chip includes: generating public security parameters based on the first security parameter within the secure area; generating the public security parameters based on the second security parameter in the ranging chip; and generating a communication channel between the secure area and the ranging chip based on the public security parameter. The step of generating a communication channel between the safe area and the ranging chip based on the public safety parameters includes: performing preset processing on the public safety parameters within the safe area to generate temporary safety parameters; the ranging chip performing preset processing on the public safety parameters to generate the temporary safety parameters; and generating a communication channel between the safe area and the ranging chip based on the temporary safety parameters.
4. The ranging method according to claim 1, characterized in that, It also includes the following initial communication process: The terminal device communicates with the device to be measured so that the terminal device and the device to be measured can mutually verify each other's identities. When the terminal device and the distance measurement device have completed mutual authentication, they communicate with the distance measurement device to enable the terminal device and the distance measurement device to generate the same session parameters.
5. A distance measurement method, characterized in that, Applied to devices for measuring distance, including: Acquire the session parameters generated during the initial communication between the ranging device and the terminal device; Generate ranging safety parameters based on the session parameters; A ranging time parameter is generated based on the ranging safety parameter, and the ranging time parameter is used to perform ranging communication with the terminal device executing the ranging method of any one of claims 1 to 4 to obtain the ranging result.
6. A ranging device, characterized in that, An apparatus for use in a terminal device, the terminal device having a processor and a ranging chip, the processor having a secure area communicatively connected to the ranging chip; the apparatus includes: The first acquisition module is used to acquire session parameters generated during the initial communication between the terminal device and the ranging device to be measured. The first parameter module is used to generate ranging security parameters based on the session parameters within the security area; The sending module is used to send the ranging security parameters to the ranging chip through the communication channel between the security area and the ranging chip, wherein the communication channel is constructed based on the temporary security parameters generated in the security area and the temporary security parameters generated in the ranging chip; The second parameter module is used to control the ranging chip to generate ranging time parameters based on the ranging safety parameters, and to use the ranging time parameters to communicate with the device to be ranging in order to obtain the ranging result.
7. The ranging device according to claim 6, characterized in that, It also includes a channel construction module, used to: generate a communication channel between the safe area and the ranging chip based on a first security parameter pre-set in the safe area and a second security parameter pre-set in the ranging chip; Both the first security parameter and the second security parameter are common security parameters; the channel construction module is specifically used to: generate a communication channel between the security area and the ranging chip according to the common security parameters; The channel construction module is used to generate a communication channel between the safe area and the ranging chip based on the public safety parameters. Specifically, it is used to: perform preset processing on the public safety parameters within the safe area to generate temporary safety parameters; the ranging chip performs preset processing on the public safety parameters to generate the temporary safety parameters; and generate a communication channel between the safe area and the ranging chip based on the temporary safety parameters.
8. The ranging device according to claim 6, characterized in that, It also includes a channel construction module, used to: generate a communication channel between the safe area and the ranging chip based on a first security parameter pre-set in the safe area and a second security parameter pre-set in the ranging chip; The first security parameter includes public security parameters and private security parameters of the secure area, and public security parameters of the ranging chip; the second security parameter includes public security parameters and private security parameters of the ranging chip, and public security parameters of the secure area; the channel construction module is specifically used to: generate public security parameters based on the first security parameter within the secure area; generate the public security parameters based on the second security parameter of the ranging chip; and generate a communication channel between the secure area and the ranging chip based on the public security parameter. The channel construction module is used to generate a communication channel between the safe area and the ranging chip based on the public safety parameters. Specifically, it is used to: perform preset processing on the public safety parameters within the safe area to generate temporary safety parameters; the ranging chip performs preset processing on the public safety parameters to generate the temporary safety parameters; and generate a communication channel between the safe area and the ranging chip based on the temporary safety parameters.
9. The ranging device according to claim 6, characterized in that, It also includes a communication module for performing the following initial communication process: The terminal device communicates with the device to be measured so that the terminal device and the device to be measured can mutually verify each other's identities. When the terminal device and the distance measurement device have completed mutual authentication, they communicate with the distance measurement device to enable the terminal device and the distance measurement device to generate the same session parameters.
10. A ranging device, characterized in that, Applied to devices for measuring distance, including: The second acquisition module is used to acquire session parameters generated during the initial communication process between the ranging device and the terminal device. The third parameter module is used to generate ranging safety parameters based on the session parameters; The fourth parameter module is used to generate a ranging time parameter based on the ranging safety parameter, and to use the ranging time parameter to perform ranging communication with the terminal device executing the ranging method of any one of claims 1 to 4 to obtain the ranging result.
11. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being used to store computer instructions that can be executed on the processor, and the processor being used to execute the computer instructions based on the ranging method according to any one of claims 1 to 5.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Data communication method using secure element and electronic system adopting the same
US20160294826A1
Method and electronic device for managing digital keys
US20210176230A1