NFC-based card-swiping methods, electronic devices, and storage media

By pre-storing the field signal characteristic information of cellular fences and NFC card readers in smartphones, the problem of card swiping failure caused by overlapping geofences is solved, achieving more efficient card selection and energy saving.

CN118214997BActive Publication Date: 2025-10-31HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211626977.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2025-10-31
Estimated Expiration
2042-12-16

AI Technical Summary

Technical Problem

When a smartphone uses NFC to swipe a card, overlapping geofences prevent the correct card from being automatically selected, causing the swipe to fail. Furthermore, acquiring geolocation information consumes a significant amount of power.

Method used

By pre-storing the correspondence between cellular fences, NFC card reader field signal feature information and cards, the system collects the NFC card reader field signal feature information for comparison and automatically selects the matching card.

Benefits of technology

It effectively solves the problem of card selection within overlapping fences, reduces the accuracy requirements of location information, reduces power consumption, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118214997B_ABST
    Figure CN118214997B_ABST
Patent Text Reader

Abstract

This application provides an NFC-based card-swiping method, electronic device, and storage medium, relating to the field of communication technology. It pre-stores cellular fence information, field signal characteristic information ("air fingerprint") of the NFC card reader, and the correspondence between cards. When the electronic device enters a fence with a number greater than or equal to one and the number of candidate cards is greater than or equal to two, it initiates information acquisition from the NFC card reader. When the electronic device approaches the NFC card reader, it acquires the "air fingerprint" and then searches for the card corresponding to that "air fingerprint" in the pre-stored correspondence, automatically selecting the matching card. This application uses cellular information for coarse positioning of the swipe point, then acquires and compares information from the NFC card reader, automatically selecting the matching card based on the comparison result to complete the swipe. Therefore, it can effectively solve the problem of card selection within overlapping fences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to an NFC-based card swiping method, electronic device, and storage medium. Background Technology

[0002] Near Field Communication (NFC) is a wireless technology that enables mobile electronic devices to interconnect and exchange information within a short range. NFC has been widely used in various devices. NFC-enabled smartphones, through inductive card readers, inductive cards, and peer-to-peer communication, enable mobile payments, transportation cards, and even door key functionality. This allows access cards to be copied into virtual NFC cards, which can then be used for authentication, providing convenience for mobile phone users.

[0003] Currently, smartphone NFC can emulate three main types of cards: bank cards, transportation cards, and access control cards, and supports multiple cards of each type. When using a phone's NFC function to swipe for public transportation or access control, the phone can determine if it has entered a specific geofence based on its current location information, automatically select the NFC virtual card corresponding to that geofence, and quickly complete the swipe.

[0004] However, using geolocation information for card selection can sometimes fail to automatically select the correct card. For example, transit card readers and access control card readers correspond to different geofences. When these two geofences are close to each other, they may overlap. If a user swipes their card within this overlapping area, the system will recommend both a transit card and an access card simultaneously, thus failing to automatically select the correct card and resulting in a failed swipe. Summary of the Invention

[0005] This application provides an NFC-based card-swiping method and electronic device, which solves the problem that when a mobile phone uses NFC to swipe a card in an overlapping area of ​​two geofences, the card cannot be automatically and accurately selected based on the geographical location information, resulting in card-swiping failure.

[0006] To achieve the above objectives, this application adopts the following technical solution:

[0007] Firstly, this application provides an NFC-based card-swiping method for use in electronic devices with NFC functionality. The electronic device has multiple cards bound to it, and these cards support NFC card-swiping functionality. The method includes:

[0008] The electronic device acquires the number of fences and the number of candidate cards. The number of fences is the total number of cell fences that the electronic device has currently entered, and the number of candidate cards is the total number of cards corresponding to the cell fences that the electronic device has currently entered. When the number of fences is greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, the electronic device initiates an information acquisition action on the NFC card reader. When the electronic device approaches or touches the first NFC card reader, the electronic device acquires the first field signal feature information corresponding to the first NFC card reader. The electronic device searches for the first card corresponding to the first field signal feature information in a pre-stored first data set. The first data set includes the identification information of the cell fence, the field signal feature information of the NFC card reader, and a one-to-one correspondence between cards. The one-to-one correspondence includes a first association relationship between the identification information of the first cell fence, the first card, and the first field signal feature information. The first card is one of the multiple cards. The electronic device uses the first card to swipe on the first NFC card reader.

[0009] The NFC-based card-swiping method provided in this application pre-stores the cellular fence, the field signal characteristic information ("air fingerprint") of the NFC card reader, and the correspondence between cards. When the electronic device enters a fence with a number greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, the information collection action of the NFC card reader is initiated. When the electronic device touches the NFC card reader, the "air fingerprint" of the NFC card reader is collected, and then the card corresponding to the "air fingerprint" is searched in the pre-stored correspondence, that is, the matching card is automatically selected. This application uses cellular information for coarse positioning of the card swiping point, then collects information from the NFC card reader and performs information comparison. Based on the comparison result, the matching card is automatically selected to complete the card swiping, thus effectively solving the problem of card selection within overlapping fences.

[0010] The electronic device being close to the first NFC card reader indicates that the distance between the electronic device and the first NFC card reader is less than or equal to a preset distance threshold.

[0011] It should be noted that when the electronic device initiates the information collection action of the NFC card reader, and the electronic device detects that the distance between the electronic device and the NFC card reader is less than or equal to a preset distance threshold, the electronic device collects the field signal characteristic information of the NFC card reader.

[0012] In one possible implementation, after the electronic device initiates the information collection action of the NFC card reader, the method further includes: when the electronic device approaches or touches the second NFC card reader, the electronic device acquires the second field signal feature information corresponding to the second NFC card reader; the electronic device searches for a second card corresponding to the second field signal feature information in the first data set; wherein the second card is a card different from the first card among the plurality of cards; the one-to-one correspondence also includes a second association relationship between the identification information of the first cell fence, the second card, and the second field signal feature information; the electronic device uses the second card to swipe on the second NFC card reader.

[0013] In one possible implementation, different types of NFC card readers correspond to different field signal characteristic information.

[0014] The field signal characteristic information includes: multiple polling commands sent by the NFC card reader, the sending period and closing period of the polling commands, and the time interval between the multiple polling commands; wherein the multiple polling commands include type A polling commands, type B polling commands, and / or type F polling commands.

[0015] Among them, different types of NFC card reader devices include company access control devices, subway card readers, residential access control devices, and bus card readers.

[0016] For example, the field signal characteristics of a company's access control equipment are different from those of a subway card reader.

[0017] In one possible implementation, the multiple cards include virtual transportation cards and virtual access control cards. For example, virtual transportation cards can be further divided into bus cards and subway cards, and virtual access control cards can include company access control cards and residential access control cards.

[0018] Taking a mobile phone as an example, the phone is linked to a company access card and a transportation card. Both cards support NFC card-swiping functionality. Assume there are pre-stored associations between CELL fence 1, the company access control device, and the company access card, as well as between CELL fence 1, the subway card reader, and the transportation card. This means that within a single CELL fence 1, there are two card-swiping points: the company access control device and the subway card reader. Correspondingly, CELL fence 1 corresponds to the company access card and the transportation card.

[0019] When a mobile phone enters the CELL fence 1, it can be determined that the number of fences the mobile phone has entered is 1 (i.e., CELL fence 1), and the number of candidate cards is 2 (i.e., company access card and transportation card). At this time, the information collection action of the NFC card reader is initiated.

[0020] When a mobile phone approaches the company's access control equipment, the phone collects the field signal characteristic information emitted by the equipment. After comparing the information, the phone can find the company access card that corresponds to the field signal characteristic information emitted by the equipment. The phone can then use the access card to swipe at the access control equipment.

[0021] When a mobile phone is brought close to a subway card reader, the phone collects the field signal characteristic information emitted by the subway card reader. After comparing the information, the phone can find the transportation card that corresponds to the field signal characteristic information emitted by the subway card reader, and then use the transportation card to swipe the card on the subway card reader.

[0022] Compared to related technologies that use GPS location information for card selection, the proposed solution can effectively reduce the accuracy requirements of location information, reduce power consumption, solve the problem of card selection within overlapping fences, and improve the user card simulation experience.

[0023] In one possible implementation, the identification information of the cellular fence is the cell ID corresponding to the cellular cell where the electronic device is located.

[0024] Each cell fence is identified and distinguished by its cell ID, and various NFC card readers are identified and distinguished by their "air fingerprint".

[0025] In one possible implementation, after the electronic device initiates the information collection action of the NFC card reader, the method further includes: when the number of fences acquired again is equal to 1 and the number of candidate cards acquired again is equal to 1, the electronic device stops the collection action of the NFC card reader; or, when the number of fences acquired again is equal to 0, the electronic device stops the collection action of the NFC card reader.

[0026] In one possible implementation, the method further includes: when the number of fences is equal to 1 and the number of candidate cards is equal to 1, when the electronic device approaches or touches the third NFC card reader, the electronic device acquires the identification information of the second cell fence where the electronic device is currently located; the electronic device searches for the third card corresponding to the identification information of the second cell fence in the first data set according to the identification information of the second cell fence; the electronic device uses the third card to swipe the card on the third NFC card reader.

[0027] It should be noted that when the number of fences is equal to 1 and the number of candidate cards is equal to 1, it indicates that the second cell fence corresponds to a type of NFC card reader and a card. Therefore, the card corresponding to the identification information of the second cell fence can be directly found in the first data set through the identification information of the second cell fence. In this case, the electronic device does not need to collect the field signal feature information of the NFC card reader or compare the field signal feature information.

[0028] In one possible implementation, the method further includes: when the number of fences is equal to 0, when the electronic device approaches or touches the fourth NFC card reader, the electronic device uses a system-preset card from the plurality of cards to swipe the card on the fourth NFC card reader.

[0029] In one possible implementation, the electronic device acquires the number of fences and the number of candidate cards by: the electronic device first acquiring the number of fences; and if the number of fences is greater than or equal to 1, the electronic device then acquires the number of candidate cards.

[0030] In one possible implementation, the method further includes: whenever the electronic device enters a new cell fence, incrementing the fence count by 1 to obtain an updated fence count; adding the number of cards corresponding to the new cell fence to the candidate card count to obtain an updated candidate card count; whenever the electronic device leaves a cell fence, decrementing the fence count by 1 to obtain an updated fence count; and subtracting the number of cards corresponding to the cell fence from the candidate card count to obtain an updated candidate card count.

