Near field communication card swiping method, near field communication device and electronic equipment
Patent Information
- Application Number
- CN202510430615.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2026-10-16
AI Technical Summary
[0020] The technical solution provided in this application combines the RF feature template input process with the card swiping process. The RF feature template input is divided into two stages. When smart card selection is not enabled based on card swiping history, an NFC card is selected for swiping based on card sorting and the RF feature template. When the selected NFC card is successfully swiped and has no associated RF feature template, the detected RF feature is associated with the RF feature template of the NFC card. This achieves automatic association of RF features with the NFC card's RF feature template during the card swiping process, reducing user intervention. If smart card selection is enabled based on card swiping history, card swiping is performed based on the RF feature template and card switching. When the detected RF feature matches the RF feature template of the NFC card, the RF feature template of the NFC card is updated. By dynamically updating the RF feature template associated with the NFC card, the success rate of NFC card swiping is improved.
Smart Images

Figure CN122927329A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of near-field communication technology, specifically to a near-field communication card swiping method, near-field communication device, and electronic device. Background Technology
[0002] NFC (Near Field Communication) is a short-range communication technology that allows NFC devices to exchange data when they are close to each other. When an NFC device is in Card Emulation (CE) mode, it emulates a card, primarily for mobile payments, access control cards, and transportation cards. When an NFC device contains multiple emulated cards, the reader can be identified by its radio frequency (RF) characteristics. The emulated card corresponding to the identified reader can then be selected for swiping. For example, if the reader is identified as a subway gate, a transportation card can be selected from mobile payment, access control, and transportation card emulations. Typically, the reader's RF characteristics are pre-collected to form an RF feature template for reader identification. Minimizing user intervention and ensuring the accuracy of the RF feature template are crucial during the RF characteristic collection process. Summary of the Invention
[0003] In view of the above problems, embodiments of this application provide a near-field communication card swiping method, near-field communication device and electronic device, so as to at least partially reduce the user's involvement in RF feature template entry and ensure the accuracy of RF feature template.
[0004] In a first aspect, embodiments of this application provide an NFC card swiping method, applied to an electronic device including an NFC device, the NFC device being bound to multiple NFC cards, the swiping method comprising: when the NFC device is near an NFC card reader, detecting the RF feature of the NFC card reader; if smart card selection is not enabled based on swiping history, selecting an NFC card for swiping based on card sorting and an RF feature template; if the selected NFC card is successfully swiped and has no associated RF feature template, associating the detected RF feature with the RF feature template of the NFC card; if smart card selection is enabled based on swiping history, swiping is performed based on the RF feature template and card switching, and when the detected RF feature matches the RF feature template of the NFC card, updating the RF feature template of the NFC card.
[0005] In some embodiments, the card swiping method further includes: prompting the user to select an NFC card when the selected NFC card fails to swipe; obtaining the NFC card selected by the user; swiping the card using the NFC card selected by the user, and associating the detected RF feature with the RF feature template of the NFC card.
[0006] In some embodiments, the card swiping method further includes: when swiping a card based on an RF feature template and card switching, during the card swiping process in the card switching mode, determining whether the NFC card swiping is successful based on the feedback from the NFC card reader during the card swiping process; if the NFC card swiping is successful based on the feedback, then associating the detected RF feature with the RF feature template of the NFC card.
[0007] In some embodiments, if the NFC card swipe fails or no feedback is received from the NFC reader based on the feedback, the method further includes: if the detected RF feature fails to match the RF feature templates of all NFC cards, after swiping the card in the card switching mode, prompting the user to associate the detected RF feature with the NFC card; and associating the detected RF feature with the corresponding NFC card according to the user's input information.
[0008] In some embodiments, selecting an NFC card for swiping based on card order and RF feature template includes: when no RF feature template associated with the first NFC card in the card order is stored, using the first NFC card for swiping; when RF feature templates associated with the first N NFC cards in the card order are stored, matching the detected RF feature with the RF feature templates associated with the first N NFC cards; if a match is successful, using the first successfully matched NFC card in the card order for swiping; if all of the first N NFC cards fail to match, using the (N+1)th NFC card in the card order for swiping; where N is an integer greater than or equal to 1.
[0009] In some embodiments, the above card swiping method further includes: updating the RF feature template of the NFC card when the selected NFC card is successfully swiped and has an associated RF feature template.
[0010] In some embodiments, the above-mentioned card swiping based on RF feature template and card switching includes: matching the detected RF feature with the RF feature template to select an NFC card from the plurality of NFC cards; if the selected NFC card is unique, using the selected NFC card for card swiping; if the selected NFC card is not unique, swiping the selected NFC card in a card switching manner; if no NFC card is selected, swiping the plurality of NFC cards in a card switching manner.
[0011] In some embodiments, the card swiping method further includes: determining whether to enable smart card selection based on card swiping history, including: determining whether to enable smart card selection based on the total number of times RF feature template matching is performed; if the total number reaches a preset number, then smart card selection is enabled.
[0012] In some embodiments, updating the RF feature template of the NFC card includes: determining whether to add a new RF feature template based on the matching similarity between the detected RF feature and its matching RF feature template; if the matching similarity is less than a preset threshold, then associating the detected RF feature with the NFC feature template of the NFC card.
[0013] In some embodiments, the card swiping method further includes: calculating the matching status of each RF feature template with the detected RF feature, the matching status including: the latest time when the RF feature template matches the detected RF feature; and deleting the RF feature template based on the matching status of each RF feature template.
[0014] In some embodiments, the above-mentioned deletion of RF feature templates based on the matching of each RF feature template includes: when the total number of associated RF feature templates is greater than a preset number, deleting the RF feature template whose latest time is furthest from the current time.
[0015] In some embodiments, the card swiping method further includes: deleting the RF feature template associated with the NFC card when deleting the NFC card.
[0016] In some embodiments, determining whether the NFC card was swiped successfully includes: determining whether the card was swiped again within a preset time period; if no NFC card was swiped again within the preset time period, then determining that the NFC card swiping was successful; and / or determining whether the swiping was successful based on feedback from the NFC card reader.
[0017] Secondly, embodiments of this application provide a near-field communication (NFC) device, which is bound to multiple NFC cards. The NFC device includes: a detection module, used to detect the RF feature of the NFC card reader when the NFC device is near the NFC card reader; and a swiping module, used to select an NFC card for swiping based on card sorting and an RF feature template when smart card selection is not enabled based on swiping history; when the selected NFC card is successfully swiped and has no associated RF feature template, the detected RF feature is associated with the RF feature template of the NFC card; and when smart card selection is enabled based on swiping history, card swiping is performed based on the RF feature template and card switching, and the RF feature template of the NFC card is updated when the detected RF feature matches the RF feature template of the NFC card.
[0018] Thirdly, embodiments of this application provide an electronic device including the aforementioned NFC device.
[0019] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the NFC card swiping method described above.
[0020] The technical solution provided in this application combines the RF feature template input process with the card swiping process. The RF feature template input is divided into two stages. When smart card selection is not enabled based on card swiping history, an NFC card is selected for swiping based on card sorting and the RF feature template. When the selected NFC card is successfully swiped and has no associated RF feature template, the detected RF feature is associated with the RF feature template of the NFC card. This achieves automatic association of RF features with the NFC card's RF feature template during the card swiping process, reducing user intervention. If smart card selection is enabled based on card swiping history, card swiping is performed based on the RF feature template and card switching. When the detected RF feature matches the RF feature template of the NFC card, the RF feature template of the NFC card is updated. By dynamically updating the RF feature template associated with the NFC card, the success rate of NFC card swiping is improved.
[0021] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 A schematic diagram of the structure of an electronic device to which the technical solutions of the embodiments of this application are applicable is shown.
[0024] Figure 2 A schematic block diagram of an NFC device according to an embodiment of this application is shown.
[0025] Figure 3 A flowchart illustrating an NFC card swiping method according to an embodiment of this application is shown.
[0026] Figure 4 A schematic diagram of a typical transmission process is shown.
[0027] Figure 5 A schematic diagram illustrating a typical card swiping and RF feature template entry according to an embodiment of this application is shown.
[0028] Figure 6 A flowchart of an RF feature template matching method according to an embodiment of this application is shown.
[0029] Figure 7 A structural block diagram of an NFC device provided in an embodiment of this application is shown. Detailed Implementation
[0030] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0031] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0032] In the embodiments of this application, it should be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0033] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0034] In the description of the embodiments of this application, the words "example" or "for example" are used to indicate exemplification, illustration, or description. Any embodiment or design described as "example" or "for example" in the embodiments of this application is not to be construed as being more preferred or having more advantages than another embodiment or design. The use of the words "example" or "for example" is intended to present relative concepts in a clear manner.
[0035] Furthermore, in the embodiments of this application, "multiple" refers to two or more. Therefore, in the embodiments of this application, "multiple" can also be understood as "at least two". "At least one" can be understood as one or more, such as one, two, or more. For example, including at least one means including one, two, or more, and is not limited to which ones are included. For example, including at least one of A, B, and C, then it could include A, B, C, A and B, A and C, B and C, or A and B and C.
[0036] It should be noted that in the embodiments of this application, "and / or" describes the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. In addition, the character " / ", unless otherwise specified, generally indicates that the associated objects before and after it are in an "or" relationship.
[0037] It should be noted that in the embodiments of this application, "connection" can be understood as electrical connection. The connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components.
[0038] Figure 1 A schematic diagram of the structure of an electronic device to which the technical solutions of the embodiments of this application are applicable is shown. Please refer to [link / reference]. Figure 1 As shown, a typical hardware structure of electronic device 100 may include: a processor 101, a memory 102, a radio device 103, an audio output unit 104, an A / V input unit 105, a display unit 106, a user input unit 107, an interface unit 108, and a power supply 109. It should be understood that... Figure 1 This is merely an illustrative example of an embodiment of this application and is not intended to limit the electronic device 100.
[0039] Display unit 106 includes various types of display panels capable of displaying visual graphics, such as a graphical user interface (GUI). User input unit 107 may include a touch panel that can cover the display panel. Audio output unit 104 includes speakers, etc. A / V input unit 105 includes an image processor 1051 and a microphone 1052.
[0040] Memory 102 can store data and instructions that can be executed on processor 101, including operating system 111, etc. (See reference) Figure 1 As shown, memory 102 stores a plurality of applications 110. The one or more applications 110 include weather, instant messaging, telephone, text messaging, email, or stocks, etc.
[0041] Please continue to refer to this. Figure 1As shown in this embodiment, the electronic device 100 also includes an NFC device 200. The processor 101 can communicate with the NFC device 200. Specifically, the processor 101 can communicate with the NFC device 200 via a bus interface such as I2C (Inter-Integrated Circuit) or UART (Universal Asynchronous Receiver / Transmitter). Communication between the processor 101 and the NFC device 200 can be achieved via the NCI (NFC Controller Interface) protocol. The aforementioned operating system 111 and / or application program 110 can control the NFC device 200 to implement NFC functions such as mobile payment, identity recognition, access control, acquisition of electronic tag information, data exchange, device connection, electronic wallet, and electronic public transport card.
[0042] Electronic device 100 can operate in either active or passive mode. Active mode can include peer-to-peer (P2P) mode and reader / writer (RW) mode. In peer-to-peer mode, two NFC-enabled electronic devices 100 pair and connect to enable point-to-point data transfer, such as quickly transferring files between them. In reader / writer mode, the NFC-enabled electronic device 100 reads and writes information from media such as tags, stickers, and business cards with NFC chips. Passive mode includes card emulation mode (CE mode), also known as NFC card emulation mode, card mode, or card simulation mode. In card emulation mode, the NFC device functions similarly to a standard contactless smart card. This allows electronic device 100 to be used with existing contactless smart card infrastructure for operations such as access control, contactless payment, firmware replacement, or data transfer. NFC devices emulating smart cards typically operate in passive NFC mode, where data transfer is secure. In card emulation mode, electronic device 100 can be used as a credit card, transportation card, access card, train ticket, etc.
[0043] In some specific implementations, refer to Figure 2 As shown, the NFC device 200 may include an NFC controller 201, an NFC antenna interface 202, and an NFC antenna 203. The NFC controller 201 is capable of processing the analog and digital protocols defined for NFC card emulation, reader / writer, and peer-to-peer modes. The NFC antenna 203 is capable of electromagnetic coupling with the antenna of the NFC reader 300 to transmit electromagnetic signals through near-field coupling.
[0044] Continue reading Figure 2 The NFC antenna 203 can be a dedicated NFC antenna and / or a component reused from an electronic device. For example, the frame of the electronic device 100 can be reused as the NFC antenna 203. In an electronic device 100 with a wireless charging coil, the wireless charging coil can be reused as the NFC antenna 203. Based on product application scenarios and functional requirements, the NFC device 200 may include one or more NFC antennas 201. In specific implementations, for example, NFC antennas can be placed at the top and center of the back of a smartphone to facilitate communication between the smartphone and an NFC reader or to read NFC cards and NFC tags. The NFC antenna interface 202 may include a matching circuit, a filtering circuit, and a receiving circuit. The matching circuit can be used to match the operating frequency and input impedance, and the filtering circuit can be used to filter out high-order harmonics of the crystal oscillator.
[0045] Continue reading Figure 2 In some specific implementations, the NFC device 200 may also include a Secure Element (SE) 204. The Secure Element 204 is a tamper-proof hardware module used to securely store and process sensitive information, such as payment information and identity credentials. The Secure Element 204 can run one or more card apps, also known as smart card apps or applets. A card app is a small program unit running inside the Secure Element 204; it can be viewed as a software module performing specific functions within the secure space of the Secure Element 204.
[0046] Continue reading Figure 2 The security element 204 can be integrated into the electronic device 100 in various ways. In some specific implementations, the security element 204 serves as a security chip within the electronic device 100; in this case, the security element 204 is also referred to as an embedded secure element (eSE) or a built-in security element. When the security element 204 is an embedded security element, it is generally only connected to the NFC controller 201. The security element 204 can communicate with the processor 101 of the electronic device 100 through the NFC controller 201, performing near-field communication. Other integration methods of the security element 204 can be found in the prior art, and will not be elaborated upon here.
[0047] In electronic device 100, when application 110 (e.g., wallet 110a) needs to perform operations such as payment and authentication, it generally first accesses the card application in security unit 204, which then performs transaction processing and authentication functions. In NFC card emulation mode, when an external NFC reader 300 initiates a communication request, NFC controller 201 can transmit the signal from NFC reader 300 to security unit 204. After receiving the request, the card application in security unit 204 processes it accordingly based on the request type (e.g., authentication request, payment request). After processing, the card application returns the result to NFC reader 300 through security unit 204 and NFC controller 201.
[0048] In electronic device 100, NFC device 200 can simulate multiple NFC cards, and wallet 110a can manage these cards. Specifically, wallet 110a can add, update, and delete NFC cards. In some implementations, wallet 110a can receive card-related information input by the user and add the corresponding NFC card. In some implementations, wallet 110a can directly read physical card information through NFC device 200. When a physical card (such as a bank card or public transport card) is placed on the NFC sensing area of electronic device 100, wallet 110a initiates the reading process, working in conjunction with NFC device 200 to read data from the card according to the corresponding NFC communication protocol. Wallet 110a then adds the NFC card based on the read data. For example, when reading a bank card, it obtains information such as the issuing bank identifier and card number; when reading a public transport card, it obtains information such as the card balance and route information. When adding an NFC card, wallet 110a stores the NFC card information. Specifically, sensitive information such as card numbers can be stored in the security unit 204, while non-sensitive information may be stored in other local storage areas of the electronic device 100, and some card information can be backed up to a cloud server.
[0049] In some embodiments, when multiple NFC cards are added, wallet 110a can provide a user interface for users to manually set the card swiping order (also known as card sorting) to facilitate prioritizing the use of the card most suitable for the usage scenario when multiple NFC cards coexist. In some embodiments, wallet 110a can automatically adjust the card swiping order based on usage scenario and geographical location. When a user brings electronic device 100 close to NFC card reader 300, wallet 110a cooperates with NFC device 200 to attempt to swipe NFC cards in sequence according to a preset order or an automatically adjusted swiping order. Attempting to swipe NFC cards in sequence according to a manually set or automatically adjusted swiping order is called card-switching swiping. In some embodiments, wallet 110a can provide a user interface for users to manually select the target NFC card for swiping. For example, when a user selects a transportation card from transportation cards, bank cards, and access cards, NFC device 200 uses the transportation card to interact with NFC card reader 300 to swipe the transportation card.
[0050] When swiping a card using a card switching method or when the user selects a card method, there is a problem of long swiping times. Furthermore, user selection requires user intervention, which degrades the user experience of NFC cards. Additionally, when the user selects a card using the wallet 110a, the user interface needs to be displayed on the display unit 106, increasing the power consumption of the electronic device 100. Moreover, since the swiping process requires the wallet 110a's participation, it is impossible to swipe a card while the device is powered off. Especially given the wide variety of NFC card readers and the large number of NFC cards, users need to know the type of NFC card reader in advance and manually select the NFC card for swiping. Manually selecting an NFC card for swiping is relatively cumbersome and slow; for example, it can cause long queues at subway exit gates when there is a large flow of people, affecting efficiency.
[0051] When the NFC device 200 includes multiple NFC cards, the RF features of the NFC reader can be used to identify the reader and select the corresponding analog card for swiping. For example, if the reader is identified as a subway gate, a transportation card can be selected from analog cards such as mobile payment cards, access cards, and transportation cards for swiping. Typically, the RF features of the reader are pre-collected to form an RF feature template for RF reader identification. During the process of collecting the reader's RF features to form the RF feature template, minimizing user intervention and ensuring the accuracy of the RF feature template are particularly important.
[0052] Therefore, embodiments of this application provide an NFC card swiping method to at least partially reduce user involvement while ensuring the accuracy of the RF feature template. The NFC card swiping method of this application embodiment can be derived from, for example... Figure 1The NFC device 200 in the illustrated electronic device 100 is implemented, specifically by, for example, Figure 2 The NFC card swiping unit within the NFC controller 201 of the NFC device 200 shown is implemented. Please refer to... Figure 3 As shown, an NFC card swiping method according to one embodiment includes the following steps.
[0053] Step S301: When the NFC device is close to the NFC reader, the RF feature of the NFC reader is detected.
[0054] Various NFC cards use various NFC readers, and these readers possess various RF characteristics. RF characteristics can at least partially distinguish between different NFC readers and NFC cards. RF characteristics refer to the information about the NFC reader collected by the NFC device when it detects an approach, while the NFC device is in card emulation mode. The collection time is a silent collection period, meaning the NFC device does not interact with the NFC reader during this time. The collection time is typically between tens of milliseconds and 1 second, and can be configured based on actual card-swiping experience.
[0055] In some embodiments, the RF characteristics of an NFC reader include multi-dimensional information to identify the NFC reader from multiple perspectives. In some embodiments, the RF characteristics detected by the NFC device include card detection pulse information, transmission event sequence information, and transmission event timing information.
[0056] In some specific embodiments, in electronic device 100, the NFC controller 201 of NFC device 200 can monitor the RF characteristics of NFC reader 300. See also... Figure 1 and 2The NFC reader 300 operates in card detection mode. In card detection mode, the NFC reader 300 polls for the presence of an NFC card by periodically sending card detection pulse signals. Specifically, if an NFC card is nearby, the NFC reader 300 will detect the NFC card by weakening its transmitted signal due to detuning. After detecting detuning, the NFC reader wakes up to communicate with the NFC card. To reduce the power consumption of card detection, the card detection mode is usually Instantaneous Card Detection (ICD) mode, in which the NFC reader 300 periodically sends ICD pulse signals. In the electronic device 100, when the NFC device 200 is in card emulation mode, when the NFC device 200 enters the radio frequency field range of the NFC reader 300, the NFC antenna 203 of the NFC device 200 can sense the card detection pulse signal and convert the corresponding radio frequency signal into an electrical signal. The NFC controller 201 of the NFC device 200 can process this electrical signal and analyze the card detection pulse signal to obtain card detection pulse information. Specifically, the card detection pulse information may include the pulse interval and pulse width of the card detection pulse.
[0057] Furthermore, after detecting an NFC card, the NFC reader 300 enters polling mode from card detection mode. In polling mode, the NFC reader 300 attempts to identify and communicate with different types of NFC cards, including Type A, Type B, Type F, and Type V (ISO15693). In a typical polling cycle, the NFC reader 300 activates the radio frequency field (FON, also known as open field), then sends a specific command (CMD), and closes the radio frequency field (FOFF, also known as close field) after a certain period of time. If no NFC card response is detected, the NFC reader 300 repeats this process. In this specification, the open field, command sending, and close field are referred to as transmission events. Transmission events are sequential, and transmission events within a certain period of time form a transmission event sequence. In the electronic device 100, the NFC controller 201 of the NFC device 200 can detect the transmission events of the NFC reader 300 after entering polling mode from card detection mode to obtain transmission event sequence information. The transmitted event sequence information can be a command sequence including opening information, received commands, and closing information. In a specific implementation, the NFC controller 201 of the NFC device 200 can also encode the opening information, received commands, and closing information to obtain a command encoding sequence. Specifically, the command encoding sequence can be a quantized digital sequence, that is, the NFC controller 201 of the NFC device 200 encodes the opening information, received commands, and closing information into numbers respectively.
[0058] Furthermore, in the electronic device 100, the NFC controller 201 of the NFC device 200 can also detect the time intervals between the start, command, and stop events to generate transmission event timing information. The transmission event timing information includes the time intervals between transmission events, forming a time interval sequence comprising multiple time intervals. In some specific implementations, the NFC controller 201 of the NFC device 200 detects the timestamp of each transmission event, determines the time intervals between transmission events based on the timestamp of each transmission event, and obtains a time interval sequence.
[0059] In a typical implementation, in the electronic device 100, the NFC controller 201 of the NFC device 200 receives the ICD pulse signal sent by the NFC reader 300 and generates card detection pulse information including pulse width, pulse length, and interval. Subsequently, the controller 201 of the NFC device 200 detects transmission events and the timestamp of each transmission event after the NFC reader 300 detects an NFC card entering polling mode from ICD mode. It encodes the transmission events to obtain transmission event sequence information and determines the time interval between transmission events based on the timestamps, thus obtaining a time interval sequence. Specifically, the transmission event sequence information can be a command encoding sequence obtained by encoding opening information, received commands, and closing information. Specifically, the command encoding sequence can be a quantized digital sequence, and the encoding method can be based on the mapping relationship between transmission events and numbers, converting the opening information, received commands, and closing information into corresponding numbers.
[0060] Figure 4 This illustrates a typical transmission process, such as Figure 4 As shown, the transmission events include start information, received command (CMD), and stop information. The timing information on the reader's air interface includes the NFC reader 300's start timestamp (FON timestamp), guard time (GT) timestamp, received command timestamp (CMD timestamp), and stop timestamp (FOFF timestamp). After acquiring the corresponding timestamp information, the corresponding time interval sequence is obtained through the intervals between the timestamps.
[0061] Step S302: Determine if smart card selection is enabled. If smart card selection is not enabled, proceed to step S303. If smart card selection is enabled, proceed to step S304.
[0062] In this embodiment, smart card selection refers to the NFC device matching detected RF features with an RF feature template to select an NFC card from multiple NFC cards, and then using the selected NFC card for swiping. In this embodiment, the swiping process is divided into two stages: smart selection not enabled and smart card selection enabled. Specifically, when smart card selection is not enabled, an NFC card is selected for swiping based on card sorting. During this stage, the RF feature template is progressively entered, and then another NFC card is selected for swiping based on card sorting and the RF feature template. After smart card selection is enabled, swiping is performed based on the RF feature template and card switching. To integrate RF feature template entry with the swiping process, reducing user involvement in RF feature template entry while achieving a better swiping experience, in this embodiment, when smart card selection is not enabled, the swiping and RF feature template entry are performed using the method described later in step S303. After smart card selection is enabled, the swiping and RF feature template entry are performed using the method described later in step S304.
[0063] In some specific implementations, in the electronic device 100, the NFC controller 201 of the NFC device 200 determines whether smart card selection is enabled by using a smart card selection flag. Specifically, if the smart card selection flag is the first flag, it is determined that smart card selection is not enabled; if the smart card selection flag is the second flag, it is determined that smart card selection is enabled. Prior to this, the NFC device 200 can determine whether smart card selection is enabled. In some specific implementations, the NFC device 200 can determine whether smart card selection is enabled based on the card swiping history. If it is determined that smart card selection is enabled based on the card swiping history, the NFC device 200 can set the smart card selection flag to the second flag; if it is determined that smart card selection is not enabled based on the card swiping history, the NFC device 200 can set the smart card selection flag to the first flag. In specific implementations, the NFC device 200 can default to not enabling smart card selection, setting the smart card selection flag to the first flag by default. The NFC device 200 records the card swiping history and, when it is determined that smart card selection is not enabled based on the smart card selection flag, determines whether smart card selection is enabled based on the card swiping history. In some implementations, the NFC device 200 can determine whether to enable smart card selection based on the card swiping history when idle. In other implementations, the NFC device 200 can determine whether to enable smart card selection based on the card swiping history before or after each card swipe.
[0064] Step S303: Select an NFC card to swipe based on card sorting and RF feature template. When the selected NFC card is swiped successfully and it has no associated RF feature template, associate the detected RF feature with the RF feature template of the NFC card.
[0065] In some specific implementations, within the electronic device 100, the NFC device 200 can store RF feature templates associated with NFC cards. Specifically, the association between NFC cards and RF feature templates can be stored in the NFC device 200 or the electronic device 100. The NFC device 200 can use the first NFC card to swipe when no RF feature template associated with the first NFC card in the card sequence is stored. If the selected first NFC card is successfully swiped and has no associated RF feature template, the detected RF feature is associated with the RF feature template of that first NFC card. In some implementations, the NFC device 200 can prompt the user to select an NFC card if the first NFC card swipe fails. For example, this could be done through the user interface of a wallet application. Further, the NFC device 200 obtains the NFC card selected by the user and uses it to swipe. Since the user can usually select the correct NFC card, to improve efficiency, the NFC device 200 associates the detected RF feature with the RF feature template of that NFC card. The NFC device 200 can match detected RF features with the RF feature templates associated with the first N NFC cards in the card sorting when it stores RF feature templates associated with the first N NFC cards in the card sorting. If a match is successful, the first successfully matched NFC card in the card sorting is used for swiping. If all N NFC cards fail to match, the (N+1)th NFC card in the card sorting is used for swiping; where N is an integer greater than or equal to 1. When the selected (N+1)th NFC card is successfully swiped and has no associated RF feature template, the detected RF feature is associated with the RF feature template of the (N+1)th NFC card. In some implementations, the NFC device 200 can prompt the user to select an NFC card when the selected (N+1)th NFC card fails to swipe. For example, the user can be prompted to select an NFC card through the user interface of a wallet application. Further, the NFC device 200 obtains the NFC card selected by the user, swipes the user-selected NFC card, and associates the detected RF feature with the RF feature template of that NFC card.
[0066] In a specific implementation, in the electronic device 100, the wallet 110a can provide a user interface for the user to select an NFC card for swiping. After the user selects an NFC card through the user interface provided by the wallet 110a, the wallet 110a cooperates with the NFC device 200 to communicate with the NFC card reader 300. During this process, the NFC device 200 detects RF features. When the NFC card is successfully swiped, the detected RF features are associated with the NFC card and stored to obtain the RF feature template and its association with the NFC card.
[0067] In some specific implementations, in the electronic device 100, the NFC device 200 can update the RF feature template of the NFC card when the selected NFC card is successfully swiped and an associated RF feature template is found. As described in the previous embodiments, when the NFC device 200 has stored RF feature templates associated with the first N NFC cards in the card sorting, it can match the detected RF feature with the RF feature templates associated with the first N NFC cards in the card sorting; if a match is successful, the first successfully matched NFC card in the card sorting is used for swiping. If the selected NFC card is successfully swiped, the NFC device 200 can update the RF feature template of the NFC card. In specific implementations, the NFC device 200 can determine whether to add a new RF feature template based on the matching similarity between the detected RF feature and its matching RF feature template. If the matching similarity is less than a preset threshold, it indicates that the RF feature template matches the detected RF feature, and there is a difference between the two, indicating that the detected RF feature contains a new feature. The NFC device 200 can associate the detected RF feature with the NFC feature template of the NFC card.
[0068] Typical card swiping and RF feature template entry scenarios when smart card selection is not enabled, see reference. Figure 5 As shown, the user binds M NFC cards to the NFC device 200. The M NFC cards are ordered as Card 1, Card 2 to Card M.
[0069] Continue to refer to Figure 5As shown, in the initial stage, none of the M NFC cards are associated with an RF feature template, meaning no RF feature template associated with the NFC cards is stored. The NFC device 200 does not enable smart card selection by default, and the smart card selection flag is set to the first flag. When the NFC device 200 is near the NFC reader, it detects the RF feature of the NFC reader; the specific RF feature is described above in this manual. Based on the smart card selection flag, the NFC device 200 determines that smart card selection is not enabled and selects an NFC card to swipe based on the card order and RF feature template. The first NFC card in the card order (i.e., card 1) is not associated with an RF feature template. The NFC device 200 selects the first NFC card (i.e., card 1) to swipe. If the first NFC card (i.e., card 1) is swiped successfully, the NFC device 200 associates the detected RF feature with the RF feature template of that first NFC card (i.e., card 1). This completes the RF feature recording of the first NFC card. If the first NFC card (i.e., card 1) fails to swipe, the NFC device 200 can prompt the user to select an NFC card. The user can select the correct NFC card to swipe, which can be any NFC card from card 2 to card M. The NFC device 200 acquires the NFC card selected by the user, swipes the selected NFC card, and associates the detected RF feature with the RF feature template of the NFC card.
[0070] Continue to refer to Figure 5 As shown, when the first NFC card in the card sequence is associated with an RF feature template, and other NFC cards are not associated with RF feature templates, the NFC device 200 matches the detected RF feature with the RF feature template associated with the first NFC card (i.e., card 1). If the match is successful, the NFC device 200 uses the first NFC card to swipe. Optionally, when the first NFC card is successfully swiped, the NFC device 200 can update the RF feature template of the first NFC card. If the match fails, the NFC device 200 selects the second NFC card (i.e., card 2) in the card sequence to swipe. If the second NFC card is successfully swiped, the NFC device 200 associates the detected RF feature with the RF feature template of the second NFC card (i.e., card 2). This completes the RF feature template entry for the second NFC card. If the second NFC card (i.e., card 2) fails to swipe, the NFC device 200 can prompt the user to select an NFC card. The user can select the correct NFC card to swipe, which can typically be any NFC card from card 3 to card M, or card 1. The NFC device 200 acquires the NFC card selected by the user, swipes the NFC card using the user-selected NFC card, and associates the detected RF feature with the RF feature template of the NFC card.
[0071] Continue to refer to Figure 5 As shown, when the first and second NFC cards in the card sequence are associated with RF feature templates, and other NFC cards are not associated with RF feature templates, the NFC device 200 matches the detected RF features with the RF feature templates associated with the first NFC card (i.e., card 1) and the second NFC card (i.e., card 2). Once the first NFC card is successfully matched, the NFC device 200 uses the first NFC card to swipe. If the first NFC card fails to match but the second NFC card matches successfully, the NFC device 200 uses the second NFC card (i.e., card 2) to swipe. If both the first NFC card (i.e., card 1) and the second NFC card (i.e., card 2) fail to match, the NFC device 200 uses the third NFC card (i.e., card 3) in the card sequence to swipe. If the third NFC card is successfully swiped, the NFC device 200 associates the detected RF features with the RF feature template of the third NFC card (i.e., card 3). This completes the RF feature template entry for the third NFC card. If the third NFC card (i.e., card 3) fails to swipe, the NFC device 200 can prompt the user to select an NFC card. The user can select the correct NFC card to swipe, which can be any NFC card from card 4 to card M. The NFC device 200 acquires the NFC card selected by the user, swipes the NFC card using the selected NFC card, and associates the detected RF feature with the RF feature template of the NFC card.
[0072] When the first, second, and third NFC cards in the card sequence are associated with an RF feature template, and the other NFC cards are not associated with an RF feature template, the card swiping and RF feature template entry process follows the same logic. After multiple swipes with the NFC card reader, refer to... Figure 5 As shown, each NFC card can be associated with an RF signature template. This process allows for the association of RF signature templates with NFC cards without user intervention, and the user only needs to select the NFC card to swipe if the swipe fails.
[0073] When selecting an NFC card for swiping based on card sorting and RF feature template, if the swipe fails, the user needs to manually select the NFC card. In some specific implementations, to improve the user experience, smart card selection can be enabled based on the swipe history after multiple swipes. Specifically, considering that the number of RF feature template matches performed when selecting an NFC card based on card sorting and RF feature template is related to the number of associated RF feature templates, in the electronic device 100, the NFC device 200 can determine whether to enable smart card selection based on the total number of RF feature template matches performed. Specifically, if the total number of RF feature template matches reaches a preset number, smart card selection is enabled. Optionally, when enabling smart card selection, the NFC device 200 sets the smart card selection flag to a second flag. After determining that smart card selection is enabled based on the smart card selection flag, the NFC device 200 can perform swipes based on RF feature template and card switching.
[0074] In this embodiment, the NFC card may include cards with feedback and cards without feedback. For cards with feedback, the NFC device 200 can determine whether the NFC card swipe was successful based on the feedback from the NFC reader. In some specific implementations, in the electronic device 100, the NFC device 200 can determine whether the swipe was successful based on the feedback from the NFC reader. Specifically, when using a transit card, the transit card reader generally provides feedback such as fare deduction information, and the NFC device 200 can determine whether the swipe was successful based on the fare deduction information provided by the reader. For cards without feedback, the NFC device 200 cannot determine whether the NFC card swipe was successful based on the feedback from the NFC reader. Furthermore, in some specific implementations, in the electronic device 100, the NFC device 200 can determine whether to swipe the card again within a preset time. If no NFC card is used to swipe the card again within the preset time, the NFC card swipe is determined to be successful. This implementation is particularly suitable for access control cards. When using an access control card, the NFC device 200 generally cannot obtain feedback from the access control card reader, and therefore cannot determine whether the swipe was successful. Normally, when using an access card, the door opens automatically if the card is swiped successfully, and the user will not swipe the card again. Therefore, the success of the card swipe can be determined by checking whether the card is swiped again within a preset time.
[0075] Step S304: Swipe the card based on the RF feature template and card switching, and update the RF feature template of the NFC card when the detected RF feature matches the RF feature template of the NFC card.
[0076] In some specific implementations, in the electronic device 100, the NFC device 200 can match detected RF features with an RF feature template to select an NFC card from multiple NFC cards. If the selected NFC card is unique, it is used for swiping. If the selected NFC card is not unique, the NFC device 200 swipes the selected NFC card using a card switching method. If no NFC card is selected, multiple NFC cards are swiped using a card switching method. In some implementations, NFC cards can be swiped sequentially based on card order.
[0077] Considering that some NFC cards are not yet associated with RF feature templates when smart card selection is enabled, in some specific implementations, in electronic device 100, NFC device 200 can determine whether the NFC card swipe is successful based on feedback from the NFC reader during the card swipe process, when swiping the card using the card switching method, based on the feedback from the NFC reader. If the NFC card swipe is determined to be successful based on this feedback, the detected RF feature is associated with the RF feature template of the NFC card. This enables the recording of the RF feature template of the NFC card.
[0078] In this embodiment, the NFC card may include cards with feedback and cards without feedback. For cards with feedback, the NFC device 200 can determine whether the NFC card swipe was successful based on the feedback from the NFC reader. For cards without feedback, the NFC device 200 cannot determine whether the NFC card swipe was successful based on the feedback from the NFC reader. If all NFC cards are cards without feedback, the NFC device 200 cannot obtain feedback from the NFC reader. In some specific embodiments, when determining that the NFC card swipe failed or no feedback was obtained from the NFC reader based on this feedback, if the NFC device 200 detects an RF feature that fails to match the RF feature templates of all NFC cards, the NFC device 200 can prompt the user to associate the detected RF feature with the NFC card after swiping the card in a card switching mode. Furthermore, the NFC device 200 can associate the detected RF feature with the corresponding NFC card based on the user's input information.
[0079] In some implementations, in the electronic device 100, the NFC device 200 can determine whether to add a new RF feature template based on the matching similarity between the detected RF feature and its matching RF feature template. Specifically, if the matching similarity is less than a preset threshold, the detected RF feature is associated with the NFC feature template of the NFC card. For example, for a card reader with a variable time interval, if the command period sent by the card reader changes within a fixed RF acquisition time, a fixed RF feature template cannot cover all variable scenarios, resulting in mismatches. By using an update mechanism to enable an NFC card to support binding multiple RF feature templates, the probability of successful matching is significantly improved when traversing the RF feature templates because multiple RF feature templates with different time intervals are associated. If the matching similarity is greater than the preset threshold, it indicates that the detected RF feature is relatively similar to the RF feature template, and the detected RF feature has fewer new features compared to the RF feature template. Therefore, the NFC device 200 can ignore the detected RF feature and not update the RF feature template.
[0080] In some specific implementations, within the electronic device 100, the NFC device 200 can statistically analyze the matching status of each RF feature template with the detected RF feature. This matching status can include the latest time when the RF feature template and the detected RF feature are matched. The latest time is the last time the RF feature template and the detected RF feature were matched. Furthermore, the NFC device 200 can delete RF feature templates based on the matching status of each RF feature template. When an RF feature template does not match the detected RF feature for an extended period, it indicates that the NFC reader has updated the RF feature, or that the RF feature template was entered incorrectly. For example, when a user selects an NFC card for swiping, the detected RF feature is associated with the selected NFC card by default. If the user selects an incorrect NFC card, it will result in an incorrect RF feature template entry. This deletion mechanism can delete erroneous RF feature templates, thereby avoiding invalid RF feature template matching and wasted storage space. In a further specific implementation, within the electronic device 100, the NFC device 200 can delete the RF feature template whose latest time is furthest from the current time when the total number of associated RF feature templates exceeds a preset number. Therefore, the number of RF feature template matching attempts can be controlled to improve matching efficiency and avoid wasting storage space.
[0081] In some specific implementations, in electronic device 100, NFC device 200 can delete the RF feature template associated with the NFC card when the NFC card is deleted.
[0082] In some specific embodiments, each RF feature template may include, corresponding to the detected RF feature, card detection pulse information, transmission event sequence information, and transmission event timing information. In the electronic device 100, the RF feature template may be pre-stored in the NFC controller 201, security unit 204, and memory 102 of the NFC device 200; this embodiment does not limit this.
[0083] As a typical implementation method, such as Figure 6 As shown, the NFC controller 201 of the NFC device 200 matches the detected RF features with a preset RF feature template, including the following steps.
[0084] The detected card detection pulse information is matched with the card detection pulse information in the RF feature template (step S601). In this embodiment, the card detection pulse information is acquired earlier than the transmission event sequence information and the transmission event timing information, and the matching requires less computation. Matching the card detection pulse information first can improve the matching speed, thereby improving the speed of NFC card selection and reducing the time consumption of NFC card swiping.
[0085] In a specific implementation, the NFC controller 201 of the NFC device 200 matches the detected pulse width with the pulse width in the RF feature template to determine if the pulse widths match; it also matches the detected pulse interval with the pulse interval in the RF feature template to determine if the pulse intervals match. Further, based on the matching results of the pulse interval and pulse width, it determines whether the detected card detection pulse information matches the card detection pulse information in the RF feature template. Specifically, if both the pulse interval and pulse width match, then the detected card detection pulse information matches the card detection pulse information in the RF feature template.
[0086] If the detected card detection pulse information matches the card detection pulse information in the RF feature template, the detected transmission event sequence information is matched with the transmission event sequence information in the RF feature template (step S602). In this embodiment, if the transmission event sequence does not match, the detected RF feature does not match the RF feature template. By first matching the transmission event sequence information and then matching the transmission event timing information, unnecessary matching processes can be avoided, matching efficiency can be improved, matching time can be reduced, and thus the NFC card selection time can be reduced.
[0087] As a typical implementation, the NFC controller 201 of the NFC device 200 matches the detected transmission event sequence information with the transmission event sequence information in the RF feature template. This includes: calculating the cross-correlation between the detected transmission event sequence information and the transmission event sequence information in the RF feature template to obtain a first cross-correlation degree; if the calculated first cross-correlation degree is greater than or equal to a first threshold, then the detected transmission event sequence information matches the transmission event sequence information in the RF feature template. In a specific implementation, the detected command encoding sequence is matched with the command encoding sequence in the RF feature template; that is, based on the cross-correlation between the detected command encoding sequence and the command encoding sequence in the RF feature template, it is determined whether the two match.
[0088] If the detected transmission event sequence information matches the transmission event sequence information in the RF feature template, then the detected transmission event timing information is matched with the transmission event timing information in the RF feature template (step S603).
[0089] As a typical implementation, the NFC controller 201 of the NFC device 200 matches the detected transmission event timing information with the transmission event timing information in the RF feature template, including: calculating the cross-correlation between the detected transmission event timing information and the transmission event timing information in the RF feature template to obtain a second cross-correlation degree; if the calculated second cross-correlation degree is greater than or equal to a second threshold, then the detected transmission event timing information matches the transmission event timing information in the RF feature template.
[0090] If the detected transmission event timing information matches the transmission event timing information in the RF feature template, then the detected RF feature matches the RF feature template (step S604). If the detected RF feature matches the RF feature template, then the NFC card associated with the RF feature template is selected as the NFC card.
[0091] In some specific implementations, refer to Figure 6As shown, if any detected RF feature does not match the corresponding feature in the RF feature template, it is determined that the detected RF feature does not match the RF feature template (step S605), meaning that the NFC card associated with that RF feature template is not selected. Further, it is determined whether the matching termination condition has been met (step S606). If the matching termination condition has not been met, the detected RF feature is matched with the next RF feature template (step S607); if the matching termination condition has been met, the matching ends, and the card selection result is obtained. The card selection result can be zero, one, or multiple NFC cards. The matching termination condition can be that all RF feature templates have been matched. If the matching termination condition has not been met (i.e., not all RF feature templates have been matched), the next RF feature template is matched.
[0092] This application provides an NFC device that enables an NFC card swiping method. For example... Figure 7 As shown, the NFC device 400 may include: a detection module 401, used to detect the RF feature of the NFC card reader when the NFC device is near the NFC card reader; and a card swiping module 402, used to select an NFC card for swiping based on card sorting and RF feature template when smart card selection is not enabled based on card swiping history; when the selected NFC card is successfully swiped and has no associated RF feature template, the detected RF feature is associated with the RF feature template of the NFC card; when smart card selection is enabled based on card swiping history, card swiping is performed based on RF feature template and card switching, and the RF feature template of the NFC card is updated when the detected RF feature matches the RF feature template of the NFC card.
[0093] In some specific embodiments, the card swiping module 402 is also used to: prompt the user to select an NFC card when the selected NFC card fails to be swiped; obtain the NFC card selected by the user; swipe the card using the NFC card selected by the user, and associate the detected RF feature with the RF feature template of the NFC card.
[0094] In some specific embodiments, the card swiping module 402 is also used to: when swiping a card based on an RF feature template and card switching, during the card switching process, determine whether the NFC card swiping is successful based on the feedback from the NFC card reader during the card swiping process; if the NFC card swiping is successful based on the feedback, then associate the detected RF feature with the RF feature template of the NFC card.
[0095] In some specific implementations, the card swiping module 402 is also used to: when it is determined based on the feedback that the NFC card swiping has failed or no feedback has been obtained from the NFC card reader, if the detected RF feature fails to match the RF feature template of all NFC cards, after swiping the card in the card switching mode, prompt the user to associate the detected RF feature with the NFC card; and associate the detected RF feature with the corresponding NFC card according to the user's input information.
[0096] In some specific implementations, the card swiping module 402 selects an NFC card to swipe based on the card sorting and RF feature template. Specifically, this includes: when no RF feature template associated with the first NFC card in the card sorting is stored, using the first NFC card to swipe; when RF feature templates associated with the first N NFC cards in the card sorting are stored, matching the detected RF feature with the RF feature templates associated with the first N NFC cards; if the match is successful, using the first successfully matched NFC card in the card sorting to swipe; if all of the first N NFC cards fail to match, using the (N+1)th NFC card in the card sorting to swipe; where N is an integer greater than or equal to 1.
[0097] In some specific embodiments, the card swiping module 402 is also used to update the RF feature template of the NFC card when the selected NFC card is successfully swiped and has an associated RF feature template.
[0098] In some specific implementations, the card swiping module 402 performs card swiping based on RF feature templates and card switching, specifically including: matching the detected RF feature with the RF feature template to select an NFC card from the plurality of NFC cards; if the selected NFC card is unique, using the selected NFC card for card swiping; if the selected NFC card is not unique, using card switching to swipe the selected NFC card; if no NFC card is selected, using card switching to swipe the plurality of NFC cards.
[0099] In some specific implementations, the card swiping module 402 is also used to: determine whether to enable smart card selection based on the card swiping history, including: determining whether to enable smart card selection based on the total number of times RF feature template matching is performed; if the total number reaches a preset number, then smart card selection is enabled.
[0100] In some specific implementations, the card swiping module 402 updates the RF feature template of the NFC card, specifically including: determining whether to add a new RF feature template based on the matching similarity between the detected RF feature and its matching RF feature template; if the matching similarity is less than a preset threshold, then the detected RF feature is associated with the NFC feature template of the NFC card.
[0101] In some specific implementations, the card swiping module 402 is also used to: count the matching status of each RF feature template with the detected RF feature, the matching status including: the latest time when the RF feature template matches the detected RF feature; and delete the RF feature template based on the matching status of each RF feature template.
[0102] In some specific implementations, the card swiping module 402 deletes RF feature templates based on the matching of each RF feature template. Specifically, when the total number of associated RF feature templates is greater than a preset number, the RF feature template whose latest time is furthest from the current time is deleted.
[0103] In some specific implementations, the card swiping module 402 is also used to: delete the RF feature template associated with the NFC card when deleting the NFC card.
[0104] In some specific implementations, the card swiping module 402 is also used to determine whether the NFC card has been swiped successfully, specifically including: determining whether to swipe the card again within a preset time; if no NFC card is swiped again within the preset time, then determining that the NFC card swiping was successful; and / or determining whether the swiping was successful based on feedback from the NFC card reader.
[0105] In some specific embodiments, the detection module 401 and the card swiping module 402 can be implemented as computer program code, for example, by... Figure 2 The computer program code executed by the NFC controller 201 shown is implemented, for example, when executed by the processor of the NFC controller 201. Figure 3 The NFC card selection method is shown. In other embodiments, the detection module 401 and the card swiping module 402 can be implemented as an NFC controller 201 and a security unit 204, with the hardware and software code of the NFC controller 201 and the security unit 204 working together, for example... Figure 3 The NFC card swiping method is shown below.
[0106] This application also provides an electronic device, which includes a device body and a component disposed within the device body as described above. Figure 2 The NFC device 200 shown Figure 7The NFC device 400 shown is an example. Electronic devices can be, but are not limited to, weight scales, body fat scales, nutrition scales, infrared electronic thermometers, pulse oximeters, body composition analyzers, power banks, wireless chargers, fast chargers, car chargers, adapters, displays, USB (Universal Serial Bus) docking stations, styluses, true wireless earbuds, car infotainment screens, automobiles, smart wearable devices, mobile terminals, and smart home devices. Smart wearable devices include, but are not limited to, smartwatches, smart bracelets, and neck massagers. Mobile terminals include, but are not limited to, smartphones, laptops, tablets, and POS (point-of-sales) terminals. Smart home devices include, but are not limited to, smart sockets, smart rice cookers, smart robot vacuums, and smart lights. Electronic devices can be implemented as... Figure 1 The electronic device 100 shown.
[0107] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. Although this application has disclosed preferred embodiments as above, it is not intended to limit this application. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the technical solution of this application. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of this application without departing from the scope of the technical solution of this application shall still fall within the scope of the technical solution of this application.
Claims
1. A method for swiping a near-field communication (NFC) card, characterized in that, Applied to an electronic device including an NFC device, the NFC device being bound to multiple NFC cards, the card swiping method includes: When the NFC device is near the NFC reader, the RF signature of the NFC reader is detected; If smart card selection is not enabled based on card swiping history, an NFC card is selected for swiping based on card sorting and RF feature template; when the selected NFC card is successfully swiped and it has no associated RF feature template, the detected RF feature is associated with the RF feature template of that NFC card. If smart card selection is enabled based on card swiping history, card swiping is performed based on RF feature template and card switching, and the RF feature template of the NFC card is updated when the detected RF feature matches the RF feature template of the NFC card.
2. The card-swiping method as described in claim 1, characterized in that, Also includes: If the selected NFC card fails to be swiped, the user is prompted to select another NFC card. Obtain the NFC card selected by the user; The user swipes an NFC card selected by the user and associates the detected RF feature with the RF feature template of that NFC card.
3. The card-swiping method as described in claim 1, characterized in that, Also includes: When the selected NFC card is successfully swiped and has an associated RF feature template, update the RF feature template of the NFC card.
4. The card-swiping method as described in claim 1, characterized in that, Also includes: When swiping a card based on RF feature templates and card switching During the card swiping process using the card switching method, the success of the NFC card swiping is determined based on the feedback from the NFC card reader during the swiping process. If the NFC card is successfully swiped based on the feedback, the detected RF feature is associated with the RF feature template of the NFC card.
5. The card-swiping method as described in claim 4, characterized in that, If, based on the feedback, it is determined that the NFC card swipe failed or no feedback was received from the NFC reader, the following further applies: If the detected RF feature fails to match the RF feature templates of all NFC cards, after swiping the card in the card switching mode, the user will be prompted to associate the detected RF feature with the NFC card. Based on the user's input, the detected RF features are associated with the corresponding NFC card.
6. The card-swiping method as described in any one of claims 1 to 5, characterized in that, The step of selecting an NFC card for swiping based on card sorting and RF feature template includes: If no RF feature template associated with the first NFC card in the card sequence is stored, the first NFC card is used for swiping. When there are RF feature templates associated with the first N NFC cards in the card sorting, the detected RF feature is matched with the RF feature templates associated with the first N NFC cards; if the match is successful, the first NFC card in the card sorting that is successfully matched is used to swipe the card; if the first N NFC cards fail to match, the (N+1)th NFC card in the card sorting is used to swipe the card; where N is an integer greater than or equal to 1.
7. The card-swiping method according to any one of claims 1 to 5, characterized in that, The card swiping based on RF feature templates and card switching includes: The detected RF features are matched with RF feature templates to select an NFC card from the plurality of NFC cards; If the selected NFC card is unique, use the selected NFC card to swipe the card. If the selected NFC card is not unique, the selected NFC card will be swiped using the card switching method; If no NFC card is selected, the multiple NFC cards can be swiped using the card switching method.
8. The card-swiping method as described in any one of claims 1 to 5, characterized in that, The card-swiping method further includes: determining whether to enable smart card selection based on card-swiping history, including: Whether to enable smart card selection is determined based on the total number of RF feature template matching operations; If the total number of attempts reaches the preset number, then smart card selection will be enabled.
9. The card-swiping method as described in any one of claims 1 to 5, characterized in that, The updating of the RF feature template of the NFC card includes: Whether to add a new RF feature template is determined based on the matching similarity between the detected RF features and the feature templates that match them. If the matching similarity is less than a preset threshold, the detected RF feature is associated with the NFC feature template of the NFC card.
10. The card-swiping method according to any one of claims 1 to 5, characterized in that, Also includes: The matching results of each RF feature template and the detected RF features are statistically analyzed, including the latest time when the RF feature template and the detected RF features are matched; RF feature templates are deleted based on their matching results.
11. The card-swiping method as described in claim 10, characterized in that, RF feature templates are deleted based on their matching results, including: If the total number of associated RF feature templates exceeds a preset number, delete the RF feature template whose latest time is furthest from the current time.
12. The card-swiping method according to any one of claims 1 to 5, characterized in that, Also includes: When deleting an NFC card, the RF feature template associated with the NFC card is also deleted.
13. The card-swiping method according to any one of claims 1 to 5, characterized in that, To determine if an NFC card has been successfully swiped, the following steps are taken: Determine if the card is swiped again within a preset time. If no NFC card is swiped again within the preset time, the NFC card swipe is considered successful; and / or The success of the card swipe is determined based on the feedback from the NFC card reader.
14. A near-field communication (NFC) device, characterized in that, The NFC device is bound to multiple NFC cards, and the NFC device includes: The detection module is used to detect the RF feature of the NFC reader when the NFC device is near the NFC reader; The card swiping module is used to select an NFC card for swiping based on card sorting and RF feature template when smart card selection is not enabled based on card swiping history; when the selected NFC card is successfully swiped and has no associated RF feature template, the detected RF feature is associated with the RF feature template of the NFC card; after smart card selection is enabled based on card swiping history, card swiping is performed based on RF feature template and card switching, and when the detected RF feature matches the RF feature template of the NFC card, the RF feature template of the NFC card is updated.
15. An electronic device, characterized in that, Including the Near Field Communication (NFC) device as described in claim 14 above.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the card swiping method according to any one of claims 1 to 13.