A transaction method and terminal for secure business
By setting the first card list in the terminal and realizing the automatic card switching activation state, the problem of inability to trade after the terminal is shut down is solved, and the transaction needs of multiple services are available after the terminal is shut down is realized, and the security and success rate of transactions are improved.
Patent Information
- Application Number
- CN202410365825.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-03-09
- Filing Date
- 2022-08-18
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-08-18
AI Technical Summary
The prior art cannot support transactions of multiple services after the terminal is shut down, and cannot meet users' transaction needs in the terminal-closed airport scenario.
By setting the first card list in the terminal, including card information that can still be traded when the terminal is powered off or when the battery is low, the card automatic switching and activation state is realized to ensure that transactions can still be conducted after shutdown.
It realizes the security service that can still switch to support transactions after the terminal is shut down, meets users' transaction needs in the terminal-to-air airport scenario, and improves the security and success rate of transactions.
Smart Images

Figure CN118536117B_ABST
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on March 9, 2022, with application number 202210223921.9 and application name “A method for making multiple services available after shutdown”, the entire contents of which are incorporated by reference in this application. Technical Field
[0002] The present application relates to the field of terminals, and in particular to a transaction method and terminal for secure services. Background Art
[0003] At present, terminals such as mobile phones and watches include three layers of application environments, namely Rich Execution Environment (REE), Trusted Execution Environment (TEE) and Secure Element (SE). The terminal deploys corresponding applications in the three layers of application environments according to the security level of different data in security services (such as bank cards, transportation cards, car keys, etc.). In other words, a security service may have corresponding applications in REE, TEE and SE.
[0004] After the terminal is shut down, all security services of the terminal cannot be traded, or only one default security service in the terminal can be traded. It can be seen that the existing technical solutions cannot meet the transaction needs of users in the terminal shutdown scenario. Summary of the invention
[0005] The present application provides a transaction method and terminal for a security service, which can realize switching to a security service supporting transactions after the terminal is shut down, thereby meeting the transaction needs of users in a terminal shutdown scenario.
[0006] In order to achieve the above objectives, the embodiments of the present application provide the following technical solutions:
[0007] In a first aspect, a card switching method is provided, which is applied to a terminal, wherein the terminal includes a first card list, and the first card list includes information of cards that are set to support transactions when the terminal is powered off or when the power of the terminal is less than a preset threshold; the method includes: when the terminal is powered on or when the power of the terminal is equal to or greater than the preset threshold, the first card in the terminal is in an inactive state; after the terminal detects a shutdown event or the power of the terminal is less than the preset threshold, when the terminal determines that the first card is included in the first card list, the first card is switched to an active state. In this way, the first card of the first terminal can conduct transactions with a card reading device. The number of the first card is one or more.
[0008] The first card list includes cards that the user hopes to trade with after the terminal is turned off or the terminal power is less than a preset threshold. The first card list includes the first card, indicating that the user hopes that the first card can still be used for trading after the terminal is turned off or the terminal power is less than a preset threshold.
[0009] In the prior art, when the terminal is shut down, all cards are in an inactive state, or the state of the cards that were in an active state before the terminal is shut down is retained by default. It can be seen that the prior art cannot meet the transaction needs of users after the terminal is shut down. However, in the present application, by setting the first card list, after the terminal is shut down, the cards that were in an inactive state before the terminal is shut down are automatically switched to an active state, and the first card can continue to trade after the terminal is shut down, thereby meeting the transaction needs of users after the terminal is shut down.
[0010] In one possible implementation, the terminal also includes a second card; when the terminal is in a powered-on state or the battery level of the terminal is equal to or greater than a preset threshold, the second card is in an activated state; after the terminal detects a shutdown event or the battery level of the terminal is less than a preset threshold, and before the terminal switches the first card to an activated state, the method also includes: the terminal switches the second card to an inactivated state, and the first card list does not include the second card.
[0011] The first card list does not include the second card, which means that the user hopes that the second card cannot be used for transactions after the terminal is turned off or the terminal power is less than a preset threshold. For example, the second card is a high-security service (such as an access card to enter a secure area, or an electronic certificate containing sensitive information, etc.). Then, before the terminal is turned off, the second card can be automatically switched to an inactive state.
[0012] On the one hand, if the second card is a high-security business (such as an access card to enter a secure area, or an electronic certificate containing sensitive information, etc.), then transactions can be performed after the power is turned off, which poses a security risk. Alternatively, if the second card is a card that requires user authentication, then after the power is turned off, the REE module and TEE module of the terminal do not work, and user authentication cannot be performed, and the second card is also unavailable after the power is turned off. On the other hand, if the second card conflicts with the contactless parameters of the first card that needs to be activated later, then the subsequent activation of the first card may result in activation failure. Therefore, deactivating the second card in the embodiment of the present application is beneficial to ensuring the transaction security of the second card, and is also beneficial to improving the success rate of transactions after the first card is turned off.
[0013] In one possible implementation, the terminal also includes a second card list, the second card list includes information of cards that are set to support transactions in a preset mode when the terminal is powered off or the battery level of the terminal is less than a preset threshold, and the second card list includes the first card; after the terminal detects a shutdown event or the battery level of the terminal is less than a preset threshold, and before the terminal switches the first card to an activated state, the method also includes: the terminal switches the operating mode of the first card to the preset mode.
[0014] That is to say, the terminal may also include some cards with two or more working modes. The terminal may control such cards to be in different working modes when the terminal is turned on and off, so as to meet different transaction needs of users. Here, taking the first card as an example, before the terminal automatically switches the first card to the activated state, after the terminal determines that the first card is included in the second card list, the working mode of the first card is switched to the preset mode, and then the first card is activated. It is understandable that before activating the first card, switching the working mode of the first card to the preset mode is conducive to ensuring the transaction security of the first card.
[0015] In one possible implementation, the terminal also includes a third card; when the terminal is in a powered-on state or the battery level of the terminal is equal to or greater than a preset threshold, the third card is in an activated state; the method also includes: after the terminal detects a shutdown event or the battery level of the terminal is less than a preset threshold, the terminal switches the working mode of the third card to a preset mode, and the second card list includes the third card.
[0016] That is to say, the third card in the second card list is already in an activated state when the power is turned on or the battery level of the terminal is greater than or equal to the preset threshold. Then, after detecting a shutdown event or the battery level of the terminal is less than the preset threshold, the working mode of the third card in the second card list can be directly switched to the preset mode.
[0017] In a possible implementation, the card set in the second card list is a subset of the card set in the first card list. The first card list and the second card list may be two independent tables, and the first card list includes information about cards that can be traded after shutdown. The second card list includes information about cards that need to be in a preset mode after shutdown. It is understandable that the cards in the first card list include cards in the second card list. Of course, the first card list and the second card list may also be the same table, which includes all cards that can be traded after shutdown (i.e., the first card list), and marks the cards that need to work in a preset mode after shutdown (i.e., marks the cards in the second card list). The embodiment of the present application does not limit the form of the first card list and the second card list.
[0018] In a possible implementation, after the terminal switches the first card to an activated state, the method further includes: after the terminal detects a power-on event or the battery level of the terminal is equal to or greater than a preset threshold, the terminal switches the first card to an inactivated state.
[0019] It can be seen that when the terminal is turned on again, each card (such as the first card) is restored to the state before the shutdown, which retains the user's operating habits when the terminal is turned on and avoids confusion in use by the user.
[0020] In a possible implementation, the method further includes: the terminal stores a first state of the first card, the first state being the state of the first card when the terminal is in a power-on state or when the power of the terminal is equal to or greater than a preset threshold; after the terminal detects a power-on event or the power of the terminal is equal to or greater than the preset threshold, the terminal switches the first card to an inactive state, including: after the terminal detects a power-on event or the power of the terminal is equal to or greater than the preset threshold, the terminal also obtains a second state of the first card, the second state being the state of the first card when the terminal is in a power-off state or when the power of the terminal is less than a preset threshold; when the first state of the first card is an inactive state and the second state of the first card is an active state, the terminal switches the first card to an inactive state. Thus, a method for restoring the states of each card after the terminal is powered on again is provided.
[0021] In a possible implementation, after the terminal switches the second card to an inactive state, the method further includes: after the terminal detects a power-on event or the battery level of the terminal is equal to or greater than a preset threshold, the terminal switches the second card to an active state.
[0022] In a possible implementation, after the terminal switches the working mode of the first card to the preset mode, the method further includes: after the terminal detects a power-on event or the battery level of the terminal is equal to or greater than a preset threshold, the terminal switches the first card to a non-preset mode.
[0023] In a possible implementation, after the terminal switches the working mode of the third card to the preset mode, the method further includes: after the terminal detects a power-on event or the power of the terminal is equal to or greater than a preset threshold, the terminal switches the third card to a non-preset mode.
[0024] In a possible implementation, after the terminal detects a shutdown event or the terminal's battery level is less than a preset threshold, before the terminal switches the first card to an activated state, the method further includes: the terminal receives a first operation from the user, and the terminal determines a first card list based on the first operation.
[0025] That is, the user's first operation is used to set the first card list. Generally, cards with low security requirements in the terminal and that do not require user authentication can be set by the user to allow transactions after the terminal is turned off. For example, various types of transportation cards, access cards (or, specifically, access cards for general areas), keys (for example, car keys), etc.
[0026] In a possible implementation, the method further includes: the terminal receiving a second operation of the user, and the terminal determining a second card list according to the first card list and the second operation.
[0027] That is to say, the second operation of the user is used to set the second card list. Of course, the terminal can also automatically determine the second card list according to the nature of the card (whether it has multiple working modes), the security of the transaction, etc.
[0028] In one possible implementation, the terminal includes a near field communication NFC module; after the terminal detects a shutdown event or the terminal's battery level is less than a preset threshold, the terminal switches the first card to an activated state, the method also includes: after the terminal is shut down or the terminal's battery level is less than a preset threshold, the terminal receives an instruction from a card reader device to select the first card through the NFC module; in response to the instruction to select the first card, the first card in the terminal executes a transaction with the card reader device.
[0029] In a second aspect, a terminal is provided, comprising: a processor, a memory, a near field communication NFC module and a touch screen, wherein the memory, the touch screen, the NFC module are coupled to the processor, the processor comprises a security element SE module, the memory is used to store computer program code, the computer program code comprises computer instructions, and when the processor reads the computer instructions from the memory, the terminal executes the method in the above aspect and any possible implementation thereof.
[0030] In the third aspect, a device is provided, which is included in a terminal, and the device has the function of implementing the terminal behavior in any of the above aspects and possible implementation methods. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes at least one module or unit corresponding to the above function. For example, a receiving module or unit, a display module or unit, and a processing module or unit, etc.
[0031] In a fourth aspect, a computer-readable storage medium is provided, comprising computer instructions. When the computer instructions are executed on a terminal, the terminal executes a method as in the above aspect and any possible implementation thereof.
[0032] In a fifth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer is enabled to execute the method in the above aspects and any possible implementation thereof.
[0033] In a sixth aspect, a chip system is provided, comprising a processor. When the processor executes instructions, the processor executes a method as in the above aspects and any possible implementation thereof.
[0034] For the technical effects that can be achieved by the terminal provided in the second aspect, the device provided in the third aspect, the computer-readable storage medium provided in the fourth aspect, the computer program product provided in the fifth aspect, and the chip system provided in the sixth aspect, please refer to the description of the technical effects in the first aspect and any possible implementation method of the first aspect, and they will not be explained here. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0036] Figure 2 A schematic diagram of the structure of another terminal provided in an embodiment of the present application;
[0037] Figure 3 A flowchart of a method for setting a card transaction after powering off provided in an embodiment of the present application;
[0038] Figure 4 Schematic diagram of user interfaces of some terminals provided in embodiments of the present application;
[0039] Figure 5 A flowchart of a method for processing a security service before a terminal is shut down provided in an embodiment of the present application;
[0040] Figure 6 A flowchart of a method for processing a security service when a terminal is turned on provided in an embodiment of the present application;
[0041] Figure 7 A flowchart of another method for processing security services before a terminal is shut down provided in an embodiment of the present application;
[0042] Figure 8 A flowchart of another method for processing security services when a terminal is turned on provided in an embodiment of the present application;
[0043] Fig. 9 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or. For example, A / B can mean A or B. The “and / or” in this article is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0045] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0046] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0047] The transaction method of the security service provided in the embodiment of the present application is applicable to a terminal including an SE module. Exemplarily, in the embodiment of the present application, the terminal 100 may be, for example, a mobile phone, a tablet computer, a personal computer (PC), a personal digital assistant (PDA), a netbook, a wearable terminal (such as a smart watch, a smart bracelet, etc.), an augmented reality (AR) device, a virtual reality (VR) device, an in-vehicle device, a smart screen, a smart car, a smart speaker, etc. The present application does not impose any special restrictions on the specific form of the terminal 100.
[0048] like Figure 1 As shown, Figure 1 A schematic structural diagram of the terminal 100 is shown.
[0049] The terminal 100 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.
[0050] It is to be understood that the structure illustrated in the embodiment of the present invention 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 some components, or split some 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 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 detect 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.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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), infrared (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 performs filtering, 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.
[0061] 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, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).
[0062] 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.
[0063] 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.
[0064] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD 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 files such as music and videos in the external memory card.
[0065] The internal memory 121 can be used to store computer executable program codes, and the executable program codes 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.
[0066] 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.
[0067] Figure 2 A software structure of a terminal 100 provided in an embodiment of the present application.
[0068] like Figure 2 As shown, the terminal 100 includes three application environments: a Rich Execution Environment (REE) module, a Trusted Execution Environment (TEE) module, and a Secure Element (SE) module. In one example, the REE module and the TEE module are integrated on one chip, such as an Application Processor (AP) chip, and the SE module is integrated on another chip, such as an SE chip.
[0069] Among them, the REE module includes a general operating system (not shown in the figure) running on a general embedded processor, such as Rich OS or a kernel-based operating system (such as Android system, Hongmeng system, etc.), and applications / services in the REE module.
[0070] In some examples, the REE module may include an application layer and a system framework layer. The application layer includes a series of applications (Application, APP), such as business APP (such as wallet APP), which supports adding bank cards, transportation cards, electronic certificates, change, membership cards, invoices, community access cards, smart home lock cards, smart hotel room cards, etc., and can meet the security services such as transportation, mobile payment, etc. through the terminal. In some examples, the business APP can also receive information about the security services (i.e., cards) that can be traded after the shutdown set by the user. Optionally, the business APP can also receive information about the security services that need to switch the working mode after the shutdown set by the user. Among them, the system framework layer provides an application programming interface (application programming interface, API) and a programming framework for the APP of the application layer. The system framework layer includes some predefined functions. For example, the system framework layer includes a trigger event detection module, and a business management service. Among them, the trigger event detection module detects the trigger event of the terminal 100, including a first trigger event and a second trigger event. Among them, the first trigger event is used to trigger the terminal to start switching the state of the card in the terminal (such as switching the activated state to the inactivated state, or switching the inactivated state to the activated state). For example, the first trigger event includes a shutdown event, and / or an event in which the terminal power is less than a preset threshold. The second trigger event is used to trigger the terminal to restore the state of each card in the terminal before the first trigger event is detected (such as an activated state or an inactivated state). For example, the second trigger event includes a power-on event, and / or an event in which the terminal power is equal to or greater than a preset threshold. In a specific implementation, the trigger event detection module includes a power-on and power-off service for detecting the power-on and power-off events of the terminal 100, and notifying the business management service of the detected power-on event or power-off event of the terminal 100. For another example, the trigger event detection module may also include a power detection service for detecting the terminal power status of the terminal 100. When an event in which the terminal power of the terminal 100 is less than a preset threshold, or an event in which the terminal power is equal to or greater than a preset threshold, is detected, the business management service is notified to forward the trigger event to the TEE module.
[0071] Among them, the TEE module is an independent operating environment running outside the REE module, which provides security services to the REE module and is isolated from the REE module. The REE module (including the general operating system and the applications on it) cannot directly access the hardware and software resources of the TEE module. The TEE module provides a trusted operating environment for the applications in the TEE module, and then ensures end-to-end security by protecting confidentiality, integrity and controlling data access rights. The TEE module is parallel to the REE module and interacts with the REE module through a secure application programming interface (API). The TEE module provides an operating environment with a higher security level than the REE module, but cannot provide a secure key storage and key operating environment at the hardware isolation level. Among them, the application in the TEE module is also called a trusted application (TEE application, TA).
[0072] For example, the TEE module includes a service management TA, which is used to notify the SE module to activate the security services that can be traded after shutdown or when the terminal power is less than the preset threshold, and deactivate (deactivate) the security services that cannot be traded after shutdown or when the terminal power is less than the preset threshold after receiving the first trigger event forwarded by the service management service (such as a shutdown event or an event that the terminal power is less than a preset threshold). Optionally, the service management TA can also notify the SE module to switch the working mode of some security services after receiving the first trigger event forwarded by the service management service.
[0073] For another example, the business management TA is used to notify the SE module to restore the status of each card to the state and / or working mode before the first trigger event was detected after receiving a second trigger event forwarded by the business management service (such as a power-on event or an event in which the terminal power is equal to or greater than a preset threshold).
[0074] The SE module is used to build a trusted and secure key storage and key operation environment. This is because the software system in the SE module is simple and the hardware components are relatively few, so it is easy to establish physical protection and implement security assurance, thereby improving the security strength of the SE module, so that it can serve security systems with higher security requirements. The SE module includes a chip operating system (COS) module (not shown in the figure), a contactless registration service (CRS) module, and applications in the SE module (such as Figure 2Card 1, Card 2, etc. in the SE module). Among them, COS is the operating system of the SE chip, which is used to pre-process the received Application Protocol Data Unit (APDU) instructions and distribute the instructions to the corresponding services or applications in the SE for processing. CRS is a system application in the SE module, which is responsible for the registration management of the applications in the SE module and activating or deactivating (i.e., cancelling the activation) of the applications in the SE module. The applications in the SE module can also be called Applets or cards. For example, they can be bank cards, transportation cards, access cards, work cards, electronic certificates, car keys, typical supports (such as Alipay) TM , WeChat Pay TM )
[0075] It should also be noted that the "business APP", "trigger event detection module", "business management service", "business management TA", etc. here are all names provided by this application to facilitate the description of the solution, and cannot be used as a limitation on the functions of the solution of this application in some examples.
[0076] It should be noted that the terminal 100 also includes an NFC module for supporting the terminal 100 to communicate with other NFC devices (such as the card reader 200). The NFC module includes a contactless front end (CLF), which is a controller of the NFC module, and can receive the APDU instruction of the card reader 200, and send the received APDU instruction to the COS of the SE chip, so that the COS distributes the received APDU instruction to the application in the corresponding SE module for business transactions. In one example, the NFC module can be integrated on another chip independent of the AP chip and the SE chip, also referred to as an NFC chip. It should be noted that when the terminal 100 is turned off, the remaining power of the terminal 100 can power the NFC module and the SE module of the terminal 100, that is, the NFC module and the SE module of the terminal 100 can still work. Then, after the terminal 100 is turned off, if the card 1 in the SE module is in an activated state, the card 1 can still trade with the card reader 200.
[0077] The following combination Figure 2 The software structure of the terminal 100 shown in the figure takes the case where the first trigger event is a shutdown event and the second trigger event is a power-on event as an example to describe the technical solution provided by the embodiment of the present application in detail. In one example, the power-on and power-off service in the trigger event detection module is specifically used to detect the shutdown event and the power-on event.
[0078] In some embodiments of the present application, the terminal can determine the security services (also called cards) that the terminal can trade after shutting down according to the user's settings or the terminal's default settings, that is, determine the following first card list. Figure 3 As shown, it is a flowchart of a method for setting a secure service that can perform transactions after the terminal is shut down, which is exemplarily provided in an embodiment of the present application. The method includes:
[0079] S301. The business APP of the REE module receives user settings.
[0080] In one example, the service APP in the REE module may provide a setting interface for the user to set up a security service (also called a card) that the user hopes to be able to conduct transactions after the terminal 100 is turned off.
[0081] S302. The business APP determines a first card list according to user settings, where the first card list includes information about cards that support transactions after the terminal 100 is turned off.
[0082] In some examples, the business APP can determine the cards that the system allows to be traded after the terminal is shut down from the cards added to the terminal based on factors such as the security of card transactions. Generally, cards in the terminal that have lower security requirements and do not require user authentication can be set by the user whether they can be traded after the terminal is shut down. For example, various types of transportation cards, access cards (or, specifically, access cards for general areas), keys (for example, car keys), etc. Then, the business APP provides a user setting interface, which only includes cards that the system allows to be traded after the terminal is shut down, so that the user can set the cards that the user hopes to be able to trade after the terminal is shut down, that is, to obtain the first card list.
[0083] In other examples, the user can set all the cards added to the terminal, set the cards that the user hopes to be able to trade after the terminal is shut down, and obtain a card list a. In addition, based on factors such as the security of card transactions, the business APP determines the cards that the system allows to be traded after shutdown, and obtains a card list b. Then, the business APP determines the intersection of the two card lists as the first card list based on the card list a and the card list b, that is, obtains the information of the cards that the user sets and hopes to trade after the terminal is shut down. Alternatively, when the user sets the cards that he hopes to be able to trade after the terminal is shut down, the terminal can also automatically detect whether the card set by the user is on the card list b, that is, whether it is a card that the system allows to be traded after shutdown. When the card set by the user is not on the card list b, the user can be prompted to prevent the user from setting the card to be traded after shutdown. In summary, the embodiment of the present application does not limit the specific implementation of how the business APP determines the first card list.
[0084] For example, let's say the business APP is a wallet APP. Figure 4The interface shown in (1) is the setting interface of the wallet APP. The setting interface includes a "card setting after power off" item 401. In response to detecting that the user operates the "card setting after power off" item 401, the terminal displays the following Figure 4 The detailed setting interface of the card after shutdown shown in (2) in the figure. In this interface, the user can select the card that the user wants to be able to trade after the terminal is shut down by checking the boxes behind each card. For example, the first card list includes transportation cards and car keys.
[0085] S303. The business APP sends the first card list to the business management TA of the TEE module, and the business management TA stores the first card list.
[0086] Exemplarily, the business APP in the REE module can send the first card list directly to the business management TA in the TEE module, or it can send the first card list to the business management TA in the TEE module through the business management service in the REE module. The embodiment of the present application is not limited to this.
[0087] S304: The service management TA returns a response to the service APP indicating that the first card list has been successfully received. This step is optional.
[0088] It should be noted that, in some other examples, the business APP may also directly send the card information set by the user that the user hopes to be able to trade when the terminal is turned off to the business management TA, and the business management TA determines the first card list. Or, in some other examples, the business APP may also directly send the card information set by the user that the user hopes to be able to trade when the terminal is turned off to the business management service in the REE module, and the business management service determines the first card list. Then, the business management service sends the first card list to the business management TA. Among them, how the business management TA in the TEE module or the business management service in the REE module determines the first card list can refer to the method for the business APP to determine the first card list, which will not be repeated here.
[0089] S305, the business APP subscribes to the power on / off event of the terminal from the power on / off service in the REE module. This step is optional.
[0090] In some other examples, the service management service in the REE module or the service management TA in the TEE module may subscribe to the power on and off events of the terminal from the power on and off service in the REE module.
[0091] It should be noted that the power on and off events subscribed here include power on events and power off events. Among them, the subscribed shutdown events include events that the terminal is preparing to shut down, and the terminal is not shut down at this time. In some examples, the subscribed shutdown events include events in which the user manually shuts down and events in which the terminal automatically shuts down due to insufficient power or other reasons. In other examples, the subscribed shutdown events may only include events in which the terminal automatically shuts down due to insufficient power or other reasons, and do not include events in which the user manually shuts down. It should be noted that when the subscribed shutdown events are different, the technical effects achieved by the technical solution of the present application are different, which will be explained in detail later and will not be explained here.
[0092] S306: The power on / off service returns a subscription success response to the business APP. This step is optional.
[0093] In some other examples, if the business management service in the REE module, or the business management TA in the TEE module subscribes to the power on and off events of the terminal to the power on and off service in the REE module, the corresponding subscriber of the power on and off service (business management service or business management TA) returns a response of successful subscription.
[0094] It should be noted that in some other embodiments, the terminal may also set by default the cards that can be traded after the terminal is turned off, or subscribe to the terminal's power on and off events by default. Alternatively, after detecting the power on and off event, the power on and off service automatically broadcasts the power on and off event, and the business APP can receive the broadcasted power on and off event. In other words, the terminal may not perform the above steps S301 to S304.
[0095] Thus, the terminal determines and stores the first card list according to the user settings and / or the information of each card added in the terminal, and also subscribes to the power on and off events of the terminal.
[0096] In some embodiments of the present application, after the terminal determines the first card list, when a terminal shutdown event is detected, the terminal automatically switches the status of each card (including activated status and unactivated status) according to the first card list before shutting down, so that the cards in the first card list can be traded after the terminal is shut down.
[0097] like Figure 5 FIG. 1 is a flow chart of a transaction method for a terminal security service provided by an embodiment of the present application, the method comprising:
[0098] S501a. The power on / off service in the REE module sends a power off event to the service management service of the REE module.
[0099] When the power on / off service in the REE module detects a shutdown event, it sends the shutdown event to the service management TA in the TEE through the service management service in the REE module.
[0100] S501b: The business management service forwards the shutdown event to the business management TA of the TEE module.
[0101] Steps S501a-S501b are explained by taking the example of the business management service of the REE module subscribing to the terminal power on / off event to the power on / off service. It should be noted that in some other examples, the business management TA of the TEE module can also directly subscribe to the terminal power on / off event to the power on / off service of the REE module. Then, after detecting the shutdown event, the power on / off service of the REE module directly sends the shutdown event to the business management TA of the TEE module. Alternatively, the business APP of the REE module subscribes to the terminal power on / off event to the business APP of the REE module. Then, after detecting the shutdown event, the business APP of the REE module sends the shutdown event to the business APP of the REE module. Then, the business APP of the REE module directly forwards the shutdown event to the business management TA of the TEE module, or forwards the shutdown event to the business management TA via the business management service of the REE module.
[0102] In some examples, the shutdown event includes a shutdown event after receiving a user shutdown instruction (i.e., a user manual shutdown event) and an event of receiving an automatic shutdown due to insufficient power or other reasons (i.e., a terminal automatic shutdown event). In this example, after the terminal is shut down for different reasons, the transaction scenario of the terminal is the same and the user experience is consistent. In other examples, the shutdown event only includes an event of automatic shutdown due to insufficient power or other reasons, and does not include a shutdown event after receiving a user shutdown instruction (i.e., an event of manual shutdown by the user). In other words, when the terminal is shut down for different reasons, the transaction scenario of the terminal may be different. For example, if the user shuts down manually and the terminal executes the prior art, then no card can be traded after the terminal is shut down, or only the default card can be traded after the terminal is shut down. If the terminal automatically shuts down due to insufficient power, the terminal executes the method provided in the embodiment of the present application, then the card in the first card list can be traded after the terminal is shut down. In this example, it can be prevented that other users who illegally obtain the terminal can trade some cards by actively shutting down, further improving the security of terminal transactions.
[0103] S502: After receiving the shutdown event, the service management TA queries the CRS of the SE module for the status of each card in the SE module, wherein the status of the card includes an activated state and an inactivated state.
[0104] S503. CRS returns the status of each card in the SE module to the service management TA. The service management TA stores the status of each card at this time, that is, stores the status of each card before shutdown.
[0105] Optionally, the business management TA of the TEE module can also obtain and store other relevant information from the CRS or COS, such as the information of the default card. The default card refers to the card that is activated by default in the SE module. In the specific implementation, the default card can be a specific card in the SE module (such as a transportation card, access card, etc.), or it can be a smart flash card. Among them, the smart flash card can automatically identify the scene according to conditions such as geographical location and card reader, and automatically activate the corresponding card.
[0106] It is understandable that the service management TA stores the status of each card in the SE module at this time and other related information, which can be used to restore the status of each card in the SE module to the status of each card before shutdown when the terminal is powered on again.
[0107] S504. Determine whether the first card exists according to the first card list. If it is determined that the first card exists, the first card is the card currently activated in the SE module, and the first card is not in the first card list, then the service management TA sends a deactivated first card to the CRS.
[0108] Among them, deactivating the first card means canceling the activation state of the first card, making the first card in an unactivated state, and then the first card cannot be traded. The number of first cards is one or more. When the number of first cards is multiple, the business management TA can send deactivation instructions to each first card one by one, that is, the business management TA sends multiple deactivation instructions to the CRS. Alternatively, the business management TA can also send a deactivation instruction to all first cards, and the CRS deactivates each first card one by one according to the deactivation instruction. The embodiment of the present application does not limit the specific deactivation process.
[0109] The business management TA of the TEE module determines the first card according to the status of each card in the SE module and the pre-stored first card list. It can be understood that if the first card is not in the first card list, the first card is a card that the user does not want to be able to trade after the terminal is shut down, but the first card is in an activated state at this time. If the first card is not activated, the first card is still in an activated state after the terminal is shut down, so the first card can still be traded. On the one hand, if the first card is a high-security business (such as an access card to enter a secure area, or an electronic certificate containing sensitive information, etc.), then transactions can be made after shutdown, which poses a security risk. Alternatively, if the first card is a card that requires user authentication, then after shutdown, the REE module and TEE module of the terminal do not work, and user authentication cannot be performed, and the first card is also unavailable after shutdown. On the other hand, if the first card conflicts with the contactless parameters of the second card that needs to be activated later, then the subsequent activation of the second card may result in activation failure. Therefore, the deactivation of the first card in the embodiment of the present application is conducive to ensuring the transaction security of the first card, and is also conducive to improving the success rate of transactions after the second card is shut down.
[0110] If a card is in the active state, but the card is in the first card list, then the card is the card that the user wants to be able to trade after shutting down. Then, the service management TA does not need to change the state of the card. After the terminal is shut down, the card is in the active state and can be traded.
[0111] In some other embodiments, if it is determined that the first card does not exist, the subsequent step S506 is directly executed.
[0112] S505. After deactivating the first card, the CRS returns a response indicating successful deactivation of the first card to the service management TA.
[0113] S506. Determine whether there is a second card according to the first card list. If it is determined that there is a second card, the second card is a card that is currently in an unactivated state in the SE module, and the first card is in the first card list, then the service management TA sends a message to the CRS to activate the second card.
[0114] The service management TA of the TEE module determines the second card according to the status of each card in the SE module and the pre-stored first card list. The number of the second cards is one or more. When the number of the second cards is multiple, the service management TA can send activation instructions for each second card one by one, that is, the service management TA sends multiple activation instructions to the CRS. Alternatively, the service management TA can also send an activation instruction for all second cards, and the CRS activates each second card one by one according to the activation instruction. The embodiment of the present application does not limit the specific activation process.
[0115] S507. CRS returns a response to the service management TA indicating that the second card has been successfully activated.
[0116] S508a: The service management TA returns a response of the shutdown event to the service management service.
[0117] S508b: The business management service returns a response of the shutdown event to the power on and off service.
[0118] Step S508a and step S508b may be executed before or after step S502, or may not be executed.
[0119] Then, when the terminal is shut down, the cards in the first card list (including the cards that are activated before receiving the shutdown event, and the second card activated after receiving the shutdown event) are in an activated state, so the cards in the first card list are in an activated state after the terminal is shut down. It can be understood that when the terminal is shut down, the remaining power of the terminal can power the NFC module and SE module of the terminal, that is, the NFC module and SE module of the terminal can still work. Then, when the terminal is shut down, the NFC module of the terminal can still receive the transaction instruction of the card reader device (for example, the instruction to select the first card), and the cards in the first card list in the SE module of the terminal can be traded with the card reader device. Compared with the prior art, any card cannot be traded after the terminal is shut down, or only the default card can be traded after the terminal is shut down. The embodiment of the present application realizes that multiple cards can be traded after the terminal is shut down, meeting the transaction requirements of the shutdown scenario.
[0120] In addition, it should be noted that because high-security services (such as access cards for entering secure areas, or large-value payment services that require user authentication, or electronic documents containing sensitive information, etc.) have been excluded from the first card list based on factors such as card transaction security when the terminal determines the first card list, the embodiment of the present application improves the security of transactions involving cards in the first card list after the terminal is shut down.
[0121] like Figure 6 As shown, it is a flow chart of a method for restoring the states of various cards before shutdown after the terminal is restarted provided by an embodiment of the present application, and the method includes:
[0122] S601a. The power on / off service in the REE module sends a power on event to the service management service of the REE module.
[0123] S601b: The business management service forwards the power-on event to the business management TA of the TEE module.
[0124] Steps S601a-S601b are explained by taking the example of the business management service of the REE module subscribing to the power on / off service for the terminal power on / off event. It should be noted that in some other examples, the business management TA of the TEE module can also directly subscribe to the terminal power on / off event to the power on / off service of the REE module. Then, after detecting the power on event, the power on / off service of the REE module directly sends the power on event to the business management TA of the TEE module. Alternatively, the business APP of the REE module subscribes to the terminal power on event to the business APP of the REE module. Then, after detecting the power on event, the business APP of the REE module sends the power on event to the business APP of the REE module. Then, the business APP of the REE module directly forwards the power on event to the business management TA of the TEE module, or forwards the power on event to the business management TA via the business management service of the REE module.
[0125] S602: The service management TA obtains the status of each card in the SE module before shutdown, wherein the status of the card includes an activated state and an inactivated state.
[0126] In the above step S503, the service management TA of the TEE module has stored the status of each card in the SE module before shutdown.
[0127] S603: After receiving the power-on event, the service management TA queries the CRS of the SE module for the status of each card in the SE module.
[0128] It should be noted that step S603 can be executed simultaneously with step S602, or can be executed after or before step S602. This application does not limit the execution order of step S603 and step S602.
[0129] S604. CRS returns the status of each card in the SE module to the service management TA.
[0130] It is understandable that, since the terminal has just been turned on, the status of each card in the SE module queried at this time is the same as the status of each card when the terminal is turned off.
[0131] In some other examples, the terminal may determine the status of each card when the terminal is turned off according to the first card list. For example, the cards in the first card list are activated when the terminal is turned off, and the cards not in the first card list are inactive when the terminal is turned off. That is, the terminal may not perform step S603 and step S604.
[0132] S605: If the third card is in an inactivated state before the power is turned off and is in an activated state when the power is turned off, the service management TA sends a message to the CRS to activate the third card.
[0133] It can be understood that at this time, the third card is the same as the second card in step S506.
[0134] S606. The CRS returns a response to the service management TA indicating that the third card has been successfully activated.
[0135] S607: If the fourth card is in an activated state before the power is turned off and is in an inactivated state when the power is turned off, the service management TA sends a message to the CRS to activate the fourth card.
[0136] It can be understood that the fourth card in this step is the same as the first card in the above step S504.
[0137] S608. CRS returns a response to the service management TA indicating that the fourth card has been successfully activated.
[0138] S609a: The service management TA returns a response of the power-on event to the service management service.
[0139] Optionally, in some examples, after receiving a response from the CRS indicating successful activation of the fourth card, the service management TA also clears the status of each card at shutdown and related information stored by the service management TA.
[0140] S609b: The business management service returns a response of the power-on event to the power-on / off service.
[0141] Step S609a and step S609b may be executed before or after step S602, or may not be executed.
[0142] It can be seen that when the terminal is turned on again, each card in the SE module is restored to the state before shutdown, retaining the user's operating habits when turning on the terminal and avoiding confusion in user use.
[0143] The technical solution of the present application is explained here in conjunction with specific application scenarios.
[0144] Specific application scenarios: Transportation cards, bank cards, car keys, door keys, access cards and payment cards have been added to the terminal. The card currently activated on the terminal is the transportation card.
[0145] Prior art: After the terminal is shut down, the activation status of each card before the shutdown is retained, that is, only the transportation card is activated, and the other cards are inactive. Then, after the shutdown, only the transportation card can be traded in the terminal, and the other cards cannot be traded.
[0146] Alternatively, after the terminal is turned off, the activation status of all cards is cancelled. Then, after the terminal is turned off, all cards in the terminal cannot be traded.
[0147] Technical solution 1 of this application: The user Figure 4 In the interface shown in (2), the cards that can be traded after the terminal is turned off are set to transportation cards and car keys, that is, the first card list includes transportation cards and car keys. Among them, bank cards and payment cards are cards that the terminal system defaults to not being traded after the terminal is turned off. If the user sets a bank card or payment card as a card that can be traded after the terminal is turned off, the terminal will issue a prompt to prohibit the bank card or electronic card from being set as a card that can be traded after the terminal is turned off.
[0148] When it is detected that the terminal is manually shut down by the user or the terminal is automatically shut down due to insufficient power or other reasons, the terminal records the card status before shutdown as follows: the car key is activated and other cards are inactivated. The terminal inquires that the currently activated card - the car key is not in the first card list, then cancels the activation status of the car key. Further, the terminal inquires that all the transportation cards in the first card list are inactivated, then the terminal activates the transportation card. When the terminal is shut down, the transportation card and car key in the terminal are still activated, and the other cards are inactivated. Then, the transportation card and car key in the terminal can be traded, and the other cards cannot be traded.
[0149] When the terminal is turned on again, the terminal restores to its original state according to the state of each card before the terminal is shut down, that is, the car key is activated and other cards are inactive.
[0150] Technical Solution 2 of the present application: Compared with Technical Solution 1, the shutdown events subscribed by the terminal only include the terminal automatically shutting down due to insufficient power, etc., which is different in different shutdown scenarios. In one example, Figure 4 As shown in (2), the shutdown events that the user can choose to subscribe to include automatic shutdown due to insufficient power, etc., but do not include manual shutdown events by the user.
[0151] Scenario 1: When the user manually shuts down the terminal, the terminal can use the existing technology to process it, and the technical effect is the same as the existing technology. That is, after the terminal is shut down, only the car key can be traded, and the other cards cannot be traded. Or, all cards in the terminal cannot be traded.
[0152] Scenario 2: When it is detected that the terminal is automatically shut down due to insufficient power or other reasons, the terminal's processing is the same as that of Technical Solution 1, and the technical effect is also the same. That is, when the terminal is shut down, the transportation card and car key in the terminal are still in an activated state, and the other cards are in an inactivated state. Then, the transportation card and car key in the terminal can be traded, and the other cards cannot be traded.
[0153] When the terminal is turned on again, the terminal restores to its original state according to the state of each card before the terminal is shut down, that is, the car key is activated and other cards are inactive.
[0154] It can be understood that by comparing Technical Solution 1 and Technical Solution 2, Technical Solution 2 can prevent other users who have illegally obtained the terminal from actively shutting down the terminal and performing transactions on some cards after the terminal is shut down, thereby further improving the security of terminal transactions.
[0155] In some other embodiments, the SE module may also include some cards with two or more working modes. The terminal may control such cards to be in different working modes when the terminal is turned on and off, so as to meet different transaction needs of users.
[0156] For example, payment cards can work in mode 2 when the terminal is turned on. In mode 2, the card can perform large transactions under user authentication to ensure transaction security. User authentication methods include face data authentication, fingerprint feature authentication or password authentication, etc. Payment cards can also work in mode 1 when the terminal is turned off. In mode 1, the card can perform small transactions without user authentication. Mode 1 does not require user authentication and can perform password-free payment, meeting the payment needs of users after the terminal is turned off.
[0157] For another example, the access card can work in mode B when the terminal is turned on, and the access card can enter the secure area and the general area in mode B. The access card can work in mode A when the terminal is turned off, and the access card can only enter the general area in mode A.
[0158] Take the office scene as an example. In an office environment, the lobby or lounge can be set as a general area, and the workstation area and conference room can be set as a secure area. When an employee's mobile phone is turned on, the access card in the mobile phone works in mode b, and the access card is in an inactive state when the user has not authenticated. When the employee swipes the card reader in the lounge with his mobile phone, the mobile phone prompts the user to authenticate. After the user authenticates, the access card is in an active state, the access card interacts with the card reader in the lounge, the lounge door is unlocked, and the user can enter the lounge. After a preset time period or after the user exits the business APP, the access card returns to an inactive state. When the employee swipes the card reader in the conference room with his mobile phone, the mobile phone prompts the user to authenticate. After the user authenticates, the access card is in an active state, the access card interacts with the card reader in the conference room, the conference room door is unlocked, and the user can enter the conference room. After a preset time period or after the user exits the business APP, the access card returns to an inactive state.
[0159] After the employee's mobile phone is turned off, the access card in the mobile phone works in mode a, and the user does not need to authenticate, and the access card is in an activated state. When the employee swipes the card reader in the lounge with the mobile phone, the access card interacts with the card reader in the lounge, and the card reader in the lounge determines that the access card works in mode a, the lounge door is unlocked, and the user can enter the lounge. When the employee swipes the card reader in the conference room with the mobile phone, the access card interacts with the card reader in the conference room, and the card reader in the conference room determines that the access card works in mode a, refuses to unlock the conference room door, and the user cannot enter the conference room.
[0160] Another example: the electronic certificate can work in mode 1 when the terminal is turned on, and the electronic certificate can provide sensitive information and non-sensitive information in mode 1. The electronic certificate can work in mode 2 when the terminal is turned off, and the electronic certificate only provides non-sensitive information in mode 2. Among them, sensitive information includes, for example, the user's name, ID number, bank card number and other information. Non-sensitive information includes, for example, membership card number, user gender, user birthday, card application time and other information.
[0161] Therefore, after detecting a shutdown event, the terminal needs to activate the card that can be traded after shutdown, and also needs to switch the card with multiple working modes to the preset mode after shutdown.
[0162] In one example, the terminal (such as the business management TA in the TEE module) also needs to store a second card list, which includes information about cards that need to work in the preset mode after shutdown. In some examples, the cards in the second card list are also cards that can be traded after shutdown, that is, cards that belong to the first card list. In other words, the card set in the second card list is a subset of the card set in the first card list. In some specific examples, the user can set the card that needs to be switched to the preset mode after shutdown. For example, the business APP provides Figure 4In the interface shown in (3), after a card with multiple working modes is set as a card that can be traded after the power is turned off, the user can set the preset mode of the card after the power is turned off. For example, the working mode of the payment card after the power is turned off is set to mode 1, and the working mode of the access card after the power is turned off is set to mode a. Then, the business APP determines the second card list according to the received user settings, and forwards the second card list to the business management TA in the TEE module. In some other specific examples, the terminal can also automatically determine the second card list. For example, the terminal determines whether there are cards with multiple working modes in the first card list. If there are cards with multiple working modes, the card is directly determined as a card that needs to be switched to the preset mode after the power is turned off, and the preset mode of each card after the power is turned off is determined. It can be understood that the first card list is a card that can be traded after the power is turned off. If the card has multiple working modes, it needs to be switched to the preset mode when the power is turned off. Based on factors such as card transaction security, one mode can be determined as the preset mode from the multiple working modes of the card, and the preset mode meets the transaction requirements after the terminal is turned off. In some examples, the preset mode that meets the transaction requirements after the terminal is turned off can also be called a low-risk mode. For other contents of the second card list, please refer to the description of the relevant contents of the first card list, which will not be elaborated here. For example, the first card list includes transportation cards, car keys, payment cards, and access cards. The second card list includes payment cards and access cards, and the preset mode after the payment card is turned off or the terminal power is less than the preset threshold is mode 1, and the preset mode after the access card is turned off or the terminal power is less than the preset threshold is mode a.
[0163] It should also be noted that the first card list and the second card list can be two independent tables, and the first card list includes information about cards that can be traded after shutdown. The second card list includes information about cards that need to be in a preset mode after shutdown. It can be understood that the cards in the first card list include the cards in the second card list. Of course, the first card list and the second card list can also be the same table, which includes all cards that can be traded after shutdown (i.e., the first card list), and marks the cards that need to work in a preset mode after shutdown (i.e., marks the cards in the second card list). The embodiments of the present application do not limit the form of the first card list and the second card list. The following embodiments are illustrative examples using the first card list and the second card list as two different tables.
[0164] like Figure 7 FIG. 1 is a flow chart of another transaction method for a security service provided in an embodiment of the present application, the method comprising:
[0165] S701a. The power on / off service in the REE module sends a power off event to the service management service of the REE module.
[0166] S701b. The business management service forwards the shutdown event to the business management TA of the TEE module.
[0167] Step S701a-step S701b is described by taking the example of the service management service of the REE module subscribing the terminal power on / off event to the power on / off service. For other contents, please refer to the relevant contents of the above steps S501a-step S501b.
[0168] In some examples, the shutdown event includes a shutdown event after receiving a user shutdown instruction (i.e., an event in which the user manually shuts down) and an event in which the user automatically shuts down due to insufficient power or other reasons. In this example, after the terminal is shut down for different reasons, the transaction scenarios of the terminal are the same and the user experience is consistent. In other examples, the shutdown event only includes a shutdown event after receiving a user shutdown instruction (i.e., an event in which the user manually shuts down). In other words, when the terminal is shut down for different reasons, the transaction scenarios of the terminal may be different. For example, if the user shuts down manually and the terminal executes the prior art, then no card can be traded after the terminal is shut down, or only the default card can be traded after the terminal is shut down. If the terminal automatically shuts down due to insufficient power, the terminal executes the method provided in the embodiment of the present application, then the card in the first card list can be traded after the terminal is shut down. In this example, it can be prevented that other users who illegally obtain the terminal can trade some cards by actively shutting down, further improving the security of terminal transactions.
[0169] S702: After receiving the shutdown event, the service management TA queries the CRS of the SE module for the status of each card in the SE module, wherein the status of the card includes an activated state and an inactivated state.
[0170] S703. CRS returns the status of each card in the SE module to the service management TA.
[0171] The service management TA of the TEE module stores the status of each card at this time, that is, stores the status of each card before shutdown.
[0172] Optionally, the business management TA of the TEE module can also obtain and store other relevant information from the SE module, such as the information of the default card. The default card refers to the card that is activated by default in the SE module. In specific implementation, the default card can be a specific card in the SE module (such as a transportation card, access card, etc.), or it can be a smart flash card. Among them, the smart flash card can automatically identify the scene according to conditions such as geographical location and card reader, and automatically activate the corresponding card.
[0173] In some other embodiments, if the terminal obtains the status of each card when executing step S703, it also obtains the mode of each card, so that the terminal can subsequently determine whether the card needs to be switched to a specified mode.
[0174] It is understandable that the service management TA stores the status of each card in the SE module at this time and other related information, which can be used to restore the status of each card in the SE module to the status of each card before shutdown when the machine is subsequently turned on.
[0175] S704: If it is determined that the first card exists, the first card is a card currently in an activated state in the SE module, and the first card is not in the first card list, the service management TA sends a message to the CRS to activate the first card.
[0176] Among them, deactivating the first card means canceling the activation state of the first card, making the first card in an unactivated state, and then the first card cannot be traded. The number of first cards is one or more. When the number of first cards is multiple, the business management TA can send deactivation instructions to each first card one by one, that is, the business management TA sends multiple deactivation instructions to the CRS. Alternatively, the business management TA can also send a deactivation instruction to all first cards, and the CRS deactivates each first card one by one according to the deactivation instruction. The embodiment of the present application does not limit the specific deactivation process.
[0177] In some other embodiments, if it is determined that the first card does not exist, the subsequent step S706 is directly executed.
[0178] S705. The CRS returns a response to the service management TA indicating that the first card has been successfully activated.
[0179] S706. The service management TA sends instructions for switching to a preset mode to the CRS one by one for each card in the second card list.
[0180] Among them, the second card list includes one or more cards that need to be switched to the preset mode. In some embodiments, the cards in the second card list are in the first card list. In other words, the cards in the second card list are cards that can be traded after shutdown. Then, for the cards in the first card list that need to be switched to the preset mode (i.e., the cards in the second card list), switch them to the preset mode. It can be understood that if card A in the second card list is in an activated state at this time, execute this step to switch card A to the preset mode. When the terminal is shut down, the card A can be traded. If card B in the second card list is in an unactivated state at this time, first execute this step to switch card B to the preset mode, and then activate card B by executing step S708. When the terminal is shut down, the card B can be traded.
[0181] In a specific implementation, each card that needs to switch to the preset mode defines its own private switching mode instruction, then the service management TA in the TEE module sends corresponding switching to the preset mode instruction to each card in the second card list one by one.
[0182] In some other embodiments, if the terminal obtains the status of each card when executing step S703, it also obtains the mode of each card. Then, the terminal can also determine whether each card in the second card list is in the preset mode. For cards in the second card list that are already in the preset mode, the terminal does not need to send an instruction to switch to the preset mode. For cards that are not in the second card list and are not in the preset mode, the terminal needs to send a corresponding instruction to switch to the preset mode.
[0183] It should be noted that step S706 may also be executed simultaneously with step S704, or after or before step S704. The embodiment of the present application does not limit the execution order of step S706 and step S704.
[0184] S707. The CRS returns a response indicating successful mode switching to the service management TA.
[0185] S708: If it is determined that the second card exists, the second card is a card that is currently in an inactivated state in the SE module, and the first card is in the first card list, the service management TA sends an instruction to activate the second card to the CRS.
[0186] After all cards in the second card list that need to switch card mode are successfully switched, the business management TA of the TEE module sends an instruction to activate the second card to the CRS of the SE module. The number of second cards is one or more. When the number of second cards is multiple, the business management TA can send activation instructions for each second card one by one, that is, the business management TA sends multiple activation instructions to the CRS. Alternatively, the business management TA can also send an activation instruction for all second cards, and the CRS activates each second card one by one according to the activation instruction. The embodiment of the present application does not limit the specific activation process.
[0187] It should be noted that at this time, the cards in the first card list that are currently in an inactive state need to be activated. Then, it includes activating cards that are not in the second card list but are in the first card list and are currently in an inactive state; and activating cards that are in the second card list and are currently in an inactive state. In other words, for cards in the second card list that are currently in an inactive state, first switch them to the preset mode and then activate them. It can be understood that for cards in the second card list that are currently in an activated state, it is only necessary to switch them to the specified mode without performing the activation operation.
[0188] S709. CRS returns a response to the service management TA indicating that the second card has been successfully activated.
[0189] S710a: The service management TA returns a response of the shutdown event to the service management service.
[0190] S710b: The business management service returns a response of the shutdown event to the power on and off service.
[0191] Step S710a and step S710b may be executed before or after step S702, or may not be executed.
[0192] It can be seen that when the terminal is turned off, the cards in the second card list are switched to the preset mode (the working mode when the terminal is turned off), which not only ensures that the cards in the second card list can be traded after the terminal is turned off, but also ensures the security of card transactions by the cards in the second card list working in the preset mode. This embodiment enriches the cards that can be traded after the terminal is turned off, and meets the transaction needs of more shutdown scenarios.
[0193] like Figure 8 FIG. 1 is a flow chart of another method for restoring the states of various cards before shutdown after a terminal is restarted provided by an embodiment of the present application, the method comprising:
[0194] S801a. The power on / off service in the REE module sends a power on event to the service management service of the REE module.
[0195] S801b. The service management service forwards the power-on event to the service management TA.
[0196] Steps S801a-S801b are explained by taking the example of the business management service of the REE module subscribing to the power on / off event of the terminal to the power on / off service. It should be noted that in some other examples, the business management TA of the TEE module can also directly subscribe to the terminal power on / off event to the power on / off service of the REE module. Then, after detecting the power on event, the power on / off service of the REE module directly sends the power on event to the business management TA of the TEE module. Alternatively, the business APP of the REE module subscribes to the terminal power on event to the business APP of the REE module. Then, after detecting the power on event, the business APP of the REE module sends the power on event to the business APP of the REE module. Then, the business APP of the REE module directly forwards the power on event to the business management TA of the TEE module, or forwards the power on event to the business management TA via the business management service of the REE module.
[0197] S802: The service management TA obtains the status of each card in the SE module before shutdown, wherein the status of the card includes an activated state and an inactivated state.
[0198] In the above step S703, the service management TA of the TEE module has stored the status of each card in the SE module before shutdown.
[0199] S803: After receiving the power-on event, the service management TA queries the CRS of the SE module for the status of each card in the SE module.
[0200] It should be noted that step S803 can be executed simultaneously with step S802, or can be executed after or before step S802. This application does not limit the execution order of step S803 and step S802.
[0201] S804. CRS returns the status of each card in the SE module to the service management TA.
[0202] It is understandable that, since the terminal has just been powered on, the status of each card in the SE module queried at this time is the same as the status of each card before the terminal is powered on (ie, after being powered off).
[0203] In some other examples, the terminal may determine the status of each card after the terminal is shut down according to the first card list. For example, the cards in the first card list are in an activated state after the terminal is shut down, and the cards not in the first card list are in an inactivated state after the terminal is shut down. That is, the terminal may not perform step S803 and step S804.
[0204] S805. If the third card is in an inactivated state before shutdown and is in an activated state after shutdown, the service management TA sends an instruction to deactivate the third card to the CRS.
[0205] It can be understood that at this time, the third card is the same as the second card in step S708. The third card is on the first card list, included in the second card list (i.e., the card working in the preset mode after shutdown), and not in the second card list but in the first card list. The number of the third card is one or more.
[0206] S806. CRS returns a response to the service management TA indicating that the third card has been successfully activated.
[0207] S807. The service management TA sends a mode switching instruction to the CRS one by one for each card in the second card list.
[0208] S808. The CRS returns a response indicating successful mode switching to the service management TA.
[0209] S809: If the fourth card is in an activated state before shutdown and is in an inactivated state after shutdown, the service management TA sends an instruction to activate the fourth card to the SE module.
[0210] It is understandable that the fourth card in this step is the same as the first card in the above step S704. The fourth card is not in the first card list. The number of the fourth card is one or more.
[0211] S810. CRS returns a response to the service management TA indicating that the fourth card has been successfully activated.
[0212] S811a. The service management TA returns a response of the power-on event to the service management service.
[0213] Optionally, in some examples, after receiving a response from the SE module indicating successful activation of the fourth card, the service management TA of the TEE module may also clear the status of each card after shutdown and related information stored in the service management TA of the TEE module.
[0214] S811b. The business management service returns a response of the power-on event to the power-on / power-off service.
[0215] Step S811a and step S811b may be executed before or after step S802, or step S8011a and step S8011b may not be executed.
[0216] It can be seen that when the terminal is turned on again, each card in the SE module is restored to the state before shutdown, retaining the user's operating habits when turning on the terminal and avoiding confusion in user use.
[0217] Here again, the technical solution of the present application is explained in conjunction with specific application scenarios.
[0218] Combined with the previous application scenario: the cards added to the terminal include transportation cards, bank cards, car keys, door keys, payment cards and access cards. The cards currently activated in the terminal are car keys and access cards.
[0219] Prior art: After the terminal is shut down, the activation status of each card before the shutdown is retained, that is, only the car key and the access card are activated, and the other cards are inactive. Then, after the shutdown, only the car key and the access card can be traded in the terminal, and the other cards cannot be traded.
[0220] Alternatively, after the terminal is turned off, the activation status of all cards is cancelled. Then, after the terminal is turned off, all cards in the terminal cannot be traded.
[0221] Technical solution 3 of this application: The user Figure 4 In the interface shown in (3), the cards that can be traded after shutdown are set as transportation cards, car keys, payment cards and access cards, that is, the first card list includes transportation cards, car keys, payment cards and access cards.
[0222] Among them, the payment card has multiple modes, one mode supports large-amount payment function with user authentication, and the other mode supports small-amount payment function without authentication. Then, the terminal confirms that the payment card needs to switch to the preset mode-small-amount payment function mode without authentication (mode 1 in the figure) when it is turned off. Among them, the access control card has multiple modes, one mode supports entering the secure area and the general area, and the other mode supports entering the general area but not the secure area. Then, the terminal confirms that the access control card needs to switch to the preset mode-supporting entry into the general area but not the secure area (mode a in the figure) when it is turned off. That is, the second card list includes payment cards and access control cards.
[0223] When it is detected that the terminal is manually shut down by the user or the terminal is automatically shut down due to reasons such as insufficient power, the terminal records the card status before shutdown as follows: the car key is activated, other cards are inactivated, and the access card is in mode b, and the payment card is in mode 2. The terminal queries that the currently activated card - the car key is not in the first card list, and cancels the activation status of the car key. If the access card is currently activated, the activation status of the access card is retained because the access card is in the first card list. If the access card is currently inactivated, there is no need to adjust the activation status of the access card because the access card is in the first card list.
[0224] Further, the terminal switches the mode of the payment card to the preset mode according to the second card list. That is, the mode of the payment card is switched from mode 2 to mode 1, and the mode of the access card is switched from mode b to mode a. Then, the terminal queries the card that is currently in an inactivated state, but the access card, payment card, transportation card and car key in the first card list are all in an inactivated state, then the terminal activates the access card, payment card, transportation card and car key. When the terminal is turned off, the access card, payment card, transportation card and car key in the terminal are still in an activated state, and the payment card is in the preset mode (mode 1), the access card is in the preset mode (mode a), and the other cards are in an inactivated state. Then, the access card, payment card, transportation card and car key in the terminal can be traded, among which the payment card can only be used for small-amount payment transactions without authentication, the access card only supports entry into general areas, and the other cards cannot be traded.
[0225] When the terminal is turned on again, the terminal restores to its original state according to the state of each card before the shutdown, that is, the car key and access card are activated, and other cards are inactivated, and the access card switches back to mode B, and the payment card switches back to mode 2.
[0226] Technical Solution 4 of the present application: Compared with Technical Solution 3, the shutdown events subscribed by the terminal only include automatic shutdown of the terminal due to insufficient power or other reasons, which will be different in different shutdown scenarios.
[0227] Scenario 3: When the user manually shuts down the terminal, the terminal can use the existing technology to process the terminal, and the technical effect is the same as the existing technology. That is, after the terminal is shut down, only the car key can be traded, and the other cards cannot be traded. Or, all cards in the terminal cannot be traded.
[0228] Scenario 4: When it is detected that the terminal automatically shuts down due to insufficient power or other reasons, the terminal's processing is the same as Technical Solution 3, and the technical effect is also the same. That is, when the terminal is shut down, the access card, payment card, transportation card and car key in the terminal are still activated, and the payment card is in the preset mode (mode 1), the access card is in the preset mode (mode a), and the other cards are in an unactivated state. Then, the access card, payment card, transportation card and car key in the terminal can be traded, among which the payment card can only be used for small-amount payment transactions without authentication, the access card only supports entry into general areas, and the other cards cannot be traded.
[0229] When the terminal is turned on again, the terminal restores to its original state according to the state of each card before the shutdown. The car key and access card are activated, and other cards are inactivated. The access card switches back to mode B, and the payment card switches back to mode 2.
[0230] It can be understood that by comparing Technical Solution 3 and Technical Solution 4, Technical Solution 4 can prevent other users who have illegally obtained the terminal from actively shutting down the terminal and performing transactions on some cards after the terminal is shut down, thereby further improving the security of terminal transactions.
[0231] In addition, compared with Technical Solution 1 and Technical Solution 2, Technical Solution 3 and Technical Solution 4 add the processing of switching cards with multiple working modes to preset modes, which enriches the transaction scenarios of cards in the terminal and meets more transaction needs after the terminal is shut down.
[0232] In some other embodiments, the first trigger event may also be an event that the terminal power is less than a preset threshold, and the second trigger event may also be an event that the terminal power is equal to or greater than the preset threshold. In one example, the power detection service in the trigger event detection module may be used to detect the first trigger event and the second trigger event.
[0233] The terminal can automatically set or determine the first card list according to the user setting, and the first card list includes information about cards that support transactions when the terminal power is less than a preset threshold. For example, when the terminal power is less than the preset threshold, you can select cards in the SE module that do not require user authentication. It is understandable that cards that do not require user authentication can be traded without passing through the TEE module and the REE module, which is conducive to saving terminal power consumption and extending the standby time of the terminal. Optionally, the terminal can also determine a second card list, and the second card list includes information about cards that support transactions in a preset mode when the terminal power is less than a preset threshold. In other words, when the terminal power is less than the preset threshold, the terminal also needs to switch the working mode of the cards in the second card list to the preset mode. In one example, the set of cards in the second card list is a subset of the set in the first card list.
[0234] When the terminal detects that the terminal battery power is less than a preset threshold, the terminal deactivates the card that is currently in an activated state but not in the first card list according to the first card list; and then activates the card that is currently in an inactivated state but in the first card list. Optionally, before the terminal activates the card that is currently in an inactivated state but in the first card list, the terminal also switches the cards in the second card list to a preset mode according to the second card list. When the terminal detects that the terminal battery power is equal to or greater than the preset threshold, the terminal restores the state of each card to the state before detecting that the terminal battery power is less than the preset threshold. Optionally, the working mode of each card is also switched back to the working mode before detecting that the terminal battery power is less than the preset threshold. For other contents, please refer to the description of the relevant contents in the aforementioned embodiments, which will not be repeated here.
[0235] The present application also provides a chip system, such as Fig. 9 As shown, the chip system includes at least one processor 1101 and at least one interface circuit 1102. The processor 1101 and the interface circuit 1102 can be interconnected via lines. For example, the interface circuit 1102 can be used to receive signals from other devices (such as the memory of the terminal 100). For another example, the interface circuit 1102 can be used to send signals to other devices (such as the processor 1101). Exemplarily, the interface circuit 1102 can read the instructions stored in the memory and send the instructions to the processor 1101. When the instruction is executed by the processor 1101, the terminal can execute the various steps performed by the terminal 100 (for example, a mobile phone) in the above embodiment. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiments of the present application.
[0236] The embodiment of the present application also provides a device, which is included in a terminal, and has the function of implementing the terminal behavior in any of the methods in the above embodiments. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes at least one module or unit corresponding to the above function. For example, a detection module or unit, a display module or unit, a determination module or unit, and a calculation module or unit, etc.
[0237] An embodiment of the present application also provides a computer storage medium, including computer instructions. When the computer instructions are executed on a terminal, the terminal executes any method in the above embodiments.
[0238] The embodiments of the present application also provide a computer program product. When the computer program product is run on a computer, the computer is enabled to execute any of the methods in the above embodiments.
[0239] An embodiment of the present application also provides a graphical user interface on a terminal, the terminal having a display screen, a camera, a memory, and one or more processors, the one or more processors being used to execute one or more computer programs stored in the memory, the graphical user interface including a graphical user interface displayed when the terminal executes any of the methods in the above embodiments.
[0240] It is understandable that, in order to realize the above functions, the above-mentioned terminals etc. include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present invention.
[0241] The embodiment of the present application can divide the functional modules of the above-mentioned terminal etc. according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0242] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0243] Each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0244] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk.
[0245] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application 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 card switching method, characterized in that: Applied to a terminal, the method comprises: When the terminal is in a powered-on state or the power level of the terminal is equal to or greater than a preset threshold, the first card in the terminal is in an inactivated state; After the terminal detects a shutdown event or the power level of the terminal is less than the preset threshold, the terminal switches the first card to an activated state; The terminal also includes a second card; When the terminal is in a powered-on state or the power level of the terminal is equal to or greater than the preset threshold, the second card is in an activated state; After the terminal detects a shutdown event or the power level of the terminal is less than the preset threshold, the method further includes: The terminal switches the second card to an inactivated state.
2. The method according to claim 1, characterized in that After the terminal detects a shutdown event or the power level of the terminal is less than the preset threshold, the method further includes: The terminal switches the working mode of the first card to a preset mode, and the first card is set to support information of cards traded in the preset mode.
3. The method according to claim 2, characterized in that The terminal also includes a third card; When the terminal is in a powered-on state or the power level of the terminal is equal to or greater than the preset threshold, the third card is in an activated state; The method further comprises: After the terminal detects a shutdown event or the power level of the terminal is less than the preset threshold, the terminal switches the working mode of the third card to the preset mode.
4. The method according to claim 3, characterized in that: After the terminal switches the first card to an activated state, the method further includes: After the terminal detects a power-on event or the power level of the terminal is equal to or greater than the preset threshold, the terminal switches the first card to an inactivated state.
5. The method according to claim 4, characterized in that The method further comprises: The terminal stores a first state of the first card, where the first state is the state of the first card when the terminal is in a powered-on state or when the power level of the terminal is equal to or greater than the preset threshold; After the terminal detects a power-on event or the power level of the terminal is equal to or greater than the preset threshold, the terminal switches the first card to an inactive state, including: After the terminal detects a power-on event or the power level of the terminal is equal to or greater than the preset threshold, the terminal further acquires a second state of the first card, where the second state is the state of the first card when the terminal is in a power-off state or the power level of the terminal is less than the preset threshold; When the first state of the first card is an inactivated state, and the second state of the first card is an activated state, the terminal switches the first card to an inactivated state.
6. The method according to claim 1, characterized in that After the terminal switches the second card to an inactivated state, the method further includes: After the terminal detects a power-on event or the power level of the terminal is equal to or greater than the preset threshold, the terminal switches the second card to an activated state.
7. The method according to claim 2, characterized in that After the terminal switches the working mode of the first card to the preset mode, the method further includes: After the terminal detects a power-on event or the power level of the terminal is equal to or greater than the preset threshold, the terminal switches the first card to a non-preset mode.
8. The method according to claim 3, characterized in that After the terminal switches the working mode of the third card to the preset mode, the method further includes: After the terminal detects a power-on event or the power level of the terminal is equal to or greater than the preset threshold, the terminal switches the third card to a non-preset mode.
9. The method according to claim 8, characterized in that After the terminal detects a shutdown event or the power level of the terminal is less than the preset threshold, before the terminal switches the first card to an activated state, the method further includes: The terminal receives a first operation of a user, and determines the first card list according to the first operation, wherein the first card list includes information of cards that are set to support transactions when the terminal is powered off or when the power of the terminal is less than a preset threshold.
10. The method according to any one of claims 9, characterized in that: The terminal also includes a second card list, which includes information of cards that are set to support transactions in a preset mode when the terminal is turned off or the battery level of the terminal is less than a preset threshold, and the second card list includes the first card; the card set in the second card list is a subset of the card set in the first card list.
11. The method according to claim 10, characterized in that The method further comprises: The terminal receives a second operation of the user, and determines the second card list according to the first card list and the second operation.
12. The method according to any one of claims 1 to 11, characterized in that: The terminal includes a near field communication NFC module; after the terminal detects a shutdown event or the power of the terminal is less than the preset threshold, the terminal switches the first card to an activated state, and the method further includes: After the terminal is powered off or the battery level of the terminal is less than the preset threshold, the terminal receives an instruction from a card reader to select a first card through the NFC module; In response to the instruction to select the first card, the first card in the terminal executes a transaction with the card reading device.
13. A terminal, characterized in that: include: Processor, memory, near field communication NFC module, secure element SE module and touch screen; The memory, the touch screen, the NFC module, and the SE module are coupled to the processor, the SE module includes a first card, the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the terminal executes the card switching method as described in any one of claims 1-12.
14. A computer-readable storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on a terminal, the terminal executes the card switching method according to any one of claims 1 to 12.
15. A chip system, characterized in that: It comprises one or more processors. When the one or more processors execute instructions, the one or more processors execute the card switching method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Information inquiry method, information inquiry system and related equipment
CN105657145A