[0031] In one possible implementation, the method further includes: when the electronic device enters the first cell fence and completes a preset number of card swipes on the first NFC card reader using the first card, the electronic device establishes the first association relationship based on the identification information of the first cell fence, the identification information of the first card, and the first field signal feature information of the first NFC card reader; the electronic device adds the first association relationship to the first data set.

[0032] The preset number of card swipes can be for the first card swipe or for the cumulative value after multiple card swipes that is greater than or equal to the preset number of swipes.

[0033] In one possible implementation, the method further includes: if the electronic device fails to find a card corresponding to the first field signal feature information, the electronic device uses a card preset by the system from the plurality of cards to swipe on the first NFC card reader.

[0034] In one possible implementation, the method further includes: if the electronic device does not find a card corresponding to the first field signal feature information, the electronic device prompts the user to select a card from the plurality of cards.

[0035] Wherein, the electronic device uses the first card to swipe the card on the first NFC card reader, including: in response to the user's operation of selecting the first card from the plurality of cards, the electronic device uses the first card to swipe the card on the first NFC card reader.

[0036] In one possible implementation, after the electronic device swipes the first card on the first NFC card reader in response to a user selecting the first card from the plurality of cards, the method further includes: the electronic device acquiring identification information of the first cell fence and collecting first field signal feature information of the first NFC card reader; the electronic device establishing the first association relationship based on the identification information of the first cell fence, the first field signal feature information, and the first card; and the electronic device adding the first association relationship to the first data set.

[0037] In one possible implementation, after the electronic device adds the first association to the first data set, the method further includes: the electronic device sending a first message to a server, the first message indicating that the first data set in the server be updated, the updated first data set including the first association.

[0038] In one possible implementation, the method further includes: the electronic device receiving an operation from a user to add the first card; and in response to the user's operation to add the first card, the electronic device binding the first card to the electronic device.

[0039] In one possible implementation, the method further includes: the electronic device receiving an operation from a user to delete the first card; in response to the user's operation to delete the first card, the electronic device performing the following operations:

[0040] Unbind the first card from the electronic device;

[0041] Iterate through all the association relationships recorded in the electronic device that correspond to the first card;

[0042] Delete all associations of the first card in the first data set;

[0043] A second message is sent to the server, the second message being used to instruct the server to update the first data set, the updated first data set not including all associations of the first card.

[0044] In one possible implementation, the electronic device acquires the first field signal feature information corresponding to the first NFC card reader, including: the electronic device receiving an NFC connection request signal broadcast by the first NFC card reader; and the electronic device acquiring the first field signal feature information based on the NFC connection request signal.

[0045] In one possible implementation, the electronic device uses the first card to swipe on the first NFC card reader, comprising: the electronic device sending an NFC connection response message to the first NFC card reader, the NFC connection response message including the identifier of the first card, the NFC connection response message being used to instruct the first NFC card reader to establish a connection with the first card; and, if the first NFC card reader establishes a connection with the first card, the electronic device uses the first card to swipe on the first NFC card reader.

[0046] Secondly, this application provides an NFC-based card-swiping device, which includes units for performing the method described in the first aspect above. This device can correspond to performing the method described in the first aspect above, and the relevant descriptions of the units in this device are provided in the description of the first aspect above; for the sake of brevity, they will not be repeated here.

[0047] The method described in the first aspect above can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, processing modules or units, communication modules or units, etc.

[0048] Thirdly, this application provides an electronic device in which a processor is coupled to a memory for storing computer programs or instructions, and the processor is configured to execute the computer programs or instructions stored in the memory, causing the method in the first aspect to be performed. For example, the processor is configured to execute the computer programs or instructions stored in the memory, causing the device to perform the method in the first aspect.

[0049] Fourthly, this application provides a computer-readable storage medium having a computer program (also referred to as instructions or code) stored thereon for implementing the method of the first aspect. For example, when the computer program is executed by a computer, it enables the computer to perform the method of the first aspect.

[0050] Fifthly, this application provides a chip including a processor. The processor is used to read and execute a computer program stored in a memory to perform the methods in the first aspect and any possible implementation thereof. Optionally, the chip further includes a memory connected to the processor via a circuit or wire.

[0051] Sixthly, this application provides a chip system including a processor. The processor is used to read and execute a computer program stored in a memory to perform the methods in the first aspect and any possible implementation thereof. Optionally, the chip system further includes a memory connected to the processor via a circuit or wire.

[0052] In a seventh aspect, this application provides a computer program product comprising a computer program (also referred to as instructions or code), which, when executed on an electronic device, causes the electronic device to implement the method of the first aspect.

[0053] It is understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0054] Figure 1 This is a schematic diagram of geofencing in related technologies;

[0055] Figure 2 This is a schematic diagram illustrating a scenario in related technologies where a mobile phone cannot select a card based on a geofence, resulting in a failed card swipe.

[0056] Figure 3 This is a schematic diagram of an interface in a related technology where a mobile phone fails to select a card based on a geofence, resulting in a card swipe failure.

[0057] Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application;

[0058] Figure 5 This application discloses a software architecture diagram of an electronic device. Figure 1 ;

[0059] Figure 6 This application discloses a software architecture diagram of an electronic device. Figure 2 ;

[0060] Figure 7This is a schematic diagram of a cellular fence disclosed in an embodiment of this application;

[0061] Figure 8 This is a schematic diagram of the NFC card reader transmitting field signals in the NFC-based card swiping method disclosed in the embodiments of this application;

[0062] Figure 9 This is a schematic diagram of the field signal characteristic information of the NFC card reader in the NFC-based card swiping method disclosed in this application. Figure 1 ;

[0063] Figure 10 This is a schematic diagram of the field signal characteristic information of the NFC card reader in the NFC-based card swiping method disclosed in this application. Figure 2 ;

[0064] Figure 11 This is a schematic diagram of the card already bound in the wallet APP in the NFC-based card swiping method disclosed in the embodiments of this application;

[0065] Figure 12 This is a flowchart illustrating the NFC-based card-swiping method disclosed in an embodiment of this application. Figure 1 ;

[0066] Figure 13 This is a flowchart illustrating the NFC-based card-swiping method disclosed in an embodiment of this application. Figure 2 ;

[0067] Figure 14 This is a schematic diagram illustrating the first NFC card reader establishing a connection with a mobile phone and completing the card swiping process in the NFC-based card swiping method disclosed in this application embodiment;

[0068] Figure 15 This is a schematic diagram illustrating the association between the CELL fence, the NFC card reader, and the card in the NFC-based card swiping method disclosed in the embodiments of this application.

[0069] Figure 16 This is a schematic diagram illustrating an application scenario of the NFC-based card-swiping method disclosed in the embodiments of this application;

[0070] Figure 17 This describes the various functional modules involved in the embodiments of this application and the process of interaction between these functional modules;

[0071] Figure 18 This is a schematic diagram of the CELL fence and card reader "fingerprint" creation process in the NFC-based card swiping method disclosed in the embodiments of this application;

[0072] Figure 19This is a schematic diagram of the process of deleting all fences and card reader "fingerprint" information created by the card after receiving the card deletion instruction from the wallet APP in the NFC-based card swiping method disclosed in the embodiments of this application.

[0073] Figure 20 This is a schematic diagram of the fence event management process in the NFC-based card swiping method disclosed in the embodiments of this application;

[0074] Figure 21 This is a schematic diagram of the automatic card selection process after the fence event management is completed in the NFC-based card swiping method disclosed in the embodiments of this application;

[0075] Figure 22 This is a schematic diagram of the processing flow related to the CELL fence and the card reader "fingerprint" database in the NFC-based card swiping method disclosed in the embodiments of this application;

[0076] Figure 23 This is a schematic diagram of the structure of the NFC-based card reader disclosed in an embodiment of this application. Detailed Implementation

[0077] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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 some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0078] In this article, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.

[0079] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. In the description of embodiments in this application, unless otherwise stated, "multiple" means two or more; for example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.

[0080] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0081] Geofencing is a location-based service (LBS) that uses a virtual fence to enclose a geographic area with virtual boundaries; that is, this virtual boundary defines a specific geographic area. The closer the geographic area indicated by the geofence is to the real-world location, the more accurate the indication of the real-world scene. Geofencing can be circular, polygonal, or irregular in shape; this application embodiment does not impose any limitations. In this application embodiment, geofencing is a geographic area centered on a specific location, or a geographic area containing a specific location or place. These locations or places can be companies, subway stations, users' homes, shopping malls, or schools, etc.

[0082] With the increasing popularity of smartphones and the rapid development of communication technology, Near Field Communication (NFC) technology is now widely used in daily life. For example, NFC card readers are commonly installed in access control systems on buses, subway stations, and in companies or homes. Users can use NFC-enabled phones to unlock doors or make mobile payments when taking public transportation. For instance, users can activate their phone's NFC transit card function and tap it against an NFC-enabled card reader on a bus to complete the ride. Similarly, users can activate their phone's NFC access card function and tap it against an NFC-enabled card reader at their door to complete access control transactions. Smart terminals integrating NFC bring great convenience to users' travel and payment needs.

[0083] Considering the geofencing mentioned above, such as Figure 1 As shown, the coverage area of ​​a geofence includes a geographical area within a certain radius centered on the card reader (e.g., a transit card reader or an access control card reader). For example, taking a mobile phone with NFC functionality linked to a transit card and an access control card as an example, a geofence (geofence 1) will be set up for areas where access control cards are swiped via NFC; a geofence (geofence 2) will be set up for areas where transit cards are swiped via NFC. As shown in Table 1 below, the electronic device will pre-store the following correspondence: geofence 1 corresponds to the access control card, and geofence 2 corresponds to the transit card.

[0084] Table 1

[0085] Geofencing Cards recommended based on geofencing Geographic Fence 1 Access Card Geofencing 2 Transportation card

