Data protection method and terminal
By establishing short-distance communication and distance monitoring between terminals, the decryption key is only provided within a specific range, which solves the problem of unauthorized access after the key is leaked and improves data security.
Patent Information
- Application Number
- CN202310303466.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-16
- Publication Date
- 2024-09-20
AI Technical Summary
In the existing technology, after using a key to encrypt data, the identity of the user who decrypts the data cannot be verified. Once the key is leaked, others can also decrypt and access the data, resulting in the abuse and loss of access rights and affecting the security of the data.
By establishing short-distance communication between terminals, such as using UWB or Bluetooth, the distance between the two is monitored, the decryption key and access rights are only provided when the distance is less than the set threshold, and the key is destroyed when leaving the range or canceling authorization. Key to ensure data is decrypted and accessible within a specific scope.
It improves the security of data, prevents unauthorized access after key leakage, and enhances the data protection mechanism.
Smart Images

Figure CN118677603A
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security, and in particular to a data protection method and terminal. Background Art
[0002] In daily life, for the security of data, users often encrypt data for protection. The most common way is that the user who encrypts the data encrypts the data with a key, and then sends the key to the other party, who can use the key to decrypt the data.
[0003] The problem with using keys to encrypt data is that the user who encrypts the data cannot verify the identity of the user who decrypts the data. Once the key is leaked, other people who obtain the key can also use the key to decrypt and access the encrypted data. Therefore, the current method of using keys to encrypt data may cause abuse and loss of access rights, affecting data security. Summary of the invention
[0004] The present application provides a data protection method and a terminal to improve the security of data.
[0005] In a first aspect, the present application provides a data protection method, applied to a first terminal, the method comprising: sending a first message to a second terminal, the first message being used to request authorization for the first terminal to access data; receiving a distance threshold value and a key for decrypting data from the second terminal; and decrypting the data based on the key while maintaining short-distance communication with the second terminal and the distance to the second terminal is less than or equal to the distance threshold value.
[0006] Based on this method, when the first terminal attempts to access data, it obtains the authorization and key of the second terminal and decrypts the data within a certain distance around the second terminal. Once the first terminal leaves the distance range set by the second terminal, it can no longer maintain decryption and access to the data, thereby improving data security.
[0007] In combination with the first aspect, in some possible implementations of the first aspect, the method also includes: destroying the key when the short-distance communication with the second terminal is disconnected, or when the distance with the second terminal is greater than the distance threshold, or when a second message is received from the second terminal, and the second message is used to notify that the authorization is revoked.
[0008] Since the first terminal and the second terminal may have errors in monitoring the distance, it may happen that the distance monitored by one terminal is greater than the distance threshold value while the distance monitored by the other terminal is not greater than the distance threshold value. In order to improve the security of data, as long as one of the terminals monitors a distance greater than the distance threshold value, the first terminal will destroy the key and stop displaying the data.
[0009] When the distance monitored by the first terminal is greater than the distance threshold, the first terminal can actively destroy the key and stop displaying the data; when the distance monitored by the second terminal is greater than the distance threshold, the second terminal can send a second message to the first terminal, and the second message is used to inform the first terminal to cancel the authorization. After receiving the second message, the first terminal destroys the key and stops displaying the data.
[0010] In combination with the first aspect, in some possible implementations of the first aspect, before sending the first message to the second terminal, the method also includes: sending a third message to the second terminal through near field communication (NFC) or displaying a QR code, wherein the third message is used to request to establish the short-range communication with the second terminal.
[0011] Methods for requesting to establish short-distance communication may include NFC and QR code. When establishing short-distance communication through these two methods, the two terminals will be at a relatively close distance, which is conducive to the first user and the second user to confirm each other's identity and improve data security.
[0012] The communication technologies used to establish short-range communication may include, but are not limited to, ultra wide band (UWB) and Bluetooth. The applicable distance of UWB and Bluetooth is within about 10 meters, and compared with communication technologies such as wireless local area networks (WLAN), they are more sensitive to distance and are more conducive to monitoring distance.
[0013] In combination with the first aspect, in some possible implementations of the first aspect, after sending the third message to the second terminal, the method also includes: establishing short-range communication with the second terminal; based on the short-range communication, obtaining an authorization result of the second terminal for accessing data of the first terminal, the authorization result including: approval of authorization or refusal of authorization; and the key is received when the authorization result is approval of authorization.
[0014] The second terminal may send the authorization result to the first terminal through the established short-distance communication.
[0015] In combination with the first aspect, in some possible implementations of the first aspect, the method further includes: when the authorization result is approval of the authorization, monitoring the distance to the second terminal based on short-range communication.
[0016] If the second user does not agree to the authorization, there is no need to monitor the distance. If the second user agrees to the authorization, the distance between the first terminal and the second terminal is monitored, for example, the distance can be directly monitored through a communication technology such as UWB.
[0017] In combination with the first aspect, in some possible implementations of the first aspect, the communication technology used to establish short-range communication is Bluetooth, and based on the short-range communication, the distance to the second terminal is monitored, including: based on the short-range communication, monitoring the signal strength of the signal from the second terminal; based on the signal strength, obtaining the distance to the second terminal.
[0018] The distance cannot be directly monitored through communication technology such as Bluetooth, and the distance needs to be calculated by monitoring the signal strength.
[0019] In a second aspect, the present application provides a data protection method, applied to a second terminal, the method comprising: receiving a first message from a first terminal, the first message being used to request authorization for the first terminal to access data; and if the authorization is agreed, sending a distance threshold value and a key for decrypting data to the first terminal.
[0020] In combination with the second aspect, in some possible implementations of the second aspect, the method also includes: when the distance to the first terminal is greater than a distance threshold value, or when the user cancels the authorization, sending a second message to the first terminal, the second message being used to notify that the authorization is cancelled.
[0021] In combination with the second aspect, in some possible implementations of the second aspect, before receiving the first message from the first terminal, the method also includes: receiving a third message from the first terminal via NFC or scanning a QR code, the third message being used to request establishment of short-range communication.
[0022] In combination with the second aspect, in some possible implementations of the second aspect, after receiving the third message from the first terminal, the method also includes: establishing short-range communication with the first terminal; based on the short-range communication, sending an authorization result for accessing data to the first terminal, the authorization result including: approval of authorization or refusal of authorization; and the key is sent when the authorization result is approval of authorization.
[0023] In combination with the second aspect, in some possible implementations of the second aspect, the method further includes: when the authorization result is approval of the authorization, monitoring the distance to the first terminal based on short-range communication.
[0024] In combination with the second aspect, in some possible implementations of the second aspect, the communication technology used to establish short-range communication is Bluetooth, and based on the short-range communication, the distance to the first terminal is monitored, including: based on the short-range communication, monitoring the signal strength of the signal from the first terminal; based on the signal strength, obtaining the distance to the first terminal.
[0025] In combination with the second aspect, in some possible implementations of the second aspect, the method further includes: in response to an operation in which the user agrees to the authorization, agreeing to the authorization.
[0026] In a third aspect, the present application provides a terminal, comprising: a communication module and a processing module; the communication module is used to send a first message to a second terminal, the first message is used to request authorization for the first terminal to access data; receive a distance threshold value and a key for decrypting data from the second terminal; the processing module decrypts the data based on the key while maintaining short-distance communication with the second terminal and the distance to the second terminal is less than or equal to the distance threshold value.
[0027] In combination with the third aspect, in some possible implementations of the third aspect, the processing module is also used to destroy the key when the short-distance communication with the second terminal is disconnected, or when the distance with the second terminal is greater than a distance threshold, or when a second message is received from the second terminal, and the second message is used to notify that the authorization is revoked.
[0028] In combination with the third aspect, in some possible implementations of the third aspect, the communication module is also used to send a third message to the second terminal via NFC or displaying a QR code, where the third message is used to request to establish short-range communication with the second terminal.
[0029] In combination with the third aspect, in some possible implementations of the third aspect, the processing module is also used to establish short-distance communication with the second terminal; the communication module is also used to obtain, based on the short-distance communication, an authorization result of the second terminal for accessing data to the first terminal, the authorization result including: approval of authorization or refusal of authorization; and the key is received when the authorization result is approval of authorization.
[0030] In combination with the third aspect, in some possible implementations of the third aspect, the processing module is further configured to, when the authorization result is approval of the authorization, monitor the distance to the second terminal based on short-range communication.
[0031] In combination with the third aspect, in some possible implementations of the third aspect, the communication technology used to establish short-range communication is Bluetooth, and the communication module is used to monitor the signal strength of the signal from the second terminal based on short-range communication; the processing module is used to obtain the distance to the second terminal based on the signal strength.
[0032] In a fourth aspect, the present application provides a terminal, comprising: a communication module, used to receive a first message from a first terminal, the first message being used to request authorization for the first terminal to access data; if the authorization is agreed, a distance threshold value and a key for decrypting data are sent to the first terminal.
[0033] In combination with the fourth aspect, in some possible implementations of the fourth aspect, the communication module is also used to send a second message to the first terminal when the distance to the first terminal is greater than a distance threshold value, or when the user cancels the authorization, and the second message is used to notify that the authorization is cancelled.
[0034] In combination with the fourth aspect, in some possible implementations of the fourth aspect, the communication module is further used to receive a third message from the first terminal via NFC or scanning a QR code, where the third message is used to request to establish short-range communication.
[0035] In combination with the fourth aspect, in some possible implementations of the fourth aspect, a processing module is also included, which is used to establish short-range communication with the first terminal; the communication module is also used to send an authorization result for accessing data to the first terminal based on the short-range communication, and the authorization result includes: approval of authorization or refusal of authorization; and the key is sent when the authorization result is approval of authorization.
[0036] In combination with the fourth aspect, in some possible implementations of the fourth aspect, the processing module is further used to, when the authorization result is approval of the authorization, monitor the distance to the first terminal based on short-range communication.
[0037] In combination with the fourth aspect, in some possible implementations of the fourth aspect, the communication technology used to establish short-range communication is Bluetooth, and the processing module is used to monitor the signal strength of the signal from the first terminal based on short-range communication; and obtain the distance to the first terminal based on the signal strength.
[0038] In combination with the fourth aspect, in some possible implementations of the fourth aspect, the processing module is further configured to, in response to an operation in which the user agrees to the authorization, agree to the authorization.
[0039] In a fifth aspect, the present application provides a terminal comprising a memory and a processor, wherein the memory is used to store a computer program; the processor is used to call and execute the computer program to implement the data protection method described in the above-mentioned first aspect or second aspect and any possible implementation method of the first aspect or second aspect.
[0040] In a sixth aspect, the present application provides a computer-readable storage medium, comprising a computer program, which, when executed on a computer, enables the computer to implement the method in the first aspect or the second aspect and any possible implementation manner of the first aspect or the second aspect.
[0041] In the seventh aspect, the present application provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute the method in the first aspect or the second aspect and any possible implementation of the first aspect or the second aspect.
[0042] It should be understood that the technical solutions of the second to seventh aspects correspond to the first aspect, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0044] Figure 2 is a schematic diagram of a data protection method provided in an embodiment of the present application;
[0045] Figure 3 is a schematic diagram of a user interface for a first terminal requesting to establish short-range communication provided in an embodiment of the present application;
[0046] Figure 4 It is a schematic diagram of a user interface for a first terminal and a second terminal to establish short-range communication provided by an embodiment of the present application;
[0047] Figure 5 This is a schematic diagram of a user interface in which a second terminal authorizes a first terminal to decrypt data provided by an embodiment of the present application;
[0048] Figure 6 This is a schematic diagram of a user interface for a second user to agree to authorization and set a distance threshold value provided in an embodiment of the present application;
[0049] Figures 7 to 9 is a schematic diagram of a scenario in which the first terminal can destroy the key and stop displaying data;
[0050] Fig.10 is a system architecture diagram of a terminal provided in this embodiment;
[0051] Fig.11 It is a functional timing diagram of the data protection method provided in the embodiment of the present application applicable to static data;
[0052] Fig.12 It is a functional timing diagram of the data protection method provided in the embodiment of the present application applicable to stream data;
[0053] Fig.13 It is a schematic diagram of a possible implementation method for establishing short-distance communication and authorization for streaming data provided in an embodiment of the present application;
[0054] Fig.14 is a schematic block diagram of a first terminal provided in an embodiment of the present application;
[0055] Fig.15 is a schematic block diagram of a second terminal provided in an embodiment of the present application;
[0056] Fig.16 It is a schematic block diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0058] In the embodiments of the present application, the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In addition, the term "includes" and any variations thereof are intended to cover non-exclusive inclusions.
[0059] Figure 1 It is a schematic diagram of the structure of the terminal provided in the embodiment of the present application.
[0060] Figure 1 The terminal 100 shown may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0061] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal 100. In other embodiments of the present application, the terminal 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0062] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0063] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0064] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0065] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0066] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the terminal 100. While the charging management module 140 is charging the battery 142, it may also power the terminal through the power management module 141.
[0067] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0068] The wireless communication function of the terminal 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0069] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0070] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on the terminal 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0071] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0072] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), ultra wide band (UWB), infrared technology (IR), etc., which are applied to the terminal 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0073] In some embodiments, the antenna 1 of the terminal 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, UWB, FM, and / or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0074] The terminal 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0075] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0076] The terminal 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
[0077] The external memory interface 120 can be used to connect an external memory card to expand the storage capacity of the terminal 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0078] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the terminal 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0079] The terminal 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
[0080] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0081] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0082] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.
[0083] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by putting his mouth close to microphone 170C to input the sound signal into microphone 170C. Terminal 100 may be provided with at least one microphone 170C. In other embodiments, terminal 100 may be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, terminal 100 may also be provided with three, four or more microphones 170C to realize collection of sound signals, noise reduction, identification of sound source, realization of directional recording function, etc.
[0084] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0085] The distance sensor 180F is used to measure the distance. The terminal 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0086] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0087] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal 100 may receive key input and generate key signal input related to user settings and function control of the terminal 100.
[0088] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0089] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0090] The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the terminal 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal 100 interacts with the network through the SIM card to realize functions such as calls and data communications. In some embodiments, the terminal 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal 100 and cannot be separated from the terminal 100.
[0091] In the embodiment of the present application, the terminal requesting to decrypt data is called the first terminal, and the terminal that can authorize other devices to decrypt data is called the second terminal; the user operating the first terminal is the first user, and the user operating the second terminal is the second user.
[0092] In daily life, for the security of data, the second user can encrypt the data. The most common way is that the second user encrypts the data with a key and then sends the key to the first user, who can then use the key to decrypt the data.
[0093] The problem with using a key to encrypt data is that the second user cannot verify the identity of the user using the key. Once the key is leaked, other people who obtain the key can also use the key to decrypt and access the encrypted data. Therefore, the current method of using keys to encrypt data may cause abuse and loss of access rights, affecting data security.
[0094] In view of this, the present application provides a data protection method, when a first terminal attempts to access data, it obtains authorization and a key from a second terminal, and decrypts the data within a certain distance range around the second terminal. Once the first terminal leaves the distance range set by the second terminal, it can no longer maintain decryption and access to the data, thereby improving data security.
[0095] Figure 2 200 can be performed by a first terminal and a second terminal. The first terminal and the second terminal can be terminals such as smart phones, tablet computers, or laptop computers, or can be components in the terminals, such as chips, chip systems, or other modules that can be used to implement some or all of their functions, which is not limited in this application.
[0096] When the first user tries to open the encrypted data on the first terminal, the first terminal cannot directly display the data because the data is encrypted and the first terminal does not have the authority to decrypt the data. The first terminal can seek authorization from the second terminal. Before seeking authorization, the first terminal can first establish short-distance communication with the second terminal. The communication technology used to establish short-distance communication can be UWB or Bluetooth; the way to establish short-distance communication can be to send a third message to the second terminal through NFC or displaying a QR code, and the third message is used to request to establish short-distance communication with the second terminal.
[0097] The applicable distance of UWB and Bluetooth communication technologies is about 10 meters, and compared with communication technologies such as WLAN, they are more sensitive to distance and are more conducive to monitoring distance.
[0098] like Figure 3As shown in (a) of FIG. 1 , the first user attempts to open the data on the first terminal. Since the data is encrypted, the first terminal cannot directly display the data. Figure 3 As shown in (b), the first terminal sends the third message to the second terminal through NFC or displaying a QR code.
[0099] like Figure 4 As shown in (a) in FIG. 1 , the second terminal scans the QR code displayed on the first terminal, receives the third message, and establishes short-distance communication; Figure 4 As shown in (b), the second terminal receives the third message from the first terminal via NFC and establishes short-distance communication.
[0100] It should be understood that Figure 3 The user interface shown in Figure 4 The user interface shown in is only an example and is not limited in this application.
[0101] After the short-range communication is established, the first terminal and the second terminal may communicate messages to each other based on the short-range communication.
[0102] Figure 2 The method 200 shown may include steps 201 to 203 , and each step in the method 200 is described in detail below.
[0103] In step 201, a first terminal sends a first message to a second terminal.
[0104] The first message is used to request the second terminal to authorize the first terminal to decrypt data. The first message may carry attribute information of the data that the first terminal wants to decrypt, and the attribute information includes the name of the data.
[0105] The second terminal locally stores a list of data with permission to decrypt, and the list records the attribute information of the data. After receiving the first message from the first terminal, the second terminal can query in the locally stored list whether the second terminal has the permission to authorize the first terminal to decrypt the data based on the attribute information of the data.
[0106] If the second terminal does not have the authority to authorize the first terminal to decrypt the data, the second terminal can end the short-distance communication with the first terminal; if the second terminal has the authority to authorize the first terminal to decrypt the data, the second terminal can ask the second user for the authorization result on the user interface, that is, ask the second user whether to agree to authorize the first terminal to decrypt the data, and the authorization result may include agreeing to the authorization or rejecting the authorization. After the second user selects the authorization result, the first terminal can obtain the authorization result based on the short-distance communication.
[0107] It should be understood that in actual use, the time from establishing short-distance communication to the second terminal querying whether it has the authority to authorize the first terminal to decrypt the data is very short and the user can hardly perceive it. Figure 5 shown.
[0108] like Figure 5 As shown in (a) in FIG. 1 , the second terminal scans the QR code on the first terminal, and then the second terminal asks the second user on the interface whether to agree to authorize the first terminal to decrypt the data; Figure 5 As shown in (b), after the first terminal and the second terminal are "touched" by NFC, the second terminal asks the second user on the interface whether to agree to authorize the first terminal to decrypt the data.
[0109] In response to the second user agreeing to the authorization operation, the second terminal can inform the first terminal based on short-distance communication that the authorization result is approval authorization. In addition, the second user can set a distance threshold value, and then the second terminal sends the distance threshold value and the key to the first terminal.
[0110] like Figure 6 As shown in (a) of FIG. 1 , the second user chooses to agree to authorize the first terminal to decrypt the data; Figure 6 As shown in (b) in FIG. 1 , the second user sets a distance threshold on the second terminal.
[0111] If the second user refuses to authorize the first terminal to decrypt the data, the second terminal may inform the first terminal based on short-distance communication that the authorization result is authorization refusal, and then terminate the short-distance communication with the first terminal.
[0112] In step 202, the second terminal sends the distance threshold value and the key to the first terminal.
[0113] In the case where the second terminal agrees to the authorization, both the first terminal and the second terminal can monitor the distance between the two terminals based on the short-range communication.
[0114] The communication technology used to establish the short-distance communication may be UWB, for example. The first terminal and the second terminal may monitor the distance based on UWB using a time of flight (ToF) method, that is, the distance is monitored by monitoring the time interval t between the transmission and reception of the UWB signal.
[0115] The relationship between distance r and time interval t is r = t × c, where c is the speed of light.
[0116] The communication technology used to establish the short-distance communication may also be Bluetooth. The first terminal and the second terminal may monitor the distance based on Bluetooth by monitoring the signal strength of the Bluetooth signal from the other party and then calculating the distance based on the signal strength of the Bluetooth signal.
[0117] The signal strength can be a received signal strength indication (RSSI), which is expressed in decibel relative to one milliwatt (dBm). The relationship between the distance r and the RSSI is RSSI = A-10n×lg(r). A is the signal strength when the signal is transmitted 1 meter away. For a known terminal device, A is a constant value; n is a propagation factor, which is related to the environment in which the signal propagates. In the environment of daily use, n can also be regarded as a constant value; lg represents the logarithm with a base of 10.
[0118] The first terminal and the second terminal may compare the distances monitored by each terminal with the distance threshold value, so as to determine whether the distance between the two terminals is greater than the distance threshold value.
[0119] In step 203, the first terminal decrypts data based on the key while maintaining short-distance communication with the second terminal and the distance between the first terminal and the second terminal is less than or equal to the distance threshold.
[0120] After decrypting the data, the first user can view the data on the first terminal.
[0121] It should be understood that the first terminal can decrypt and display the data only when it has the key. Once the key on the first terminal is destroyed, the first terminal can no longer display the data.
[0122] In the following three situations, the first terminal can destroy the key and stop displaying the data.
[0123] The first case is that the short-distance communication between the first terminal and the second terminal is disconnected.
[0124] like Figure 7 As shown, the short-distance communication between the first terminal and the second terminal is disconnected. When the short-distance communication between the first terminal and the second terminal is disconnected, the first terminal can actively destroy the key.
[0125] The second situation is that the distance between the first terminal and the second terminal is greater than the distance threshold.
[0126] like Figure 8 As shown, the distance between the first terminal and the second terminal is greater than the distance threshold.
[0127] Since the first terminal and the second terminal may have errors in monitoring the distance, it may happen that the distance monitored by one terminal is greater than the distance threshold value while the distance monitored by the other terminal is not greater than the distance threshold value. In order to improve the security of data, as long as one of the terminals monitors a distance greater than the distance threshold value, the first terminal will destroy the key and stop displaying the data.
[0128] When the distance monitored by the first terminal is greater than the distance threshold, the first terminal can actively destroy the key and stop displaying the data; when the distance monitored by the second terminal is greater than the distance threshold, the second terminal can send a second message to the first terminal, and the second message is used to inform the first terminal to cancel the authorization. After receiving the second message, the first terminal destroys the key and stops displaying the data.
[0129] The third situation is that the second user chooses to cancel the authorization.
[0130] like Fig. 9 As shown, the second user clicks and selects "Cancel Authorization" on the second terminal. When the second user chooses to cancel authorization, the second terminal can send a second message to the first terminal. After receiving the second message, the first terminal destroys the key and stops displaying the data.
[0131] Fig.10 is a system architecture diagram of the terminal provided in this embodiment. Fig.10 As shown, the terminal may include an encrypted data storage system, an encrypted data management system, a data decryption server, and a short-range communication module.
[0132] The encrypted data storage system can be used to store encrypted data. The encrypted data management system can be used to manage the access rights of encrypted data. The data decryption server includes an authorization management module, a distance monitoring module and a key management module; the authorization management module can be used to apply for or manage decryption authorization; the distance monitoring module can be used to monitor the distance between terminals; the key management module can be used to generate or destroy keys. The short-distance communication module can be used to establish short-distance communication.
[0133] The data protection method provided in the embodiment of the present application can be used to protect data including static data and streaming data. Among them, static data refers to data that has been stored in the form of a file on the first terminal in advance. Static data can be, for example, text, pictures, etc.; streaming data refers to data that has not been stored in advance on the first terminal. When the second terminal sends the streaming data to the first terminal, the first terminal decrypts the streaming data in real time. Streaming data can be, for example, real-time video, real-time audio, etc.
[0134] Fig.11 The data protection method provided in the embodiment of the present application is applicable to the functional timing diagram of static data. Fig.11Provide explanation.
[0135] The encrypted data storage system of the first terminal attempts to access the encrypted data, but the data is locked from access.
[0136] The encrypted data management system of the first terminal needs to obtain access rights.
[0137] The authorization management module of the first terminal triggers the access permission request and starts to request the access permission. Since the short-distance communication has not been established at this time, a third message is sent to the second terminal through NFC or displaying a QR code to request to establish the short-distance communication.
[0138] The short-distance communication module of the second terminal receives the third message and establishes short-distance communication.
[0139] After establishing the short-range communication, the authorization management module of the first terminal sends a first message to the second terminal to request authorization.
[0140] The authorization management module of the second terminal receives the first message, and determines whether the second terminal has the authority to authorize the first terminal to decrypt the data based on the attribute information of the data carried in the first message.
[0141] If there is no permission, the second terminal can end the short-range communication; if there is permission, it is determined whether the second user agrees to the authorization.
[0142] If the second user does not agree to the authorization, the second terminal can end the short-distance communication; if the second user agrees to the authorization, the distance threshold value is set and the key management module generates a key.
[0143] After the distance threshold value is set and the key is generated, the distance threshold value and the key are sent to the first terminal through short-distance communication.
[0144] The first terminal receives the distance threshold value and the key through short-distance communication.
[0145] The encrypted data management system of the first terminal determines whether there is a key. Since the first terminal has received the key at this time, the determination result is: there is a key.
[0146] The encrypted data storage system of the first terminal can decrypt and display the data based on the key.
[0147] The distance monitoring modules of the first terminal and the second terminal continuously monitor whether the distance between the two terminals is greater than a distance threshold value.
[0148] If the distance is not greater than the distance threshold, the data continues to be decrypted and displayed; if the distance is greater than the distance threshold, the authorization management module of the second terminal terminates the authorization, sends a second message to the first terminal, and then ends the short-distance communication; the key management module of the first terminal can destroy the key when the distance monitoring module determines that the distance is greater than the distance threshold, the second terminal terminates the authorization, or the short-distance communication ends, and then the encrypted data management system of the first terminal determines whether there is a key. Since the key has been destroyed at this time, the judgment result is: there is no key, and the data in the encrypted data storage system of the first terminal is locked from access.
[0149] Fig.12 The data protection method provided in the embodiment of the present application is applicable to the functional timing diagram of the stream data. Fig.12 Provide explanation.
[0150] The first terminal establishes short-distance communication with the second terminal. Here, the first terminal may request to establish short-distance communication, or the second terminal may request to establish short-distance communication, which is not limited in the present application.
[0151] After the short-distance communication is established, the second terminal authorization management module determines whether the second user agrees to the authorization.
[0152] A possible implementation method for establishing short-range communication and authorization is as follows Fig.13 As shown. Fig.13 In (a), the second user can choose to cast the screen during the video conference. Fig.13 In (b) of FIG. 1 , the second terminal performs an NFC “touch and click” operation with the first terminal, and establishes short-distance communication through an NFC request. Fig.13 In (c), after establishing short-range communication, the second terminal asks the second user whether he agrees to authorize screen projection.
[0153] If the second user does not agree to the authorization, the second terminal can end the short-distance communication; if the second user agrees to the authorization, the distance threshold value is set and the key management module generates a key.
[0154] After the distance threshold is set and the key is generated, the distance threshold, the key and the stream data are sent to the first terminal.
[0155] It should be understood that due to the limited transmission speed of short-range communications such as Bluetooth and UWB, the communication method based on which the second terminal sends the stream data to the first terminal is not limited to short-range communication, but may also be other communications established between the first terminal and the second terminal, such as WLAN, etc. This application does not limit this.
[0156] The data decryption service end of the first terminal receives the distance threshold value, the key and the stream data.
[0157] The encrypted data management system of the first terminal determines whether there is a key. Since the first terminal has received the key at this time, the determination result is: there is a key.
[0158] The encrypted data storage system of the first terminal can decrypt and display the data based on the key.
[0159] The distance monitoring modules of the first terminal and the second terminal continuously monitor whether the distance between the two terminals is greater than a distance threshold value.
[0160] If the distance is not greater than the distance threshold, the data continues to be decrypted and displayed; if the distance is greater than the distance threshold, the authorization management module of the second terminal terminates the authorization, sends a second message to the first terminal, and then ends the short-distance communication; the key management module of the first terminal can destroy the key when the distance monitoring module determines that the distance is greater than the distance threshold, the second terminal terminates the authorization, or the short-distance communication ends, and then the encrypted data management system of the first terminal determines whether there is a key. Since the key has been destroyed at this time, the judgment result is: there is no key, and the encrypted data storage system encrypts the previously received stream data.
[0161] Based on the above method, when the first terminal attempts to access data, it obtains the authorization and key of the second terminal and decrypts the data within a certain distance range around the second terminal. Once the first terminal leaves the distance range set by the second terminal, it can no longer maintain decryption and access to the data, thereby improving data security.
[0162] Fig.14 is a schematic block diagram of a first terminal provided in an embodiment of the present application. Fig.14 As shown, the first terminal 1400 may include a communication module 1410 and a processing module 1420 .
[0163] Among them, the communication module 1410 can be used to send a first message to the second terminal, where the first message is used to request authorization for the first terminal to access data; receive a distance threshold value and a key for decrypting data from the second terminal; and the processing module 1420 can be used to decrypt data based on the key while maintaining short-distance communication with the second terminal and the distance to the second terminal is less than or equal to the distance threshold value.
[0164] Optionally, the processing module 1420 can also be used to destroy the key when the short-distance communication with the second terminal is disconnected, or when the distance with the second terminal is greater than a distance threshold, or when a second message is received from the second terminal, where the second message is used to notify that the authorization is revoked.
[0165] Optionally, the communication module 1410 may also be used to send a third message to the second terminal by means of NFC or displaying a QR code, where the third message is used to request to establish short-range communication with the second terminal.
[0166] Optionally, the processing module 1420 may also be used to establish short-distance communication with the second terminal; the communication module 1410 may also be used to obtain, based on the short-distance communication, an authorization result of the second terminal for accessing data of the first terminal, the authorization result including: approval of authorization or rejection of authorization; and the key is received when the authorization result is approval of authorization.
[0167] Optionally, the processing module 1420 may also be configured to, when the authorization result is approval of the authorization, monitor the distance to the second terminal based on the short-range communication.
[0168] Optionally, the communication technology used to establish short-range communication is Bluetooth, and the communication module 1410 can be used to monitor the signal strength of the signal from the second terminal based on short-range communication; the processing module 1420 can be used to obtain the distance to the second terminal based on the signal strength.
[0169] Fig.15 is a schematic block diagram of a second terminal provided in an embodiment of the present application. Fig.15 As shown, the second terminal 1500 may include a communication module 1510 .
[0170] The communication module 1510 may be configured to receive a first message from a first terminal, the first message being used to request authorization for the first terminal to access data; and, if authorization is granted, to send a distance threshold value and a key for decrypting data to the first terminal.
[0171] Optionally, the communication module 1510 may also be configured to send a second message to the first terminal when the distance to the first terminal is greater than a distance threshold or when the user cancels authorization, wherein the second message is used to notify that the authorization is cancelled.
[0172] Optionally, the communication module 1510 may also be used to receive a third message from the first terminal through NFC or scanning a QR code, where the third message is used to request to establish short-range communication.
[0173] Optionally, the second terminal 1500 may also include a processing module 1520, which can be used to establish short-range communication with the first terminal; the communication module 1510 can also be used to send an authorization result for accessing data to the first terminal based on short-range communication, the authorization result including: approval of authorization or rejection of authorization; and the key is sent when the authorization result is approval of authorization.
[0174] Optionally, the processing module 1520 may also be configured to, when the authorization result is approval of the authorization, monitor the distance to the first terminal based on short-range communication.
[0175] Optionally, the communication technology used to establish short-range communication is Bluetooth, and the processing module 1520 can be used to monitor the signal strength of the signal from the first terminal based on the short-range communication; and obtain the distance to the first terminal based on the signal strength.
[0176] Optionally, the processing module 1520 may also be configured to, in response to a user consenting to the authorization operation, consent to the authorization.
[0177] Fig.16 is a schematic block diagram of a terminal provided in an embodiment of the present application, and the terminal may be the first terminal or the second terminal in the above embodiment. Fig.16 As shown, the terminal 1600 may include at least one processor 1610, which may be used to implement the functions of the first terminal or the second terminal in the above embodiment. Please refer to the detailed description in the above embodiment for details, which will not be repeated here.
[0178] The terminal 1600 may also include a memory 1620 for storing program instructions and / or data. The memory 1620 is coupled to the processor 1610. The coupling in this application is an indirect coupling or communication connection between devices, units or modules, which may be electrical, mechanical or other forms, for information exchange between devices, units or modules. The processor 1610 may operate in conjunction with the memory 1620. The processor 1610 may execute program instructions stored in the memory 1620. At least one of the at least one memory may be included in the processor.
[0179] The terminal 1600 may also include a communication interface 1630, which is used to communicate with other devices through a transmission medium, so that the device in the terminal 1600 can communicate with other devices. The communication interface 1630 may be, for example, a transceiver, an interface, a bus, a circuit, or a device capable of implementing a transceiver function. The processor 1610 may use the communication interface 1630 to send and receive data and / or information, and to implement Figure 2 The data protection method described in the corresponding embodiment.
[0180] The specific connection medium between the processor 1610, the memory 1620 and the communication interface 1630 is not limited in this application. Fig.16 The processor 1610, the memory 1620 and the communication interface 1630 are connected via a bus 1640. The bus 1640 is connected to the Fig.16The connections between the other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.16 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0181] In the embodiments of the present application, the processor may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0182] According to the method provided by the present application, the present application also provides a computer-readable storage medium, which stores a program code. When the program code runs on a computer, the computer executes the data protection method described in the above embodiment.
[0183] According to the method provided by the present application, the present application also provides a computer program product, the computer program product comprising: computer program code. When the computer program code is run on a computer, the computer executes the data protection method described in the above embodiment.
[0184] The technical solution provided in this application can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a terminal device or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center through a wired, such as coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (such as infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium such as a digital video disc (DVD), or a semiconductor medium, etc.
[0185] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A data protection method, characterized in that: Applied to a first terminal, the method includes: Sending a first message to a second terminal, where the first message is used to request authorization for the first terminal to access data; receiving a distance threshold value and a key for decrypting the data from the second terminal; When short-distance communication is maintained with the second terminal and the distance with the second terminal is less than or equal to the distance threshold, the data is decrypted based on the key.
2. The method according to claim 1, characterized in that The method further comprises: The key is destroyed when the short-distance communication with the second terminal is disconnected, or when the distance with the second terminal is greater than the distance threshold, or when a second message is received from the second terminal, where the second message is used to notify that the authorization is revoked.
3. The method according to claim 1 or 2, characterized in that Before sending the first message to the second terminal, the method further includes: A third message is sent to the second terminal by means of near field communication NFC or displaying a QR code, where the third message is used to request to establish the short-distance communication with the second terminal.
4. The method according to claim 3, characterized in that After sending the third message to the second terminal, the method further includes: establishing the short-range communication with the second terminal; Based on the short-range communication, obtaining an authorization result of the second terminal for the first terminal to access the data, the authorization result including: approval of authorization or rejection of authorization; and The key is received when the authorization result is approval of the authorization.
5. The method according to claim 4, characterized in that The method further comprises: When the authorization result is approval of the authorization, the distance to the second terminal is monitored based on the short-range communication.
6. The method according to claim 5, characterized in that The communication technology used to establish the short-distance communication is Bluetooth, and the monitoring of the distance to the second terminal based on the short-distance communication includes: Based on the short-range communication, monitoring a signal strength of a signal from the second terminal; Based on the signal strength, the distance to the second terminal is obtained.
7. A data protection method, characterized in that: Applied to the second terminal, the method includes: receiving a first message from a first terminal, wherein the first message is used to request authorization for the first terminal to access data; In the case of agreeing to the authorization, a distance threshold value and a key for decrypting the data are sent to the first terminal.
8. The method according to claim 7, characterized in that The method further comprises: When the distance to the first terminal is greater than the distance threshold, or when the user cancels the authorization, a second message is sent to the first terminal, where the second message is used to notify that the authorization is cancelled.
9. The method according to claim 7 or 8, characterized in that Before receiving the first message from the first terminal, the method further includes: A third message is received from the first terminal through near field communication NFC or scanning a QR code, where the third message is used to request to establish short-range communication.
10. The method according to claim 9, characterized in that After receiving the third message from the first terminal, the method further includes: establishing the short-range communication with the first terminal; Based on the short-range communication, sending an authorization result for accessing the data to the first terminal, the authorization result including: approval of authorization or rejection of authorization; and The key is sent when the authorization result is approval of the authorization.
11. The method according to claim 10, characterized in that The method further comprises: When the authorization result is approval of the authorization, the distance to the first terminal is monitored based on the short-range communication.
12. The method according to claim 11, characterized in that The communication technology used to establish the short-distance communication is Bluetooth, and the monitoring of the distance to the first terminal based on the short-distance communication includes: Based on the short-range communication, monitoring a signal strength of a signal from the first terminal; Based on the signal strength, the distance to the first terminal is obtained.
13. The method according to any one of claims 7 to 12, characterized in that The method further comprises: In response to the user's operation of agreeing to the authorization, the authorization is agreed.
14. A terminal, characterized in that: The method comprises a module for implementing the method according to any one of claims 1 to 6, or a module for implementing the method according to any one of claims 7 to 13.
15. A terminal, characterized in that: comprising a memory and a processor, wherein: The memory is used to store computer programs; The processor is configured to call and execute the computer program so that the method according to any one of claims 1 to 6 or the method according to any one of claims 7 to 13 is executed.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 or the method according to any one of claims 7 to 13 is implemented.
17. A computer program product, characterized in that The invention comprises a computer program, which, when being executed, implements the method according to any one of claims 1 to 6 or the method according to any one of claims 7 to 13.