[0086] Based on Table 1 above, when using a mobile phone's NFC function to swipe for public transportation or access control, the phone's current location information can determine if it has entered a specific geofence. The system will then automatically select the NFC virtual card corresponding to that geofence and quickly complete the swipe. In other words, when a user enters the geofence-indicated area and approaches the NFC reader, the phone will automatically select the card corresponding to that swipe location and complete the transaction. This allows for automatic selection of the NFC virtual card using location information, avoiding manual intervention and improving the swipe experience.

[0087] However, using location information for card selection on a mobile phone can lead to problems such as the phone failing to automatically select the correct card and excessive battery drain, resulting in a poor overall user experience. For example, such as Figure 2 As shown, when the card reader for transportation and the card reader for access control are close to each other, geofence 1 and geofence 2 will have overlapping areas. When the card reader for access control and the card reader for transportation are located in this overlapping area, the mobile phone cannot automatically select the correct card.

[0088] This is because the mobile phone determines that the current card swiping point is in both geofence 1 and geofence 2 based on the mobile phone location information. Based on Table 1 above, after entering geofence 1, an access card will be recommended, and after entering geofence 2, a transportation card will be recommended. After entering the overlapping area of ​​geofence 1 and geofence 2, both access card and transportation card will be recommended at the same time. Therefore, it is impossible to automatically select the card based on the geographical location information, resulting in card swiping failure.

[0089] For example, taking swiping a card to pay for public transport as an example, such as Figure 3 As shown in (a), the NFC icon is displayed in the phone's status bar, indicating that the phone has NFC enabled, and the phone prompts the user to bring the back of the phone close to the card reader. Figure 3 As shown in (b), when a user brings the back of their phone close to the NFC card reader on a bus, the phone's location information indicates that it is within the overlapping area of ​​geofence 1 and geofence 2. In this case, the phone cannot automatically select the correct card based on the location information, resulting in a card-swiping failure. For example, the phone may display the message: "Card swipe failed. Please bring the phone close to the swipe area again."

[0090] Furthermore, when using the phone's NFC function to swipe for public transportation or access control, the phone constantly obtains its current location information, which consumes a lot of power and reduces the phone's standby time.

[0091] In view of the above problems, this application provides an NFC-based card-swiping method and electronic device, which improves the user experience by making improvements at the system level of the electronic device. This method can solve the problem that when an electronic device swipes a card using NFC, it cannot automatically and accurately select the card based on geographical location information, leading to card-swiping failure.

[0092] In this embodiment, the field signal characteristic information ("air interface fingerprint") of the cellular fence, the NFC card reader, and the correspondence between cards are pre-stored. When the electronic device enters a fence with a number greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, the information collection action of the NFC card reader is initiated. When the electronic device approaches the NFC card reader, the "air interface fingerprint" is collected, and then the card corresponding to the "air interface fingerprint" is searched in the pre-stored correspondence, that is, the matching card is automatically selected. This application uses cellular information for coarse positioning of the card swiping point, then collects information from the NFC card reader and performs information comparison. Based on the comparison result, the matching card is automatically selected to complete the card swiping, thus effectively solving the problem of card selection within overlapping fences.

[0093] The NFC-based card-swiping method provided in this application can be applied to various electronic devices with NFC functionality. In some embodiments, the electronic device can be a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) device, virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), or smart screen, or other terminal devices with display capabilities, or other devices or apparatuses capable of displaying cards. This application does not impose any limitations on the specific type of electronic device.

[0094] Taking mobile phones as an example, Figure 4 A schematic diagram of the hardware structure of a mobile phone provided in an embodiment of this application is shown.

[0095] like Figure 4As shown, a mobile phone may include: a processor 110, an external memory interface 120, an internal memory 121, a 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, a headphone jack 170D, a sensor module 180, buttons 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, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, and a bone conduction sensor 180M, etc.

[0096] Processor 110 may include one or more processing units, such as a central processing unit (CPU), an image signal processor (ISP), a digital signal processor (DSP), a video codec, a neural network processing unit (NPU), a graphics processing unit (GPU), an application processor (AP), and / or a modem processor. In some embodiments, different processing units may be independent devices or integrated into one or more processors.

[0097] The CPU is the final execution unit for information processing and program execution. Its main tasks include processing instructions, executing operations, controlling timing, and processing data. The CPU may include a controller, an arithmetic logic unit (ALU), a cache memory, and a bus for connecting these components. The controller can be the nerve center and command center of the mobile phone. Based on the instruction opcode and timing signals, the controller generates operation control signals to control instruction fetching and execution.

[0098] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0099] The wireless communication function of a mobile phone can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. Among them, antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0100] The mobile communication module 150 can provide solutions for wireless communication applications in mobile phones, including 2G / 3G / 4G / 5G. The mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. In some embodiments, the mobile communication module 150 can receive electromagnetic waves from other devices via antenna 1, and perform filtering, amplification, and other processing on the electromagnetic waves before transmitting them to a modem processor for demodulation.

[0101] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device or displays an image or video through a display screen 194.

[0102] The wireless communication module 160 can provide solutions for wireless communication applications in mobile phones, including wireless local area networks (WLAN) (such as Wi-Fi), Bluetooth, global navigation satellite system (GNSS), FM, NFC, and infrared (IR) technology. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. In some embodiments, the wireless communication module 160, based on GNSS, receives electromagnetic waves from the communication device via antenna 2, and performs frequency modulation and filtering of the electromagnetic wave signals to obtain the mobile phone's location information.

[0103] In some embodiments, antenna 1 of the mobile phone is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling the mobile phone to communicate with networks and other devices via wireless communication technology. Wireless communication technologies 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 technologies. GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), BeiDou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), and / or Satellite Based Augmentation Systems (SBAS).

[0104] In this embodiment, NFC card readers are typically installed in access control systems on buses, subway stations, or in companies or homes. These NFC card readers periodically broadcast signals with different characteristic information. The characteristic information of the signals broadcast by the NFC card reader can be figuratively called the "air fingerprint" or "fingerprint" of the NFC card reader. After the NFC function of the electronic device is enabled, the NFC device of the electronic device will collect the "fingerprint" of the NFC card reader.

[0105] The mobile phone implements its display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0106] Display screen 194 is used to display images and videos, such as display cards. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.

[0107] In some embodiments, a mobile phone may include one or N displays 194, where N is a positive integer greater than 1.

[0108] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the phone's storage capacity. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, user behavior data can be stored on the external storage card.

[0109] Internal memory 121 can be used to store computer executable program code, including instructions. Processor 110 executes various mobile phone functions and data processing by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application (APP) required for a function (such as a desktop APP and a payment APP), etc. The data storage area may store data created during mobile phone use (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0110] In some embodiments, the external memory interface 120 or the internal memory 121 may store a database that includes the correspondence between cell fences and NFC card readers and cards. Each cell fence is identified and distinguished by a cell ID, and each NFC card reader is identified and distinguished by an "air-to-ground fingerprint".

[0111] In addition, the external memory interface 120 or the internal memory 121 can also be used to store the CELL fence information that the electronic device has entered and the "air interface fingerprint" of the NFC card reader collected by the NFC hardware of the electronic device.

[0112] The above is a detailed description of the embodiments of this application using electronic device 100 as an example. It should be understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on electronic device 100. Electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations. The various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0113] The software system of an electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application uses the layered architecture Android system as an example to exemplify the software structure of an electronic device.

[0114] Figure 5 This is a schematic diagram of the software structure of an electronic device according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the software layers of the Android system are divided from top to bottom as follows: application layer, framework layer (FWK), library layer (FWK LIB), and kernel layer.

[0115] The application layer can include a series of application packages, such as desktop applications, payment applications, emotion-sensing modules, business logic processing modules, and business presentation modules. When these application packages are run, they can access the various service modules provided by the application framework layer through application programming interfaces (APIs) and execute corresponding intelligent business operations.

[0116] The desktop application can be used to display the desktop, such as application icons, desktop background, status bar, and notification bar. Additionally, the desktop application can also be used to display or remove cards based on instructions from the business presentation module.

[0117] Payment applications, such as wallet apps, can be used to bind various analog cards. These analog cards enable contactless card swiping via NFC. Examples of analog cards include transit cards for subway rides, transit cards for bus rides, and access control cards for unlocking doors. This allows users to make quick payments when swiping their cards to ride public transportation, and to authenticate their identity and unlock doors when swiping their cards at access control points.

[0118] The context-aware module operates either resident or in low-power mode, possessing the ability to perceive external facts or the environment. When the card reminder service is enabled, the context-aware module monitors capabilities or events (such as specific times, locations, or events) registered by the business logic processing module. If a user triggers one of these capabilities or events, the context-aware module sends a notification to the business logic processing module. Furthermore, the context-aware module can also detect relevant events and obtain event status from other applications at the application layer, application framework layer, system layer, or kernel layer via APIs, such as detecting Bluetooth connections, network connections, monitoring user SMS messages, and customizing timers.

[0119] For example, the context-aware module can detect whether a user has entered a cell fence. For instance, the context-aware module can detect whether an electronic device has entered a cell fence based on the base station information of the cell the electronic device is currently camped on.

[0120] The business logic processing module, also known as the computing engine or brain, has business logic processing capabilities. It enables the selection of the appropriate card from multiple cards already bound to the phone when swiping a card on an NFC card reader. For example, when the business logic processing module receives a notification from the context awareness module indicating that a certain event has been detected (e.g., the phone has entered a cellular fence, and the number of card reader "fingerprints" entering the cellular fence is greater than one), it can perform card reader "fingerprint" collection and matching according to logic, select the card corresponding to the card reader "fingerprint" from multiple cards for swiping, and send commands to the business presentation module (such as YOYO suggestions) to display the selected card or a message indicating successful card swipe.

[0121] The service presentation module, also known as YOYO suggestion, is used to display selected cards on the screen of electronic devices. For example, the service presentation module can receive a command from the business logic processing module to display a reminder of the selected card and then show that selected card to the user. The service presentation module can also display information such as whether the NFC card swipe was successful or failed.

[0122] The framework layer provides application processing (AP) and programming frameworks for applications in the application layer. The application framework layer includes predefined functions. For example, the framework layer may include a window manager and a perception management service.

[0123] The window manager manages window applications. It can obtain screen size, determine the presence of a status bar, lock the screen, and capture screenshots. The context management service provides APIs for processing time and location information to the application layer, such as obtaining the time and location information of electronic devices, and APIs for geofencing processing to the context-aware module, such as determining whether an electronic device has entered or left a geofence.

[0124] The library layer includes system libraries and the Android runtime. System libraries can include multiple functional modules, such as the surface manager. The Android runtime is responsible for the scheduling and management of the Android system, including the core libraries and the virtual machine. The core libraries consist of two parts: one part contains the functionalities that Java needs to call, and the other part is the core Android library itself. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer into binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0125] The kernel layer is the interface layer between hardware and software. The kernel layer can include mobile communication drivers, Wi-Fi drivers, GNSS drivers, display drivers, and sensor drivers, among others.

[0126] To reduce processor usage and thus lower power consumption of the electronic device, in conjunction with the above software architecture diagram, a sensor hub, i.e., a coprocessor, can also be configured in the hardware layer of the electronic device in this embodiment. A sensor hub is a chip with certain processing capabilities and low power consumption, which can be used to handle simple tasks.

[0127] In some embodiments, the sensor hub can be connected to the hardware layer of an electronic device and, for example, ... Figure 4 The mobile communication module 150 and the wireless communication module 160 shown are connected to each other.

[0128] For example, Figure 6 This is a schematic diagram of a sensor hub provided in an embodiment of this application. Figure 6As shown, the sensor hub can acquire base station signals (such as 5G signals), Bluetooth signals, Wi-Fi signals, GPS signals, and NFC signals from the mobile communication module 150 and the wireless communication module 160 (such as Bluetooth module, Wi-Fi module, GPS module, and NFC module). The sensor hub can also be used to receive and store established fences, such as cell fences.

[0129] It should be noted that although the embodiments of this application are described using the Android system as an example, the basic principles are also applicable to electronic devices based on operating systems such as iOS or Windows.

[0130] The execution entity of the NFC-based card-swiping method provided in this application embodiment can be the aforementioned electronic device, or a functional module and / or functional entity (such as a processor) within the electronic device capable of implementing the NFC-based card-swiping method. Furthermore, the solution of this application can be implemented through hardware and / or software, and this application does not limit its implementation in this regard. This method can be executed by an electronic device. The hardware structure diagram of the electronic device can be as follows: Figure 4 As shown, the software structure block diagram of an electronic device can be as follows: Figure 5 As shown, the embodiments of this application are not limited thereto.

[0131] First, a comparison and explanation of the relevant technologies and the solution in this application will be provided.

[0132] Related technology: This technology uses the Global Positioning System (GPS) to determine the geographical location of electronic devices, thus locating them. When a user swipes a card at a certain location, the electronic device establishes a geofence centered on that location. Correspondingly, the electronic device stores the correspondence between the swiped card and this geofence. In practical applications, the card selection method is as follows: the electronic device determines whether it is within the geofence based on its GPS-determined geographical location, and then selects the card corresponding to that geofence for swiping.

[0133] When an electronic device is linked to multiple cards, each card corresponds to a geofence. For example, a company access card corresponds to one geofence, a residential access card to another, and a transportation card may correspond to one or more geofences. In this case, the card selection process is as follows: the electronic device determines its geographical location based on GPS, identifies which geofence it is within, and then selects the card corresponding to that geofence for swiping. As mentioned above, there may be cases where two geofences overlap. When a user swipes their card in an overlapping area, the electronic device, based on its GPS location, is within both geofences. Since each geofence corresponds to one card, the electronic device will recommend two cards based on these two geofences, failing to select the correct card, resulting in a card selection failure and ultimately a card swipe failure.

[0134] This application's solution: This application uses the cellular information of the base station communicating with the electronic device (i.e., the relevant information of the base station where the electronic device resides) to determine the geographical location of the electronic device, thereby locating the electronic device. When a user swipes a card at a certain location, the electronic device establishes a cellular fence centered on that location and collects the field signal feature information emitted by the NFC card reader. Accordingly, the electronic device stores the following correspondence or association: the correspondence between the card swiped, the cellular fence, and the field signal feature information of the NFC card reader (referred to as the first association). In practical applications, the card selection method is as follows: when it is determined that the electronic device has entered one or more cellular fences and the number of candidate cards is greater than or equal to 2, the information collection action of the NFC card reader can be initiated; when the electronic device approaches the NFC card reader, the field signal feature information emitted by the NFC card reader is collected, then the first association is checked and the information is compared, and the card corresponding to the field signal feature information emitted by the NFC card reader is selected for swiping.

[0135] When an electronic device is bound to multiple cards, a single cell fence can correspond to the field signal characteristics of multiple cards and multiple NFC card readers. Furthermore, a single card can be uniquely identified using the field signal characteristics of both a cell fence and an NFC card reader. For example, a company access card corresponds to one cell fence, and a transportation card also corresponds to the same cell fence. However, the field signal characteristics of the NFC card reader corresponding to the company access card are different from those of the NFC card reader corresponding to the transportation card. In this case, the card selection method is as follows: the electronic device determines which cell fence it is within based on the information of the base station it is registered with, collects the field signal characteristics emitted by the NFC card reader during the card swipe, and then checks the first association relationship to determine the card corresponding to that cell fence and the field signal characteristics emitted by that NFC card reader. The correct card is then swiped, thus accurately selecting the correct card for the transaction.

[0136] The following description, in conjunction with the accompanying drawings, illustrates the NFC-based card-swiping method provided in this application through Embodiment 1 and Embodiment 2.

[0137] Example 1

[0138] In Embodiment 1, an example is given to illustrate when and how a cellular fence is established in this application embodiment, as well as the process of establishing an association based on the cellular fence, the card, and the NFC card reader (also known as a card reader, card reader, card swipe or card swipe).

[0139] First, let's explain the fencing for honeycomb communities.

[0140] In this embodiment of the application, a fence can be determined based on the cellular information of the electronic device, for example... Figure 7 As shown, the area within the range of the base station in the cell where the electronic device is camped is called a cell fence, also known as a CELL fence. The coverage area of ​​a cell fence is the signal coverage area of ​​the cell where the electronic device camps.

[0141] Electronic devices possess multi-mode (e.g., 2G, 3G, 4G, and 5G) communication capabilities. They can uniquely identify the physical base station with which they are currently communicating through a cellular identifier (ID), such as a CELL ID. By using the CELL ID of the cell they reside in, the electronic device can determine the signal coverage area of ​​the base station. As mentioned above, the coverage area of ​​a cellular fence is the signal coverage area of ​​the cell where the electronic device resides.

[0142] In this embodiment, the electronic device can monitor cell fences. To save power, communication systems support discontinuous reception (DRX), meaning that cell fences can be monitored according to the DRX cycle. For example, the current maximum DRX cycle is 5.12 seconds. Since the electronic device periodically monitors the cell ID of the cell it is residing in, which is a necessary process for mobile communication, the power consumption of monitoring cell fences in this application is no additional compared to the power consumption of continuously acquiring location information in the aforementioned LBS service.

[0143] Next, we will explain NFC card reader devices.

[0144] In this embodiment, the NFC card reader may include NFC-enabled card readers on buses, NFC-enabled card readers at subway station turnstiles, NFC-enabled access control devices for companies, and / or NFC-enabled residential access control devices. It should be noted that the NFC card reader described here is exemplary; it is understood that in actual implementation, the NFC card reader may also be used in other locations, and this embodiment does not limit this.

[0145] It should be noted that NFC card readers can use specific field signal characteristics for characterization. In practical implementation, such as... Figure 8 As shown, the NFC reader continuously transmits field signals. When a mobile phone is near the NFC reader, it can receive these field signals. It should be noted that different types of NFC readers transmit field signals with different polling signal characteristics. The field signal characteristic information of an NFC reader can include: the polling commands sent by the NFC reader, the sending and closing cycles of the polling commands, and the time interval between different polling commands; wherein, the different polling commands include polling commands corresponding to type A (denoted as REQA), polling commands corresponding to type B (denoted as REQB), and / or polling commands corresponding to type F (denoted as SENSF). The three near-field communication types—type A, type B, and type F—can be distinguished based on the polling commands sent by the NFC reader.

[0146] For example, such as Figure 9As shown, the NFC reader sends polling commands such as REQA, REQB, and SENSF sequentially within one transmission cycle. Specifically, REQA is sent after a 5ms interval, followed by REQB after a 15ms interval, then SENSF after a 10ms interval, and this cycle ends after another 10ms. The next polling command cycle begins after a 50ms interval. The time interval between REQA and REQB is 15ms, the time interval between REQB and SENSF is 10ms, the transmission cycle is 40ms, and the shutdown cycle is 50ms.

[0147] For example, Figure 10 The diagram illustrates the field signal characteristics of the company's access control equipment, the residential access control equipment, and the subway card reader. Because the company's access control equipment, the residential access control equipment, and the subway card reader are different types of NFC card readers, their respective field signal characteristics differ.

[0148] In this embodiment, different types of NFC card readers can be distinguished by the characteristic information of the field signal emitted by the NFC card reader. In other words, different types of NFC card readers correspond to different field signal characteristic information. For example, as shown in Table 2, the field signal characteristic information corresponding to the company access control device is characteristic information 1, the field signal characteristic information corresponding to the subway card reader is characteristic information 2, the field signal characteristic information corresponding to the residential access control device is characteristic information 3, and the field signal characteristic information corresponding to the bus card reader is characteristic information 4.

[0149] Table 2

[0150] NFC card reader Field signal characteristic information Company access control equipment Feature Information 1 subway card reader Feature Information 2 Residential access control equipment Feature Information 3 Bus card reader Feature Information 4

[0151] It should be noted that the field signal characteristic information corresponding to subway card readers and bus card readers can be the same or different. Specifically, if the field signal characteristic information corresponding to subway card readers and bus card readers is the same, the same transportation card will be used for both. If the field signal characteristic information corresponding to subway card readers and bus card readers is different, different transportation cards will be used for both.

[0152] It should be noted that electronic devices can use a counter to accumulate the number of cells that have entered the fencing.

[0153] The following describes the cards that support NFC card swiping functionality in the embodiments of this application.

[0154] In this embodiment, the NFC-based card-swiping method is applied to an electronic device with NFC functionality. This electronic device is bound to multiple cards, and these cards support NFC card-swiping. For example, the multiple cards may include at least one virtual transportation card and at least one virtual access control card. For instance, the multiple cards may include a company access control card, a residential access control card, and a transportation card.

[0155] In this embodiment, the correspondence between cards and NFC card readers can be obtained based on historical card-swiping data of electronic devices. As shown in Table 3 below, the card corresponding to the company access control device is the company access control card, the card corresponding to the subway card reader is the bus card, the card corresponding to the residential access control device is the residential access control card, and the card corresponding to the bus card reader is the transportation card.

[0156] Table 3

[0157]

[0158] It should be noted that Table 3 above shows multiple correspondences between cell fences, NFC readers, and cards. Each correspondence includes the CELL ID representing the cell fence, the field signal characteristic information corresponding to the NFC reader, the corresponding card, and the number of candidate cards. Electronic devices can store the correspondences between cell fences, NFC readers, and cards in their local database, or they can upload these correspondences to a cloud server for storage.

[0159] In this embodiment of the application, the candidate list of the card reader field signal corresponding to CELL ID 1 includes feature information 1 and feature information 2. The candidate list of the card reader field signal corresponding to CELL ID 2 includes feature information 3 and feature information 4.

[0160] In this embodiment, the wallet app of the electronic device can provide functions for adding and setting cards. Users can make settings in the wallet app interface according to their actual needs.

[0161] For example, taking a mobile phone as an electronic device, such as Figure 11 As shown, in the wallet app interface of the phone, the user manually added a company access card, a residential access card, and a transportation card. The wallet app binds these three cards, and all three cards support NFC card swiping. When the phone's smart card selection function is enabled, the phone can automatically select the card by simply tapping it against the NFC reader, based on cellular information and the NFC reader's signal characteristics. In other words, when the phone is near or touches the NFC reader, it can roughly locate the swiping point using cellular information, then compare the information with the NFC reader's signal characteristics, and automatically select the card to complete the swipe.

[0162] The above embodiments illustrate cellular fences, NFC reading devices, and cards respectively. The following describes how to establish the correspondence between cellular fences, NFC reading devices, and cards based on user card swiping data.

[0163] Figure 12 This is a flowchart illustrating the NFC-based card-swiping method provided in an embodiment of this application. (Refer to...) Figure 12 As shown, the method includes the following steps S201-S206.

[0164] S201, The electronic device enters the first cell fence and completes a card swipe on the first NFC card reader.

[0165] In this process, the electronic device completes a card swipe on the first NFC card reader. This can be done by the user manually selecting the appropriate card or by the electronic device automatically selecting the card corresponding to the geographic location information based on the electronic device's geographic location information.

[0166] Among them, the field signal feature information corresponding to the first NFC card reader is called the first field signal feature information.

[0167] S202. The electronic device determines whether a first cell fence has been established.

[0168] The electronic device can compare the cell ID of the first cell fence with the stored database data. When the cell ID is recorded in the database, it indicates that the first cell fence has been established.

[0169] If the first cell fence has been established, proceed to step S203 below. If the first cell fence has not been established, proceed to step S206 below.

[0170] S203. The electronic device determines whether the card swiped this time (referred to as the first card) has been associated with the first cell fence.

[0171] The first card can be a virtual transportation card or a virtual access control card.

[0172] The electronic device can compare the first card with stored database data. When the database records the correspondence between the first cell fence and the first card, it indicates that the first card and the first cell fence have been associated.

[0173] If the first card has not established an association with the first cell fence, then proceed to step S205 below. If the first card has established an association with the first cell fence, then the process ends.

[0174] S204. The electronic device establishes a first association relationship between the first card and the first cell fence and the first field signal characteristic information.

[0175] S205. The electronic device establishes a first cellular fence and establishes a first association relationship between the first card, the first fence, and the first field signal characteristic information.

[0176] It should be noted that, if it is determined that the first cell fence has not been established, or if it is determined that the first card has not been associated with the first cell fence, the electronic device first collects the first field signal feature information corresponding to the first NFC card reader, and then establishes the first association based on the first field signal feature information.

[0177] It should be noted that S203-204 and S205 can be executed at a choice. S206 can be executed after S203-204, or S206 can be executed after S205.

[0178] S206. The electronic device adds the first association to the first data set.

[0179] In this embodiment, when an electronic device enters the first cell fence and completes its first card swipe on the first NFC reader, the electronic device establishes a first association based on the identification information of the first cell fence, the identification information of the first card, and the first field signal characteristic information of the first NFC reader. Then, the electronic device adds the first association to the first data set.

[0180] Example 1

[0181] For example, in cell fence 1, when a user uses their company access card to complete the initial card swipe on the company access control device, the electronic device, through data comparison, discovers that cell fence 1 has not yet been established. In this case, the electronic device establishes cell fence 1 and establishes the association between the company access card, CELL ID 1, and the field signal characteristic information corresponding to the company access control device. Then, the established association is stored in the local database and the cloud server database. Furthermore, the number of candidate cards corresponding to CELL ID 1 is incremented by 1.

[0182] Then, within cell fence 1, the user completes their first card swipe using a transit card at the subway card reader. The electronic device, through data comparison, discovers that cell fence 1 has been established, but the transit card is not associated with cell fence 1. In this case, the electronic device establishes an association between the transit card, CELL ID 1, and the field signal characteristic information corresponding to the subway card reader. Then, the established association is added to both the local database and the cloud server's database. Furthermore, the number of candidate cards corresponding to CELL ID 1 is incremented by 1, meaning the number of candidate cards corresponding to CELL ID 1 is now 2.

[0183] It can be seen that the database stores the correlation between the company's access control card and CELL ID 1, as well as the field signal characteristic information corresponding to the company's access control equipment, and the correlation between the transportation card and CELL ID 1, as well as the field signal characteristic information corresponding to the subway card reader. In other words, the number of candidate cards corresponding to cell fence 1 is 2.

[0184] Example 2

[0185] For example, in cell fence 2, when a user completes the first card swipe on the residential access control device using their residential access card, the electronic device, through data comparison, discovers that cell fence 2 has not yet been established. In this case, the electronic device establishes cell fence 2 and establishes the association between the residential access card, CELL ID 2, and the field signal characteristic information corresponding to the residential access control device. Then, the established association is stored in the local database and the cloud server database. Furthermore, the number of candidate cards corresponding to CELL ID 2 is incremented by 1.

[0186] Then, within cell fence 2, when a user completes their first card swipe on a public transport card reader using their transit card, the electronic device, through data comparison, discovers that cell fence 2 has been established, but the transit card has not yet been associated with cell fence 2. In this case, the electronic device establishes an association between the transit card, CELL ID 2, and the field signal characteristic information corresponding to the public transport card reader. Then, the established association is added to both the local database and the cloud server's database. Furthermore, the number of candidate cards corresponding to CELL ID 2 is incremented by 1, meaning the number of candidate cards corresponding to CELL ID 2 is now 2.

[0187] It can be seen that the database stores the correlation between residential access cards and CELL ID 2, as well as the correlation between transportation cards and CELL ID 2, and the field signal characteristic information corresponding to public transport card readers. In this case, the number of candidate cards corresponding to cell fence 2 is 2.

[0188] Using a large amount of user card swipe data as shown in Examples 1 and 2 above, the data set in Table 3 above (referred to as the first data set) can be obtained. The first data set is stored in the database and is continuously updated as the user card swipe data changes.

[0189] Example 2

[0190] In this embodiment, when the number of fences is greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, the electronic device initiates an information acquisition action on the NFC card reader. When the electronic device approaches or touches the first NFC card reader, it acquires the first field signal feature information corresponding to the first NFC card reader and searches the database for the card corresponding to the first field signal feature information. After finding the corresponding card, the electronic device uses the card to complete the card swipe on the NFC card reader.

[0191] The following description, in conjunction with the accompanying drawings, illustrates an NFC-based card-swiping method provided in an embodiment of this application.

[0192] Figure 13 This is a flowchart illustrating the NFC-based card-swiping method provided in this application embodiment. This NFC-based card-swiping method is applied to an electronic device with NFC functionality, which binds multiple cards, all of which support NFC card-swiping. The multiple cards include a first card and a second card. As shown in Table 3 above, the first data set also includes the identification information of the first cell fence, the field signal characteristic information of the NFC card reader, and the one-to-one correspondence between the cards. Specifically, the first data set includes the association between the identification information of the first cell fence, the first card, and the first field signal characteristic information, as well as the association between the identification information of the first cell fence, the second card, and the second field signal characteristic information.

[0193] For example, refer to Figure 13 As shown, the method includes the following steps S301-S308.

[0194] S301, The electronic device acquires the number of fences and the number of candidate cards.

[0195] The number of fences refers to the total number of cell fences that the electronic device has entered, and the number of candidate cards refers to the total number of cards corresponding to the cell fences that the electronic device has entered.

[0196] It should be noted that mobile phones can obtain base station information of the cell they are currently camped on according to the DRX cycle. The coverage area of ​​the cell fence is the signal coverage area of ​​the cell where the electronic device is camped.

[0197] In some cases, the phone is located within a single cell, i.e., within a single cell fence; in other cases, the phone is located in an overlapping area of ​​multiple cells, i.e., within an overlapping area of ​​multiple cell fences.

[0198] In some embodiments, the electronic device first obtains the number of fences. If the number of fences is greater than or equal to 1, the electronic device then obtains the number of candidate cards. It should be noted that if the number of fences is equal to 0, the number of candidate cards is not obtained, and the following steps S302-S308 are not executed.

[0199] S302. The electronic device determines whether the number of fences is greater than or equal to 1 and whether the number of candidate cards is greater than or equal to 2.

[0200] If the number of fences is greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, then proceed to steps S303 and S304 below. Otherwise, proceed to steps S305-S307 below.

[0201] S303. When the electronic device approaches or touches the first NFC card reader, the electronic device acquires the first field signal feature information corresponding to the first NFC card reader.

[0202] When the number of fences is greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, the electronic device initiates the information acquisition action of the NFC card reader. Therefore, when the electronic device approaches or touches the NFC card reader, it acquires the field signal characteristic information corresponding to the NFC card reader.

[0203] It should also be noted that when the distance between the electronic device and the NFC card reader is less than a preset distance (e.g., 2 cm), it can be considered as "close".

[0204] In the embodiments of this application, such as Figure 14 As shown in (a), the first NFC card reader broadcasts an NFC connection request signal, which is a field signal; the mobile phone receives the NFC connection request signal broadcast by the first NFC card reader, and obtains the first field signal feature information based on the NFC connection request signal. The NFC connection request signal carries the characteristics described above. Figure 9 The field signal characteristic information of the NCF card reader shown is shown.

[0205] S304. The electronic device searches for the first card corresponding to the first field signal feature information in the pre-stored first data set.

[0206] It should be noted that when the number of fences is greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, it means that the cell fence where the electronic device is currently located corresponds to multiple NFC card readers and multiple cards. Therefore, it is necessary to first obtain the field signal characteristic information of the NFC card reader, and then find the corresponding card based on the field signal characteristic information of the NFC card reader to accurately select the matching card.

[0207] For example, Figure 15 (a) illustrates the scenario where there is one fence and two candidate cards. The electronic device has entered cell fence 1, which corresponds to two cards: a transportation card and a company access card. Pre-stored associations include: cell fence 1 - transportation card - subway card reader, and cell fence 1 - company access card - company access control device. In this scenario, it is necessary to collect the field signal feature information corresponding to the NFC card reader and compare the information to find the card that matches the collected field signal feature information, which will then be used as the card to be swiped.

[0208] For example, when a mobile phone enters cell 1, it can be determined that the number of cells the phone has entered is 1 (i.e., cell 1), and the number of candidate cards is 2 (i.e., company access card and transportation card). At this point, the information collection action of the NFC card reader is initiated. When the phone approaches the subway card reader, it collects the field signal characteristic information emitted by the subway card reader. After information comparison, it can find the transportation card corresponding to the field signal characteristic information emitted by the subway card reader, and the phone can use the transportation card to complete the card swipe at the subway card reader. When the phone approaches the company access control device, it collects the field signal characteristic information emitted by the company access control device. After information comparison, it can find the company access card corresponding to the field signal characteristic information emitted by the company access control device, and the phone can use the company access card to complete the card swipe at the company access control device.

[0209] For another example, Figure 15 (b) illustrates the case where there are 2 fences and 3 candidate cards. When the electronic device enters the overlapping area of ​​CELL fence 1 and CELL fence 2, the number of fences is 2, and the total number of cards corresponding to these two fences is 3. CELL fence 1 corresponds to two cards: a transportation card and a company access card. CELL fence 2 corresponds to two cards: a company access card and a residential access card. The pre-stored associations include: CELL fence 1 - transportation card - subway card reader, and CELL fence 1 - company access card - company access control device. In this scenario, card selection needs to be based on the field signal characteristic information corresponding to the NFC card reader.

[0210] For example, when a mobile phone enters the overlapping area of ​​CELL fence 1 and CELL fence 2, it can be determined that the number of fences the phone has entered is 2 (i.e., CELL fence 1 and CELL fence 2), and the number of candidate cards is 3 (i.e., transportation card, company access card, and residential access card). At this time, the information collection action of the NFC card reader is initiated. When the mobile phone approaches the company access control device, the mobile phone collects the field signal feature information emitted by the company access control device. After information comparison, the company access card corresponding to the field signal feature information emitted by the company access control device can be found, and the mobile phone can use the company access card to complete the card swiping on the company access control device.

[0211] S305. The electronic device determines whether the number of fences is equal to 1 and whether the number of candidate cards is equal to 1.

[0212] S306. When the number of fences is equal to 1 and the number of candidate cards is equal to 1, the electronic device obtains the identification information of the first cell fence.

[0213] S307. The electronic device searches in the first data set for the first card corresponding to the identification information of the first cell fence.

[0214] It should be noted that when the number of fences is equal to 1 and the number of candidate cards is equal to 1, it means that the first cell fence where the electronic device is currently located corresponds to only one NFC card reader and one card. Therefore, the corresponding card can be found directly based on the identification information of the first cell fence without first obtaining the field signal feature information of the first NFC card reader and then finding the corresponding card based on the field signal feature information of the first NFC card reader.

[0215] For example, Figure 15 (c) shows the case where the number of fences is 1 and the number of candidate cards is 1. The electronic device has entered CELL fence 1, which corresponds to a company access card. The pre-stored association includes: CELL fence 1 - company access card - company access control device. In this scenario, there is no need to collect the field signal feature information corresponding to the company access control device and perform information comparison. The company access card can be directly found based on CELL fence 1 and used as the card to be swiped.

[0216] For example, when a mobile phone enters the CELL fence 1, it can be determined that the number of fences the phone has entered is 1 (i.e., CELL fence 1), and the number of candidate cards is 1 (i.e., the company access card). At this point, the information collection action of the NFC card reader is stopped. When the mobile phone approaches the company access control device, the mobile phone can directly find the company access card based on CELL fence 1 and use it as the card to swipe. Therefore, the mobile phone uses the company access card to complete the card swiping at the company access control device.

[0217] It should be noted that S303-304 and S305-307 can be executed at a choice. S308 can be executed after S303-304, or S308 can be executed after S305-307.

[0218] S308, the electronic device uses the first card and swipes the card on the first NFC card reader.

[0219] In the embodiments of this application, such as Figure 14 As shown in (b), the mobile phone sends an NFC connection response message to the first NFC card reader. This NFC connection response message includes the identifier of the first card and is used to instruct the first NFC card reader to establish a wireless connection with the mobile phone. Then, as... Figure 14 As shown in (c), when a wireless connection is established between the first NFC card reader and the mobile phone, the first card is swiped on the first NFC card reader. The connection establishment process includes authentication and authorization procedures.

[0220] The above example illustrates the process of swiping a first card on a first NFC card reader within the first cell fence. The following example illustrates the process of swiping a second card on a second NFC card reader within the first cell fence.

[0221] When the number of fences is greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, the electronic device acquires the second field signal feature information corresponding to the second NFC card reader. The electronic device searches for the second card in the first data set that corresponds to the identification information of the first cell fence and the second field signal feature information. The electronic device then uses the second card to swipe on the second NFC card reader.

[0222] For example, suppose the mobile phone is linked to multiple cards, including a company access card and a transportation card. The following examples, using access control card swiping and transportation card swiping as illustrations and with reference to the accompanying drawings, illustrate the NFC-based card swiping method provided in this application.

[0223] like Figure 16 As shown in Scenario 1: If the number of fences is greater than or equal to 1, and the number of candidate cards is greater than or equal to 2, then the information collection action of the NFC card reader is initiated. When the mobile phone approaches or touches the company's access control device, the mobile phone can collect the field signal feature information 1 emitted by the company's access control device. Then, in the first data set, the mobile phone searches for the company access control card corresponding to the field signal feature information 1 of the company access control device. Then, the electronic device automatically selects the company access control card and swipes it on the company access control device. Accordingly, the electronic device prompts that the card swipe was successful.

[0224] like Figure 16As shown in Scenario 2: If the number of fences is greater than or equal to 1, and the number of candidate cards is greater than or equal to 2, then the information collection action of the NFC card reader is initiated. When the mobile phone approaches or touches the subway card reader, the mobile phone can collect the field signal feature information 2 emitted by the subway card reader. Then, in the first data set, the electronic device searches for the transportation card corresponding to the field signal feature information 2 of the subway card reader. Then, the electronic device automatically selects the transportation card and swipes it on the subway card reader. Accordingly, the electronic device prompts that the card swipe was successful.

[0225] Therefore, even though the mobile phone is located in the overlapping area of ​​geofence 1 and geofence 2, the correct card can be accurately selected to complete the card swipe according to the solution of this application. Specifically, through the solution of this application, a mobile phone with NFC function can use cellular information to perform coarse positioning of the card swipe point, determine the CELL fence where the card swipe point is located, and when the number of fences is greater than or equal to 1, and the number of candidate cards corresponding to the CELL fence is greater than 1, the acquisition of the field signal of the NFC card reader is initiated. Then, the acquired field signal of the NFC card reader is compared with the candidate field signal list of the card reader, and the card that matches the field signal of the NFC card reader is automatically selected according to the comparison result. Therefore, the problem of card selection failure within overlapping geofences can be solved.

[0226] Optionally, if the electronic device fails to find a card corresponding to the first field signal feature information, this application provides three methods:

[0227] Method 1: The electronic device uses one of the multiple cards preset by the system to swipe on the first NFC card reader.

[0228] For example, the system defaults to a transportation card.

[0229] Method 2: The electronic device prompts the user to manually select a card from multiple cards.

[0230] In response to a user's action of selecting a first card from multiple cards, the electronic device swipes the first card on the first NFC card reader.

[0231] For example, assuming the first NFC card reader is a company access control device, the user selects the company access control card from multiple cards, and the electronic device uses the company access control card to complete the card swiping on the company access control device.

[0232] Method 3: The electronic device uses a pre-selected card from a pool of cards to swipe on the first NFC card reader. If the pre-selected card does not match the first NFC card reader, the swipe fails. In this case, the electronic device prompts the user to select a card from the pool of cards.

[0233] For example, suppose the first NFC card reader is a company access control device, and the system defaults to a transportation card. The card swipe will fail because the transportation card is incompatible with the access control device. In this case, the electronic device prompts the user to manually select a card from a pool of cards. Then, in response to the user's selection of the company access control card, the electronic device uses the company access control card to complete the card swipe on the access control device.

[0234] It should be noted that, in response to a user's selection of a first card from multiple cards, after the electronic device swipes the first card on the first NFC reader, the electronic device can obtain the identification information of the first cell fence and collect the first field signal characteristic information of the first NFC reader; then, based on the identification information of the first cell fence, the first field signal characteristic information, and the first card, a first association is established. Furthermore, the electronic device can add the first association to a first data set and update the first data set.

[0235] After the electronic device adds the first association to the first data set, the electronic device can send a first message to the server, the first message instructing the server to update the first data set, the updated first data set including the first association.

[0236] The above describes the possible implementation process of the NFC-based card-swiping method provided in the embodiments of this application. The following will be combined with... Figure 17 This document describes the various functional modules involved in the embodiments of this application and the process of interaction between these functional modules.

[0237] like Figure 17 As shown, this application involves the following four parts: a wallet app, NFC software, a CELL fence triggering module, and NFC hardware. The wallet app provides card management and user interface (UI) display services. The NFC software provides CELL fence and card reader "fingerprint" management services, fence time management services, card reader "fingerprint" acquisition control, and card selection services. The CELL fence and card reader "fingerprint" management module provides the CELL fence and card reader "fingerprint" database to the fence event management module. The CELL fence triggering module provides services for adding or deleting CELL fences, as well as CELL fence entry / exit status notification services. The fence event management module can perform logical judgments based on the CELL fence entry / exit status and the database. When it determines that the number of fences is greater than or equal to 1, and the number of candidate cards is greater than or equal to 2, it instructs the card reader to acquire its "fingerprint" and selects the card corresponding to the card reader's "fingerprint" based on the matching result between the card reader's "fingerprint" and the database. The NFC hardware provides the card reader "fingerprint" acquisition and reporting services.

[0238] Among them, the "fingerprint" of the card reader refers to the long signal characteristic information of the card reader.

[0239] Figure 18 This diagram illustrates the process of creating a cell fence and a card reader "fingerprint." It primarily covers scenarios involving access card swiping and swiping other cards within the cell fence. Figure 18 As shown, this determines whether an electronic device has entered the CELL fence.

[0240] On one hand, when an electronic device detects entry into a cell fence and a card swipe event occurs, it determines whether the card swipe corresponds to the cell fence. If the card swipe does not correspond to the cell fence, a cell fence for the swipe card is established, and the card reader's "fingerprint" is collected. The database is then updated based on the swipe card, the cell fence, and the card reader's "fingerprint."

[0241] On the other hand, when an electronic device detects an access card swipe event, it establishes a cell fence for the access card and collects the card reader's "fingerprint," updating the database based on the access card, cell fence, and card reader "fingerprint."

[0242] In this embodiment of the application, the electronic device can add cards or delete cards from multiple bound cards according to user operations, and update the data set in the database accordingly. Figure 19 This is a flowchart illustrating the process of deleting all fence and card reader "fingerprint" information created by a card after receiving a card deletion command from the wallet app. For example, as shown... Figure 19 As shown, the NFC-based card-swiping method provided in this application embodiment also includes the following S401-S404.

[0243] S401, The electronic device receives an operation from the user to delete one of multiple cards.

[0244] In response to a user operation, the electronic device executes steps S402-S404 as described below.

[0245] S402, The electronic device unbinds the card.

[0246] The electronic device iterates through the recorded fence information corresponding to that card.

[0247] S403. The electronic device deletes the fence information and the corresponding field signal characteristic information corresponding to the card from the first data set.

[0248] S404. The electronic device sends a second message to the server, the second message being used to instruct the deletion of the fence information and the corresponding field signal characteristic information corresponding to the card in the first data set.

[0249] Cloud database updates are achieved via S404.

[0250] In this embodiment, whenever an electronic device enters a new cell fence, the fence count is incremented by 1 to obtain an updated fence count; and the number of cards corresponding to the new cell fence is added to the candidate card count to obtain an updated candidate card count. Furthermore, whenever an electronic device leaves a cell fence, the fence count is decremented by 1 to obtain an updated fence count; and the number of cards corresponding to that cell fence is subtracted from the candidate card count to obtain an updated candidate card count.

[0251] For example, Figure 20 This is a diagram illustrating the fence event management process. When the fence event management module receives a fence entry or exit event, it updates the card reader "fingerprint" in the candidate list and the number of card readers that entered the CELL fence. For example... Figure 20 As shown, first determine whether the electronic device has entered the CELL fence.

[0252] On the one hand, when an electronic device is detected to have entered the CELL fence (referred to as CELL fence 1), the card reader field signal characteristic information (referred to as card reader field signal) corresponding to CELL fence 1 is added to the card reader field signal candidate list, and the number of devices entering CELL fence 1 is incremented by 1.

[0253] On the other hand, when an electronic device is detected to have left CELL fence 1, the card reader field signal corresponding to CELL fence 1 is removed from the card reader field signal candidate list, and the cumulative number of devices entering CELL fence 1 is decremented by 1.

[0254] Among them, the candidate list of field signals of the card reader can be figuratively called the candidate list of the card reader's "fingerprint".

[0255] Figure 21 This is a diagram illustrating the automatic card selection process after fence event management is completed. Figure 21 As shown, when a mobile phone is used to swipe a card, it first checks whether the number of cell fences the phone is currently entering (referred to as the cell fence entry count) is greater than 0. Based on the events of entering or leaving a cell fence, the number of cell fences the phone enters will change. Therefore, sometimes the number of cell fence entries is greater than 1, sometimes the number of cell fence entries is equal to 1, and sometimes the number of cell fence entries is equal to 0.

[0256] On one hand, if the number of cells entering the cell fence is greater than 0, and the number of candidate cards is greater than 1, the phone initiates card reader field signal acquisition, and then waits for the card reader field signal to be reported. The phone iterates through the candidate list of card reader field signals, determining whether the card reader field signal acquired by the phone matches the card reader field signal in the candidate list. When a match is successful, the phone selects the card corresponding to that card reader field signal. When a match fails, the default card can be automatically selected. Alternatively, in scenarios where field signal matching fails, the alternative is for the phone to prompt the user to manually select a suitable card. This card reader field signal acquisition can be figuratively referred to as card reader "fingerprint" acquisition.

[0257] On the other hand, if the number of CELL fences is greater than 0, and the number of candidate cards is equal to 1, the phone determines the CELL fence in which it is currently located and selects the card corresponding to that CELL fence.

[0258] On the other hand, when the number of cells entered is zero, the phone can automatically select a default card. Alternatively, the phone can prompt the user to manually select a suitable card.

[0259] Figure 22 This diagram illustrates the processing flow related to cell fences and card reader "fingerprint" databases. Besides scenarios involving creating and deleting cell fences and card reader "fingerprints," it may also involve scenarios such as phone power-on, phone cloning, and server synchronization.

[0260] like Figure 22 As shown, in the scenario of the phone being powered on, the Wallet app sends configuration card information to the CELL fence and card reader "fingerprint" management module. Upon receiving the configuration card information, the CELL fence and card reader "fingerprint" management module reads the phone's local CELL fence and card reader "fingerprint" database and filters the data set in the database according to the card information to obtain the (i.e., valid) CELL fence and card reader "fingerprint" corresponding to the card information.

[0261] In the scenario of mobile phone cloning, the CELL fence and card reader "fingerprint" management module reads the local CELL fence and card reader "fingerprint" database of the mobile phone, and the current mobile phone copies the read data set to the target mobile phone to complete the data cloning.

[0262] In one server synchronization scenario, the wallet app uses the cell fence and card reader "fingerprint" management module to send a request to the local cell fence and card reader "fingerprint" database on the phone to retrieve the data set. The wallet app then retrieves the data set from the local database and synchronizes it to the server.

[0263] In another scenario of server synchronization, the wallet app can obtain the database on the server side and the database on the phone's local side. Then, it can merge the database on the server side and the local database, and then replace the local database on the phone with the merged database to achieve database update.

[0264] In related technologies, when a mobile phone swipes a card using NFC, the technology employed is to automatically select the card based on the NFC card reader and the geographical location. As mentioned above, the following correspondence is pre-stored: geofence 1 corresponds to the access control card reader, and geofence 2 corresponds to the public transport card reader. When the public transport card reader and the access control card reader are relatively close, that is, when the user uses an electronic device to swipe a card within the overlapping area of ​​these two geofences, the mobile phone can determine through its location information that the card reader is in both geofence 1 and geofence 2. Therefore, it cannot select the card based on the geofence, resulting in a card swipe failure.

[0265] Compared to related technologies, the solution in this application pre-stores the following correspondence: CELL fence 1 corresponds to access control equipment (specifically, the field signal characteristic information of the access control equipment) and access control cards; furthermore, CELL fence 1 also corresponds to public transport card readers (specifically, the field signal characteristic information of the public transport card readers) and transit cards. When a mobile phone swipes a card using NFC, the technology employed is to automatically select the card based on the NFC card reader and the CELL fence. Even if the card reader and the access control card reader are relatively close, it will not affect the mobile phone's automatic card selection. In this application, the mobile phone can use cellular information to coarsely locate the card reader and determine the cell fence where the card reader is located. When the number of fences currently entered by the electronic device is greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, the NFC card reader at the card reader (such as a transit card reader) collects the field signal. Then, the field signal of the NFC card reader is compared with the candidate field signal list of the card reader. Based on the comparison result, the card (such as a transit card) that matches the field signal of the NFC card reader is automatically selected. This can solve the problem of card selection failure within overlapping geofences.

[0266] In this embodiment, on an electronic device with NFC functionality, cellular information is used for coarse location of the card swiping point, and air-to-ground fingerprint collection is performed on NFC card readers with the same coverage area. Card selection is then automatically performed by comparing the fingerprint information. This effectively reduces the accuracy requirements of location information, decreases power consumption, solves the problem of card selection within overlapping boundaries, and improves the user card simulation experience.

[0267] The NFC-based card-swiping method provided in this application embodiment can reduce power consumption, for example, according to laboratory experimental results, it can reduce power consumption by approximately 25 milliamp-hours (mAh).

[0268] It should also be noted that in the embodiments of this application, "greater than" can be replaced with "greater than or equal to", "less than or equal to" can be replaced with "less than", or "greater than or equal to" can be replaced with "greater than", and "less than" can be replaced with "less than or equal to".

[0269] The various embodiments described herein can be independent solutions or combinations thereof based on their inherent logic, and all such solutions fall within the protection scope of this application.

[0270] It is understood that the methods and operations implemented by electronic devices in the above-described method embodiments can also be implemented by components (such as chips or circuits) that can be used in electronic devices.

[0271] The method embodiments provided in this application have been described above. The apparatus embodiments provided in this application will be described below. It should be understood that the description of the apparatus embodiments corresponds to the description of the method embodiments. Therefore, any content not described in detail can be referred to the method embodiments above. For the sake of brevity, it will not be repeated here.

[0272] This application embodiment can divide an electronic device into functional modules based on the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, other feasible division methods may exist. The following description uses the division of functional modules according to each function as an example.

[0273] Figure 23 This is a schematic block diagram of an NFC-based card-swiping device 500 provided in an embodiment of this application. The device 500 can be used to perform the actions performed by the electronic device in the method embodiments described above. The device 500 has NFC functionality and multiple cards are bound to it; these bound cards support NFC card-swiping functionality. The device 500 includes a processing unit 510 and a wireless communication unit 520.

[0274] The processing unit 510 is used to obtain the number of fences and the number of candidate cards. When the number of fences is greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, the information collection action of the NFC card reader is initiated. The number of fences is the total number of cell fences that the electronic device has entered, and the number of candidate cards is the total number of cards corresponding to the cell fences that the electronic device has entered.

[0275] The wireless communication unit 520 is used to acquire the first field signal feature information corresponding to the first NFC card reader when the electronic device is close to or in contact with the first NFC card reader.

[0276] The processing unit 510 is further configured to search for a first card corresponding to the first field signal feature information in a pre-stored first data set; wherein the first data set includes the identification information of the cell fence, the field signal feature information of the NFC card reader, and a one-to-one correspondence between cards; the one-to-one correspondence includes a first association relationship between the identification information of the first cell fence, the first card, and the first field signal feature information, and the first card is one of the multiple cards;

[0277] The processing unit 510 is also used to swipe the first card on the first NFC card reader device.

[0278] The NFC-based card-swiping device provided in this application pre-stores the field signal characteristic information ("air interface fingerprint") of cellular fences, NFC card readers, and the correspondence between cards. When the electronic device enters a fence with a number greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, it initiates the information collection action of the NFC card reader. When the device approaches the NFC card reader, the "air interface fingerprint" is collected, and then the card corresponding to the "air interface fingerprint" is searched in the pre-stored correspondence, i.e., the matching card is automatically selected. This application uses cellular information for coarse positioning of the card-swiping point, then collects information from the NFC card reader and performs information comparison. Based on the comparison result, the matching card is automatically selected to complete the card swiping, thus effectively solving the problem of card selection within overlapping fences.

[0279] The apparatus 500 according to the embodiments of this application can correspond to the execution of the method described in the embodiments of this application, and the above and other operations and / or functions of the units in the apparatus 500 are respectively for implementing the corresponding process of the method, which will not be described again here for the sake of brevity.

[0280] This application also provides a chip coupled to a memory, which is used to read and execute computer programs or instructions stored in the memory to perform the methods described in the above embodiments.

[0281] This application also provides an electronic device including a chip for reading and executing computer programs or instructions stored in a memory, such that the methods in the various embodiments are performed.

[0282] This embodiment also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the NFC-based card-swiping method in the above embodiment.

[0283] This embodiment also provides a computer program product. The computer-readable storage medium stores program code. When the computer program product is run on a computer, it causes the computer to perform the above-mentioned related steps to implement the NFC-based card swiping method in the above embodiment.

[0284] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the NFC-based card swiping method in the above method embodiments.

[0285] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0286] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0287] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0288] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A card-swiping method based on Near Field Communication (NFC), applied to an electronic device with NFC functionality, wherein multiple cards are bound to the electronic device, and the bound cards support NFC card-swiping functionality, characterized in that... The method includes: The identification information of the cell fence is monitored according to the discontinuous reception DRX cycle; the coverage area of ​​the cell fence is the signal coverage area of ​​the cell where the electronic device is camped. The electronic device acquires the number of fences and the number of candidate cards. The number of fences is the total number of identification information of the cell fences that the electronic device has currently entered, and the number of candidate cards is the total number of cards corresponding to the cell fences that the electronic device has currently entered. When the number of fences is greater than or equal to 1 and the number of candidate cards is greater than or equal to 2, the electronic device initiates the information collection action of the NFC card reader. When the electronic device approaches or touches the first NFC card reader, the electronic device acquires the first field signal feature information corresponding to the first NFC card reader; The electronic device searches for a first card corresponding to the first field signal feature information in a pre-stored first data set; wherein, the first data set includes the identification information of the cell fence, the field signal feature information of the NFC card reader, and a one-to-one correspondence between cards; the one-to-one correspondence includes a first association relationship between the identification information of the first cell fence, the first card, and the first field signal feature information, and the first card is one of the multiple cards; The electronic device uses the first card and swipes it on the first NFC card reader.

2. The method according to claim 1, characterized in that, After the electronic device initiates the information collection action of the NFC card reader, the method further includes: When the electronic device approaches or touches the second NFC card reader, the electronic device acquires the second field signal feature information corresponding to the second NFC card reader; The electronic device searches for a second card in the first data set that corresponds to the second field signal feature information; wherein the second card is a card that is different from the first card among the multiple cards; the one-to-one correspondence also includes a second association relationship between the identification information of the first cell fence, the second card, and the second field signal feature information; The electronic device uses the second card and swipes it on the second NFC card reader.

3. The method according to claim 1, characterized in that, After the electronic device initiates the information collection action of the NFC card reader, the method further includes: When the number of fences equals 1, and the number of candidate cards acquired again equals 1, the electronic device stops the NFC card reader's acquisition operation; or, When the number of fences acquired again is equal to 0, the electronic device stops collecting data from the NFC reader.

4. The method according to claim 3, characterized in that The method further includes: When the number of fences is equal to 1 and the number of candidate cards is equal to 1, when the electronic device approaches or touches the third NFC card reader, the electronic device obtains the identification information of the second cell fence where the electronic device is currently located; The electronic device searches for a third card corresponding to the identification information of the second cell fence in the first data set based on the identification information of the second cell fence. The electronic device uses the third card to swipe the card on the third NFC card reader.

5. The method according to claim 3, characterized in that, The method further includes: When the number of fences is 0, when the electronic device approaches or touches the fourth NFC card reader, the electronic device uses a card preset by the system from the multiple cards to swipe the card on the fourth NFC card reader.

6. The method according to claim 1, characterized in that, The electronic device acquires the number of fences and the number of candidate cards, including: The electronic device first obtains the number of fences; If the number of fences is greater than or equal to 1, the electronic device then obtains the number of candidate cards.

7. The method according to any one of claims 1 to 6, characterized in that, Different types of NFC card readers correspond to different field signal characteristic information; The field signal characteristic information includes: multiple polling commands sent by the NFC card reader, the sending period and the closing period of the polling commands, and the time interval between the multiple polling commands; wherein the multiple polling commands include type A polling commands, type B polling commands, and / or type F polling commands; Different types of NFC card readers include company access control devices, subway card readers, residential access control devices, and bus card readers.

8. The method according to any one of claims 1 to 6, characterized in that, The identification information of the cell fence is the cell identifier CELLID corresponding to the cell where the electronic device is stationed.

9. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Whenever the electronic device enters a new cell fence, the number of fences is incremented by 1 to obtain an updated number of fences; and the number of cards corresponding to the new cell fence is added to the number of candidate cards to obtain an updated number of candidate cards. Whenever the electronic device leaves a cell fence, the number of fences is decremented by 1 to obtain an updated number of fences; and the number of cards corresponding to a cell fence is subtracted from the number of candidate cards to obtain an updated number of candidate cards.

10. The method according to any one of claims 1 to 6, characterized in that, The method further includes: When the electronic device enters the first cell fence and uses the first card to complete a preset number of card swipes on the first NFC card reader, the electronic device establishes the first association relationship based on the identification information of the first cell fence, the identification information of the first card, and the first field signal feature information of the first NFC card reader. The electronic device adds the first association to the first data set.

11. The method according to any one of claims 1 to 6, characterized in that, The method further includes: If the electronic device fails to find a card corresponding to the first field signal feature information, the electronic device uses one of the multiple cards preset by the system to swipe on the first NFC card reader.

12. The method according to any one of claims 1 to 6, characterized in that, The method further includes: If the electronic device does not find a card corresponding to the first field signal feature information, the electronic device prompts the user to select a card from the plurality of cards; The electronic device uses the first card and swipes it on the first NFC card reader, including: In response to a user selecting the first card from the plurality of cards, the electronic device swipes the first card on the first NFC card reader.

13. The method according to claim 12, characterized in that, After the electronic device swipes the first card on the first NFC card reader in response to a user selecting the first card from the plurality of cards, the method further includes: The electronic device acquires the identification information of the first cell fence and collects the first field signal feature information of the first NFC card reader; The electronic device establishes the first association relationship based on the identification information of the first cell fence, the first field signal characteristic information, and the first card; The electronic device adds the first association to the first data set.

14. The method according to claim 13, characterized in that, After the electronic device adds the first association to the first data set, the method further includes: The electronic device sends a first message to the server, the first message being used to instruct the server to update the first data set, the updated first data set including the first association relationship.

15. The method according to any one of claims 1 to 6, characterized in that, The method further includes: The electronic device receives the user's operation of adding the first card; In response to the user's action of adding the first card, the electronic device binds the first card to the electronic device.

16. The method according to any one of claims 1 to 6, characterized in that, The method further includes: The electronic device receives the user's operation to delete the first card; In response to the user's deletion of the first card, the electronic device performs the following operations: Unbind the first card from the electronic device; Iterate through all the association relationships recorded in the electronic device that correspond to the first card; Delete all associations of the first card in the first data set; A second message is sent to the server, the second message being used to instruct the server to update the first data set, the updated first data set not including all associations of the first card.

17. The method according to any one of claims 1 to 6, characterized in that, The electronic device acquires the first field signal feature information corresponding to the first NFC card reader, including: The electronic device receives an NFC connection request signal broadcast by the first NFC card reader; The electronic device obtains the first field signal feature information based on the NFC connection request signal.

18. The method according to any one of claims 1 to 6, characterized in that, The electronic device uses the first card and swipes it on the first NFC card reader, including: The electronic device sends an NFC connection response message to the first NFC card reader. The NFC connection response message includes the identifier of the first card and is used to instruct the first NFC card reader to establish a connection with the first card. When the first NFC card reader establishes a connection with the first card, the electronic device uses the first card to swipe on the first NFC card reader.

19. An electronic device, characterized in that, The device includes a processor and a memory, the processor being coupled to the memory, the processor being configured to execute a computer program or instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1 to 18.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 18.

Citation Information

Patent Citations

  • Analog card management method and device, medium and electronic equipment

    CN112468975A

  • Method for selecting card during card reading, terminal equipment and storage medium

    CN115221906A

  • Card selection method and device, terminal equipment and storage medium

    CN115310463A