CN115835132A - A kind of NFC radio frequency parameter compatibility method and electronic equipment - Google Patents
A kind of NFC radio frequency parameter compatibility method and electronic equipment Download PDFInfo
- Publication number
- CN115835132A CN115835132A CN202111094242.8A CN202111094242A CN115835132A CN 115835132 A CN115835132 A CN 115835132A CN 202111094242 A CN202111094242 A CN 202111094242A CN 115835132 A CN115835132 A CN 115835132A
- Authority
- CN
- China
- Prior art keywords
- radio frequency
- electronic device
- frequency parameter
- fence
- parameter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 72
- 238000013507 mapping Methods 0.000 claims abstract description 102
- 230000006854 communication Effects 0.000 claims abstract description 53
- 238000004891 communication Methods 0.000 claims abstract description 51
- 230000004913 activation Effects 0.000 claims description 60
- 238000012217 deletion Methods 0.000 claims description 29
- 230000037430 deletion Effects 0.000 claims description 29
- 230000015654 memory Effects 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 12
- 238000005516 engineering process Methods 0.000 claims description 8
- 238000012546 transfer Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 23
- 230000006870 function Effects 0.000 description 23
- 238000007792 addition Methods 0.000 description 18
- 238000007726 management method Methods 0.000 description 15
- 238000012545 processing Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 8
- 238000010295 mobile communication Methods 0.000 description 7
- 238000012544 monitoring process Methods 0.000 description 7
- 230000004044 response Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 5
- 229920001621 AMOLED Polymers 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 230000035945 sensitivity Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 230000023402 cell communication Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Telephone Function (AREA)
Abstract
本申请实施例公开了一种NFC射频参数兼容方法及电子设备,包括:电子设备获取围栏事件,围栏事件用于表示电子设备进入或退出某一围栏的情况;在电子设备进入围栏的情况下,电子设备基于围栏事件,当前的激活卡片以及第一映射关系确定第一射频参数,第一映射关系为围栏、卡片与射频参数之间的映射关系;第一映射关系中包括主射频参数和至少一种兼容射频参数;其中,第一射频参数作为电子设备当前所使用的NFC射频参数。本申请实施例,可以提高NFC射频通信的成功率,提高用户刷卡体验。
The embodiment of the present application discloses an NFC radio frequency parameter compatibility method and an electronic device, including: the electronic device obtains a fence event, and the fence event is used to indicate that the electronic device enters or exits a certain fence; when the electronic device enters the fence, The electronic device determines the first radio frequency parameter based on the fence event, the current activated card and the first mapping relationship. The first mapping relationship is the mapping relationship between the fence, the card and the radio frequency parameter; the first mapping relationship includes the main radio frequency parameter and at least one A compatible radio frequency parameter; wherein, the first radio frequency parameter is used as the NFC radio frequency parameter currently used by the electronic device. The embodiment of the present application can improve the success rate of NFC radio frequency communication, and improve the user experience of swiping a card.
Description
技术领域technical field
本申请涉及终端技术领域,尤其涉及一种NFC射频参数兼容方法及电子设备。The present application relates to the field of terminal technology, in particular to an NFC radio frequency parameter compatibility method and electronic equipment.
背景技术Background technique
随着智能终端设备的日益普及,近场通信技术NFC(near field communication,NFC)已经在日常生活中普遍使用。用户可以使用具有NFC功能的电子设备完成移动支付、电子票务、智能媒体、身份识别等业务。在用户使用NFC功能的时候,需要电子设备贴近NFC读卡器(例如,销售点(point of sale,POS)机)设备,才能够进行射频通信,完成信息交换。例如,用户可以打开手机的NFC公交卡,靠近公交车上的POS机,完成乘车刷卡;用户可以打开手机的NFC门禁卡,靠近门口的POS机,完成门禁刷卡等。With the increasing popularity of smart terminal devices, near field communication technology NFC (near field communication, NFC) has been widely used in daily life. Users can use electronic devices with NFC functions to complete services such as mobile payment, electronic ticketing, smart media, and identification. When the user uses the NFC function, the electronic device needs to be close to the NFC card reader (for example, a point of sale (point of sale, POS) machine) device to be able to perform radio frequency communication and complete information exchange. For example, the user can open the NFC bus card of the mobile phone, approach the POS machine on the bus, and complete the card swiping;
在日常使用NFC功能的过程中,一个具有NFC功能的电子设备需要与很多不同的POS机进行射频通信,然而,由于现有的POS机设备的射频标准不统一和不完善,因此电子设备与不同的POS机进行射频通信时所使用的射频参数不同。例如,不同POS机设备的厂商制造的POS机设备射频参数不同、不同大小POS机的天线大小不同等。这样会导致NFC电子设备与不同POS机设备之间射频通信的兼容性较差,NFC电子设备刷卡的成功率较低。In the process of daily use of NFC function, an electronic device with NFC function needs to perform radio frequency communication with many different POS machines. The radio frequency parameters used by different POS machines for radio frequency communication are different. For example, the radio frequency parameters of POS devices manufactured by different POS device manufacturers are different, and the antenna sizes of POS devices of different sizes are different. This will lead to poor compatibility of radio frequency communication between the NFC electronic device and different POS machine devices, and the success rate of card swiping by the NFC electronic device is low.
发明内容Contents of the invention
本申请实施例公开了一种NFC射频参数兼容方法及电子设备,可以提高NFC射频通信的成功率,提高用户刷卡体验。The embodiment of the present application discloses an NFC radio frequency parameter compatibility method and an electronic device, which can improve the success rate of NFC radio frequency communication and improve the card swiping experience of users.
第一方面,本申请提供了一种NFC射频参数兼容方法,所述方法应用于电子设备,所述方法包括:所述电子设备获取围栏事件,所述围栏事件用于表示所述电子设备进入或退出某一围栏的情况;在所述电子设备进入围栏的情况下,所述电子设备基于所述围栏事件,当前的激活卡片以及第一映射关系确定第一射频参数,所述第一映射关系为围栏、卡片与射频参数之间的映射关系;所述第一映射关系中包括主射频参数和至少一种兼容射频参数;其中,所述第一射频参数作为所述电子设备当前所使用的NFC射频参数。In a first aspect, the present application provides an NFC radio frequency parameter compatibility method, the method is applied to an electronic device, and the method includes: the electronic device acquires a fence event, and the fence event is used to indicate that the electronic device enters or The situation of exiting a certain fence; when the electronic device enters the fence, the electronic device determines the first radio frequency parameter based on the fence event, the current activation card and the first mapping relationship, and the first mapping relationship is The mapping relationship between fences, cards and radio frequency parameters; the first mapping relationship includes main radio frequency parameters and at least one compatible radio frequency parameter; wherein, the first radio frequency parameter is used as the NFC radio frequency currently used by the electronic device parameter.
其中,围栏事件可以分为进入围栏的围栏事件和退出围栏的围栏事件。电子设备在获取到进入围栏的围栏事件的情况下,实施上述的方法。Wherein, the fence event can be divided into a fence event entering the fence and a fence event exiting the fence. When the electronic device acquires the fence event of entering the fence, implement the above method.
在本申请实施例中,在获取到进入围栏的围栏事件的情况下,电子设备可以基于围栏事件、激活卡片和第一映射关系确定所使用的NFC射频参数。此时,电子设备可以在NFC刷卡之前,提前确定NFC通信时所用的射频参数。这样,即便不同的NFC读卡器使用的参数不尽相同,电子设备提前对两设备之间通信的无线信号的射频参数进行切换或者确定,从而可以提高两设备之间一次性通信成功的概率,进而可以减少用户刷卡失败的次数,提高用户体验。In the embodiment of the present application, when the fence event of entering the fence is obtained, the electronic device may determine the used NFC radio frequency parameters based on the fence event, the activation card and the first mapping relationship. At this time, the electronic device can determine in advance the radio frequency parameters used in NFC communication before the NFC card is swiped. In this way, even if the parameters used by different NFC card readers are not the same, the electronic device switches or determines the radio frequency parameters of the wireless signal communicated between the two devices in advance, thereby improving the probability of a successful one-time communication between the two devices. In turn, the number of failed card swipes by the user can be reduced, and the user experience can be improved.
在一种可能的实现方式中,在所述确定第一射频参数之前,所述电子设备当前所使用的NFC射频参数为主射频参数,所述第一射频参数为兼容射频参数;所述电子设备基于所述围栏事件,当前的激活卡片以及第一映射关系确定第一射频参数之后,所述方法还包括:所述电子设备将当前所使用的NFC射频参数从所述主射频参数切换为所述第一射频参数。这样,在进入围栏之前,电子设备所使用的射频参数为主射频参数,而在进入围栏之后,电子设备可以将所使用的射频参数可以基于围栏切换为一种兼容射频参数,使得电子设备能够提前切换所使用的不长使用的兼容射频参数,提高用户一次性刷卡的成功率,从而可以提高用户体验。In a possible implementation manner, before the determination of the first radio frequency parameter, the NFC radio frequency parameter currently used by the electronic device is a main radio frequency parameter, and the first radio frequency parameter is a compatible radio frequency parameter; the electronic device After determining the first radio frequency parameter based on the fence event, the current active card and the first mapping relationship, the method further includes: the electronic device switches the currently used NFC radio frequency parameter from the main radio frequency parameter to the The first radio frequency parameter. In this way, before entering the fence, the radio frequency parameter used by the electronic device is the main radio frequency parameter, and after entering the fence, the radio frequency parameter used by the electronic device can be switched to a compatible radio frequency parameter based on the fence, so that the electronic device can advance Switch the compatible radio frequency parameters that are not used for a long time to improve the success rate of the user's one-time card swiping, thereby improving the user experience.
在一种可能的实现方式中,在参数切换标志位为第一数的情况下,所述电子设备将所述参数切换标志位从所述第一数切换为第二数,所述参数切换标志位用于标识当前的电子设备所使用的射频参数,所述第一数表示所述电子设备所使用的射频参数为主射频参数,所述第二数表示所述电子设备所使用的射频参数为兼容射频参数。这样,在进入围栏之前,电子设备所使用的射频参数为主射频参数,参数切换标志位为第一数,而在进入围栏之后,电子设备所使用的射频参数为兼容射频参数,切换参数切换标志位为第二数,使得电子设备能够快速确定自身的参数类型为主射频参数还是兼容射频参数。In a possible implementation manner, when the parameter switching flag is a first number, the electronic device switches the parameter switching flag from the first number to a second number, and the parameter switching flag The bit is used to identify the radio frequency parameter used by the current electronic device, the first number indicates that the radio frequency parameter used by the electronic device is the main radio frequency parameter, and the second number indicates that the radio frequency parameter used by the electronic device is Compatible with RF parameters. In this way, before entering the fence, the radio frequency parameters used by the electronic equipment are the main radio frequency parameters, and the parameter switching flag is the first number; after entering the fence, the radio frequency parameters used by the electronic equipment are compatible radio frequency parameters, and the parameter switching flag is switched. The bit is the second number, so that the electronic device can quickly determine whether its own parameter type is the main radio frequency parameter or the compatible radio frequency parameter.
在一种可能的实现方式中,所述电子设备基于所述围栏事件,当前的激活卡片以及第一映射关系确定第一射频参数之后,所述方法还包括:所述电子设备获取卡片切换指令;所述电子设备基于所述卡片切换指令切换激活卡片;所述电子设备基于切换后的激活卡片、所述围栏事件和所述第一映射关系确定第二射频参数。这样,在一个围栏中,电子设备可能使用不同的NFC卡片进行刷卡,在电子设备已经进入某一围栏的情况下,切换了卡片进行的情况下,可以基于获取到的卡片切换指令来重新确定其使用的NFC射频参数,从而可以提前保证射频参数的正确性,进而可以提高一次性NFC通信成功的概率,可以提高用户体验。In a possible implementation manner, after the electronic device determines the first radio frequency parameter based on the fence event, the current active card and the first mapping relationship, the method further includes: the electronic device acquires a card switching instruction; The electronic device switches the active card based on the card switching instruction; the electronic device determines a second radio frequency parameter based on the switched active card, the fence event, and the first mapping relationship. In this way, in a fence, the electronic device may use different NFC cards to swipe the card. When the electronic device has entered a certain fence and the card is switched, it can be re-determined based on the card switching instruction obtained. The NFC radio frequency parameters used can ensure the correctness of the radio frequency parameters in advance, thereby improving the probability of successful one-time NFC communication and improving user experience.
在一种可能的实现方式中,在第一射频参数为兼容射频参数,所述第二射频参数为主射频参数的情况下,所述方法还包括:所述电子设备将当前所使用的射频参数从兼容射频参数切换为主射频参数。In a possible implementation manner, when the first radio frequency parameter is a compatible radio frequency parameter, and the second radio frequency parameter is a main radio frequency parameter, the method further includes: the electronic device sets the currently used radio frequency parameter to Switch from compatible radio parameters to main radio parameters.
在一种可能的实现方式中,所述方法还包括:在参数切换标志位为第二数的情况下,所述电子设备将所述参数切换标志位从所述第二数切换为第一数,所述参数切换标志位用于标识当前的电子设备所使用的射频参数,所述第一数表示所述电子设备所使用的射频参数为主射频参数,所述第二数表示所述电子设备所使用的射频参数为兼容射频参数。这样,在电子设备进入围栏的情况下,可以激活不同的卡片进行NFC刷卡,当第一射频参数为兼容射频参数的情况下,切换激活卡片后对应的第二射频参数为兼容射频参数的情况下,电子设备可以将对应的参数切换标志位进行切换,使得电子设备能够快速确定当前的射频参数状况。In a possible implementation manner, the method further includes: in the case that the parameter switching flag is a second number, the electronic device switches the parameter switching flag from the second number to the first number , the parameter switching flag is used to identify the radio frequency parameter used by the current electronic device, the first number indicates that the radio frequency parameter used by the electronic device is the main radio frequency parameter, and the second number indicates that the electronic device The RF parameters used are compatible RF parameters. In this way, when the electronic device enters the fence, different cards can be activated for NFC swiping. When the first radio frequency parameter is a compatible radio frequency parameter, the corresponding second radio frequency parameter after switching the activated card is a compatible radio frequency parameter. , the electronic device can switch the corresponding parameter switching flag, so that the electronic device can quickly determine the current radio frequency parameter status.
在一种可能的实现方式中,在第一射频参数为一种兼容射频参数,所述第二射频参数为另一种兼容射频参数的情况下,所述方法还包括:所述电子设备将当前所使用的射频参数从一种兼容射频参数切换为另一种兼容射频参数。In a possible implementation manner, when the first radio frequency parameter is a compatible radio frequency parameter, and the second radio frequency parameter is another compatible radio frequency parameter, the method further includes: the electronic device sets the current The used radio parameters were switched from one compatible radio parameter to another compatible radio parameter.
在一种可能的实现方式中,在第一射频参数为主射频参数,所述第二射频参数为兼容射频参数的情况下,所述方法还包括:所述电子设备将当前所使用的射频参数从主射频参数切换为兼容射频参数。In a possible implementation manner, when the first radio frequency parameter is the main radio frequency parameter and the second radio frequency parameter is a compatible radio frequency parameter, the method further includes: the electronic device sets the currently used radio frequency parameter to Switch from main radio parameters to compatible radio parameters.
在一种可能的实现方式中,所述方法还包括:在参数切换标志位为第一数的情况下,所述电子设备将所述参数切换标志位从所述第一数切换为第二数,所述参数切换标志位用于标识当前的电子设备所使用的射频参数,所述第一数表示所述电子设备所使用的射频参数为主射频参数,所述第二数表示所述电子设备所使用的射频参数为兼容射频参数。In a possible implementation manner, the method further includes: when the parameter switching flag is a first number, the electronic device switches the parameter switching flag from the first number to a second number , the parameter switching flag is used to identify the radio frequency parameter used by the current electronic device, the first number indicates that the radio frequency parameter used by the electronic device is the main radio frequency parameter, and the second number indicates that the electronic device The RF parameters used are compatible RF parameters.
在一种可能的实现方式中,在所述电子设备退出围栏和/或退出卡片激活状态的情况下,所述电子设备当前所使用的NFC射频参数为主射频参数。这样,在电子设备的退出围栏的情况下,可以基于退出围栏的围栏信息将射频参数切换为主射频参数,由于,电子设备的大部分使用到的射频参数为主射频参数,可以减少后续切换射频参数的次数,从而节约后续处理器切换的时间。In a possible implementation manner, when the electronic device exits the fence and/or exits the card activation state, the NFC radio frequency parameter currently used by the electronic device is the main radio frequency parameter. In this way, when the electronic equipment exits the fence, the radio frequency parameter can be switched to the main radio frequency parameter based on the fence information of the exit fence. Since the radio frequency parameter used by most of the electronic equipment is the main radio frequency parameter, subsequent switching of radio frequency parameters can be reduced. The number of parameters, thus saving the time of subsequent processor switching.
在一种可能的实现方式中,所述方法还包括:在所述参数切换标志位为第二数,且所述电子设备退出围栏和/或退出卡片激活状态的情况下,所述电子设备将所述参数切换标志位从所述第二数切换为第一数。这样,在电子设备的退出围栏的情况下,可以基于退出围栏的围栏信息将射频参数切换为主射频参数,由于,电子设备的大部分使用到的射频参数为主射频参数,可以减少后续切换射频参数的次数,从而节约后续处理器切换的时间。In a possible implementation manner, the method further includes: when the parameter switching flag bit is the second number and the electronic device exits the fence and/or exits the card activation state, the electronic device will The parameter switching flag is switched from the second number to the first number. In this way, when the electronic equipment exits the fence, the radio frequency parameter can be switched to the main radio frequency parameter based on the fence information of the exit fence. Since the radio frequency parameter used by most of the electronic equipment is the main radio frequency parameter, subsequent switching of radio frequency parameters can be reduced. The number of parameters, thus saving the time of subsequent processor switching.
在一种可能的实现方式中,在所述电子设备尚未接收到围栏事件的情况下,所述电子设备当前所使用的NFC射频参数为主射频参数。这样,由于电子设备的大部分使用到的射频参数为主射频参数,后续切换射频参数的概率较小,从而节约后续处理器切换的时间。In a possible implementation manner, when the electronic device has not received a fence event, the NFC radio frequency parameter currently used by the electronic device is a main radio frequency parameter. In this way, since the radio frequency parameters used by most of the electronic devices are the main radio frequency parameters, the probability of subsequent switching of the radio frequency parameters is relatively small, thereby saving the time for subsequent processor switching.
在一种可能的实现方式中,在所述电子设备尚未接收到围栏事件的情况下,所述电子设备将所述参数切换标志位设为第一数。这样,由于电子设备的大部分使用到的射频参数为主射频参数,后续切换射频参数的概率较小,从而节约后续处理器切换的时间。In a possible implementation manner, when the electronic device has not received a fence event, the electronic device sets the parameter switching flag bit to a first number. In this way, since the radio frequency parameters used by most of the electronic devices are the main radio frequency parameters, the probability of subsequent switching of the radio frequency parameters is relatively small, thereby saving the time for subsequent processor switching.
在一种可能的实现方式中,所述方法还包括:所述电子设备接收来自云端的第一指令,所述第一指令为参数添加指令、参数删除指令和参数更新指令中的一种或几种;所述电子设备基于所述第一指令对应调整所述第一映射关系。这样,由于设备的更新和变动,不同用户的第一映射关系可能是发生变化的,因此电子设备可以对应进行调整,提高电子设备确定的射频参数的准确性和时效性。In a possible implementation, the method further includes: the electronic device receives a first instruction from the cloud, and the first instruction is one or more of a parameter addition instruction, a parameter deletion instruction, and a parameter update instruction. type; the electronic device correspondingly adjusts the first mapping relationship based on the first instruction. In this way, due to updates and changes of devices, the first mapping relationship of different users may change, so the electronic device can make corresponding adjustments to improve the accuracy and timeliness of the radio frequency parameters determined by the electronic device.
第二方面,本申请提供了一种电子设备,包括:一个或多个处理器和一个或多个存储器,所述一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,以使得所述电子设备执行:In a second aspect, the present application provides an electronic device, including: one or more processors and one or more memories, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, when The one or more processors, when executing the computer instructions, cause the electronic device to:
获取围栏事件,所述围栏事件用于表示所述电子设备进入或退出某一围栏的情况;在所述电子设备进入围栏的情况下,基于所述围栏事件,当前的激活卡片以及第一映射关系确定第一射频参数,所述第一映射关系为围栏、卡片与射频参数之间的映射关系;所述第一映射关系中包括主射频参数和至少一种兼容射频参数;其中,所述第一射频参数作为所述电子设备当前所使用的NFC射频参数。Obtaining a fence event, the fence event is used to indicate that the electronic device enters or exits a certain fence; when the electronic device enters a fence, based on the fence event, the current activation card and the first mapping relationship Determine the first radio frequency parameter, the first mapping relationship is the mapping relationship between the fence, the card and the radio frequency parameter; the first mapping relationship includes the main radio frequency parameter and at least one compatible radio frequency parameter; wherein the first The radio frequency parameter is used as the NFC radio frequency parameter currently used by the electronic device.
其中,围栏事件可以分为进入围栏的围栏事件和退出围栏的围栏事件。电子设备在获取到进入围栏的围栏事件的情况下,实施上述的方法。Wherein, the fence event can be divided into a fence event entering the fence and a fence event exiting the fence. When the electronic device acquires the fence event of entering the fence, implement the above method.
在本申请实施例中,在获取到进入围栏的围栏事件的情况下,电子设备可以基于围栏事件、激活卡片和第一映射关系确定所使用的NFC射频参数。此时,电子设备可以在NFC刷卡之前,提前确定NFC通信时所用的射频参数。这样,即便不同的NFC读卡器使用的参数不尽相同,电子设备提前对两设备之间通信的无线信号的射频参数进行切换或者确定,从而可以提高两设备之间一次性通信成功的概率,进而可以减少用户刷卡失败的次数,提高用户体验。In the embodiment of the present application, when the fence event of entering the fence is obtained, the electronic device may determine the used NFC radio frequency parameters based on the fence event, the activation card and the first mapping relationship. At this time, the electronic device can determine in advance the radio frequency parameters used in NFC communication before the NFC card is swiped. In this way, even if the parameters used by different NFC card readers are not the same, the electronic device switches or determines the radio frequency parameters of the wireless signal communicated between the two devices in advance, thereby improving the probability of a successful one-time communication between the two devices. In turn, the number of failed card swipes by the user can be reduced, and the user experience can be improved.
在一种可能的实现方式中,在所述确定第一射频参数之前,所述电子设备当前所使用的NFC射频参数为主射频参数,所述第一射频参数为兼容射频参数;所述基于所述围栏事件,当前的激活卡片以及第一映射关系确定第一射频参数之后,所述电子设备还执行:将当前所使用的NFC射频参数从所述主射频参数切换为所述第一射频参数。这样,在进入围栏之前,电子设备所使用的射频参数为主射频参数,而在进入围栏之后,电子设备可以将所使用的射频参数可以基于围栏切换为一种兼容射频参数,使得电子设备能够提前切换所使用的不长使用的兼容射频参数,提高用户一次性刷卡的成功率,从而可以提高用户体验。In a possible implementation manner, before the determination of the first radio frequency parameter, the NFC radio frequency parameter currently used by the electronic device is the main radio frequency parameter, and the first radio frequency parameter is a compatible radio frequency parameter; After the fence event, the current active card and the first mapping relationship determine the first radio frequency parameter, the electronic device further executes: switching the currently used NFC radio frequency parameter from the main radio frequency parameter to the first radio frequency parameter. In this way, before entering the fence, the radio frequency parameter used by the electronic device is the main radio frequency parameter, and after entering the fence, the radio frequency parameter used by the electronic device can be switched to a compatible radio frequency parameter based on the fence, so that the electronic device can advance Switch the compatible radio frequency parameters that are not used for a long time to improve the success rate of the user's one-time card swiping, thereby improving the user experience.
在一种可能的实现方式中,所述电子设备还执行:在参数切换标志位为第一数的情况下,将所述参数切换标志位从所述第一数切换为第二数,所述参数切换标志位用于标识当前的电子设备所使用的射频参数,所述第一数表示所述电子设备所使用的射频参数为主射频参数,所述第二数表示所述电子设备所使用的射频参数为兼容射频参数。这样,在进入围栏之前,电子设备所使用的射频参数为主射频参数,参数切换标志位为第一数,而在进入围栏之后,电子设备所使用的射频参数为兼容射频参数,切换参数切换标志位为第二数,使得电子设备能够快速确定自身的参数类型为主射频参数还是兼容射频参数。In a possible implementation manner, the electronic device further performs: switching the parameter switching flag from the first number to the second number when the parameter switching flag is the first number, and the The parameter switching flag is used to identify the radio frequency parameter used by the current electronic device, the first number indicates that the radio frequency parameter used by the electronic device is the main radio frequency parameter, and the second number indicates the radio frequency parameter used by the electronic device The radio frequency parameters are compatible radio frequency parameters. In this way, before entering the fence, the radio frequency parameters used by the electronic equipment are the main radio frequency parameters, and the parameter switching flag is the first number; after entering the fence, the radio frequency parameters used by the electronic equipment are compatible radio frequency parameters, and the parameter switching flag is switched. The bit is the second number, so that the electronic device can quickly determine whether its own parameter type is the main radio frequency parameter or the compatible radio frequency parameter.
在一种可能的实现方式中,所述基于所述围栏事件,当前的激活卡片以及第一映射关系确定第一射频参数之后,所述电子设备还执行:获取卡片切换指令;基于所述卡片切换指令切换激活卡片;基于切换后的激活卡片、所述围栏事件和所述第一映射关系确定第二射频参数。这样,在一个围栏中,电子设备可能使用不同的NFC卡片进行刷卡,在电子设备已经进入某一围栏的情况下,切换了卡片进行的情况下,可以基于获取到的卡片切换指令来重新确定其使用的NFC射频参数,从而可以提前保证射频参数的正确性,进而可以提高一次性NFC通信成功的概率,可以提高用户体验。In a possible implementation manner, after determining the first radio frequency parameter based on the fence event, the current active card and the first mapping relationship, the electronic device further executes: acquiring a card switching instruction; Instructing to switch the active card; determining a second radio frequency parameter based on the switched active card, the fence event, and the first mapping relationship. In this way, in a fence, the electronic device may use different NFC cards to swipe the card. When the electronic device has entered a certain fence and the card is switched, it can be re-determined based on the card switching instruction obtained. The NFC radio frequency parameters used can ensure the correctness of the radio frequency parameters in advance, thereby improving the probability of successful one-time NFC communication and improving user experience.
在一种可能的实现方式中,在第一射频参数为兼容射频参数,所述第二射频参数为主射频参数的情况下,所述电子设备还执行:将当前所使用的射频参数从兼容射频参数切换为主射频参数。In a possible implementation manner, when the first radio frequency parameter is a compatible radio frequency parameter and the second radio frequency parameter is a main radio frequency parameter, the electronic device further performs: changing the currently used radio frequency parameter from the compatible radio frequency parameter to The parameter switches to the main RF parameter.
在一种可能的实现方式中,所述电子设备还执行:在参数切换标志位为第二数的情况下,将所述参数切换标志位从所述第二数切换为第一数,所述参数切换标志位用于标识当前的电子设备所使用的射频参数,所述第一数表示所述电子设备所使用的射频参数为主射频参数,所述第二数表示所述电子设备所使用的射频参数为兼容射频参数。这样,在电子设备进入围栏的情况下,可以激活不同的卡片进行NFC刷卡,当第一射频参数为兼容射频参数的情况下,切换激活卡片后对应的第二射频参数为兼容射频参数的情况下,电子设备可以将对应的参数切换标志位进行切换,使得电子设备能够快速确定当前的射频参数状况。In a possible implementation manner, the electronic device further performs: switching the parameter switching flag from the second number to the first number when the parameter switching flag is the second number, and the The parameter switching flag is used to identify the radio frequency parameter used by the current electronic device, the first number indicates that the radio frequency parameter used by the electronic device is the main radio frequency parameter, and the second number indicates the radio frequency parameter used by the electronic device The radio frequency parameters are compatible radio frequency parameters. In this way, when the electronic device enters the fence, different cards can be activated for NFC swiping. When the first radio frequency parameter is a compatible radio frequency parameter, the corresponding second radio frequency parameter after switching the activated card is a compatible radio frequency parameter. , the electronic device can switch the corresponding parameter switching flag, so that the electronic device can quickly determine the current radio frequency parameter status.
在一种可能的实现方式中,在第一射频参数为一种兼容射频参数,所述第二射频参数为另一种兼容射频参数的情况下,所述电子设备还执行:将当前所使用的射频参数从一种兼容射频参数切换为另一种兼容射频参数。In a possible implementation manner, when the first radio frequency parameter is a compatible radio frequency parameter, and the second radio frequency parameter is another compatible radio frequency parameter, the electronic device further executes: the currently used The radio parameters are switched from one compatible radio parameter to another compatible radio parameter.
在一种可能的实现方式中,在第一射频参数为主射频参数,所述第二射频参数为兼容射频参数的情况下,所述电子设备还执行:将当前所使用的射频参数从主射频参数切换为兼容射频参数。In a possible implementation manner, when the first radio frequency parameter is the main radio frequency parameter and the second radio frequency parameter is a compatible radio frequency parameter, the electronic device further executes: changing the currently used radio frequency parameter from the main radio frequency parameter to The parameters are switched to compatible RF parameters.
在一种可能的实现方式中,所述电子设备还执行:在参数切换标志位为第一数的情况下,将所述参数切换标志位从所述第一数切换为第二数,所述参数切换标志位用于标识当前的电子设备所使用的射频参数,所述第一数表示所述电子设备所使用的射频参数为主射频参数,所述第二数表示所述电子设备所使用的射频参数为兼容射频参数。In a possible implementation manner, the electronic device further performs: switching the parameter switching flag from the first number to the second number when the parameter switching flag is the first number, and the The parameter switching flag is used to identify the radio frequency parameter used by the current electronic device, the first number indicates that the radio frequency parameter used by the electronic device is the main radio frequency parameter, and the second number indicates the radio frequency parameter used by the electronic device The radio frequency parameters are compatible radio frequency parameters.
在一种可能的实现方式中,在所述电子设备退出围栏和/或退出卡片激活状态的情况下,所述电子设备当前所使用的NFC射频参数为主射频参数。这样,在电子设备的退出围栏的情况下,可以基于退出围栏的围栏信息将射频参数切换为主射频参数,由于,电子设备的大部分使用到的射频参数为主射频参数,可以减少后续切换射频参数的次数,从而节约后续处理器切换的时间。In a possible implementation manner, when the electronic device exits the fence and/or exits the card activation state, the NFC radio frequency parameter currently used by the electronic device is the main radio frequency parameter. In this way, when the electronic equipment exits the fence, the radio frequency parameter can be switched to the main radio frequency parameter based on the fence information of the exit fence. Since the radio frequency parameter used by most of the electronic equipment is the main radio frequency parameter, subsequent switching of radio frequency parameters can be reduced. The number of parameters, thus saving the time of subsequent processor switching.
在一种可能的实现方式中,所述电子设备还执行:在所述参数切换标志位为第二数,且所述电子设备退出围栏和/或退出卡片激活状态的情况下,将所述参数切换标志位从所述第二数切换为第一数。这样,在电子设备的退出围栏的情况下,可以基于退出围栏的围栏信息将射频参数切换为主射频参数,由于,电子设备的大部分使用到的射频参数为主射频参数,可以减少后续切换射频参数的次数,从而节约后续处理器切换的时间。In a possible implementation manner, the electronic device further executes: when the parameter switching flag is the second number and the electronic device exits the fence and/or exits the card activation state, set the parameter to The switching flag is switched from the second number to the first number. In this way, when the electronic equipment exits the fence, the radio frequency parameter can be switched to the main radio frequency parameter based on the fence information of the exit fence. Since the radio frequency parameter used by most of the electronic equipment is the main radio frequency parameter, subsequent switching of radio frequency parameters can be reduced. The number of parameters, thus saving the time of subsequent processor switching.
在一种可能的实现方式中,在所述电子设备尚未接收到围栏事件的情况下,所述电子设备当前所使用的NFC射频参数为主射频参数。这样,由于电子设备的大部分使用到的射频参数为主射频参数,后续切换射频参数的概率较小,从而节约后续处理器切换的时间。In a possible implementation manner, when the electronic device has not received a fence event, the NFC radio frequency parameter currently used by the electronic device is a main radio frequency parameter. In this way, since the radio frequency parameters used by most of the electronic devices are the main radio frequency parameters, the probability of subsequent switching of the radio frequency parameters is relatively small, thereby saving the time for subsequent processor switching.
在一种可能的实现方式中,所述电子设备还执行:接收来自云端的第一指令,所述第一指令为参数添加指令、参数删除指令和参数更新指令中的一种或几种;基于所述第一指令对应调整所述第一映射关系。这样,由于设备的更新和变动,不同用户的第一映射关系可能是发生变化的,因此电子设备可以对应进行调整,提高电子设备确定的射频参数的准确性和时效性。In a possible implementation, the electronic device further executes: receiving a first instruction from the cloud, where the first instruction is one or more of a parameter addition instruction, a parameter deletion instruction, and a parameter update instruction; The first instruction correspondingly adjusts the first mapping relationship. In this way, due to updates and changes of devices, the first mapping relationship of different users may change, so the electronic device can make corresponding adjustments to improve the accuracy and timeliness of the radio frequency parameters determined by the electronic device.
第三方面,本申请提供了一种电子设备,包括:一个或多个功能模块。一个或多个功能模块用于执行上述任一方面任一项可能的实现方式中的NFC射频参数兼容方法。In a third aspect, the present application provides an electronic device, including: one or more functional modules. One or more functional modules are used to execute the NFC radio frequency parameter compatibility method in any possible implementation manner of any of the above aspects.
第四方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得通信装置执行上述任一方面任一项可能的实现方式中的NFC射频参数兼容方法。In the fourth aspect, the embodiment of the present application provides a computer storage medium, including computer instructions, when the computer instructions are run on the electronic device, the communication device executes the NFC radio frequency parameters in any possible implementation of any of the above aspects. compatible method.
第五方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述任一方面任一项可能的实现方式中的NFC射频参数兼容方法。In the fifth aspect, the embodiment of the present application provides a computer program product, which, when the computer program product is run on a computer, causes the computer to execute the NFC radio frequency parameter compatibility method in any possible implementation of any one of the above aspects.
附图说明Description of drawings
图1A是本申请实施例提供的一种NFC卡应用场景的示意图;FIG. 1A is a schematic diagram of an NFC card application scenario provided by an embodiment of the present application;
图1B是本申请实施例提供的另一种NFC卡应用场景的示意图;Fig. 1B is a schematic diagram of another NFC card application scenario provided by the embodiment of the present application;
图2是本申请实施例提供的一种电子设备100的硬件结构示意图;FIG. 2 is a schematic diagram of a hardware structure of an electronic device 100 provided in an embodiment of the present application;
图3是本申请实施例提供的一种电子设备100的软件结构示意图;FIG. 3 is a schematic diagram of a software structure of an electronic device 100 provided in an embodiment of the present application;
图4是本申请实施例提供的一种电子设备与POS机之间的支付的流程示意图;FIG. 4 is a schematic flow diagram of payment between an electronic device and a POS machine provided in an embodiment of the present application;
图5是本申请实施例提供的一种NFC射频参数兼容方法的流程示意图;Fig. 5 is a schematic flow chart of an NFC radio frequency parameter compatibility method provided by an embodiment of the present application;
图6是本申请实施例提供的一种用户经过地理围栏的行动路线示意图;Fig. 6 is a schematic diagram of a user's action route passing through a geo-fence provided by an embodiment of the present application;
图7是本申请实施例提供的一种用户界面示意图;FIG. 7 is a schematic diagram of a user interface provided by an embodiment of the present application;
图8是本申请实施例提供的一种围栏和用户使用NFC卡片的分布示意图;Fig. 8 is a schematic diagram of the distribution of fences and users using NFC cards provided by the embodiment of the present application;
图9是本申请实施例提供的一种射频参数调整的流程示意图;FIG. 9 is a schematic flow diagram of a radio frequency parameter adjustment provided by an embodiment of the present application;
图10是本申请实施例提供的另一种射频参数调整的流程示意图;FIG. 10 is a schematic flowchart of another radio frequency parameter adjustment provided by the embodiment of the present application;
图11是本申请实施例提供的又一种射频参数调整的流程示意图;FIG. 11 is a schematic flowchart of another radio frequency parameter adjustment provided by the embodiment of the present application;
图12是本申请实施例提供的另一种NFC射频参数兼容方法的流程示意图;Fig. 12 is a schematic flowchart of another NFC radio frequency parameter compatibility method provided by the embodiment of the present application;
图13是本申请实施例提供的一种用户使用NFC卡片的流程示意图;Fig. 13 is a schematic flow diagram of a user using an NFC card provided by an embodiment of the present application;
图14是本申请实施例提供的另一种用户使用NFC卡片的流程示意图。Fig. 14 is a schematic flow diagram of another user using an NFC card provided by the embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. Among them, in the description of the embodiments of this application, unless otherwise specified, "/" means or means, for example, A/B can mean A or B; "and/or" in the text is only a description of associated objects The association relationship indicates that there may be three kinds of relationships, for example, A and/or B, which may indicate: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiment of the present application , "plurality" means two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, the "multiple" The meaning is two or more.
本申请实施例提供了一种NFC射频参数兼容方法及电子设备,可以提高NFC刷卡成功率。The embodiment of the present application provides an NFC radio frequency parameter compatibility method and electronic equipment, which can improve the success rate of NFC card swiping.
下面首先介绍本申请实施例涉及的相关的一些概念。Some related concepts involved in the embodiments of the present application are firstly introduced below.
近场通信技术Near Field Communication Technology
NFC又称近距离无线通信,是一种短距离的高频无线通信技术,允许电子设备之间进行非接触式点对点数据传输(在十厘米内)交换信息。NFC, also known as short-range wireless communication, is a short-range high-frequency wireless communication technology that allows non-contact point-to-point data transmission (within ten centimeters) to exchange information between electronic devices.
目前,具有NFC功能的电子设备广泛使用在日常生活中。例如,具有NFC功能的手机中,当手机靠近NFC读卡器(如,销售点(point of sale,POS)机)的情况下,读卡器可以进行信息交换,从而时间个各种NFC的功能。例如,支付刷卡、开门刷卡、数据传递等。Currently, electronic devices with NFC functions are widely used in daily life. For example, in a mobile phone with NFC function, when the mobile phone is close to an NFC card reader (such as a point of sale (POS) machine), the card reader can exchange information, thereby enabling various NFC functions. . For example, payment swiping card, door opening swiping card, data transfer, etc.
NFC电子设备使用的具体的不同功能可以不同,例如,公交乘车支付、银行卡刷卡、门卡开锁、地铁卡支付等等。The specific different functions used by the NFC electronic device may be different, for example, bus ride payment, bank card swiping, door card unlocking, subway card payment, and the like.
示例性地,图1A是本申请实施例示出的一种NFC卡应用场景的示意图。如图1A所示,用户打开手机NFC应用中的门卡,并将手机靠近门口处的NFC读卡器,此时手机可以与NFC读卡器进行数据交换,即可以通过手机完成开门的操作。Exemplarily, FIG. 1A is a schematic diagram of an application scenario of an NFC card shown in an embodiment of the present application. As shown in Figure 1A, the user opens the door card in the NFC application of the mobile phone, and puts the mobile phone close to the NFC card reader at the door. At this time, the mobile phone can exchange data with the NFC card reader, that is, the operation of opening the door can be completed through the mobile phone.
示例性地,图1B是本申请实施例示出的另一种NFC卡应用场景的示意图。如图1B所示,用户打开手机的NFC应用中的地铁卡,并将手靠近地铁闸机处的NFC读卡器,此时手机可以与NFC读卡器进行数据交换,即可以通过手机完成地铁刷卡支付的操作。Exemplarily, FIG. 1B is a schematic diagram of another NFC card application scenario shown in the embodiment of the present application. As shown in Figure 1B, the user opens the subway card in the NFC application of the mobile phone and puts his hand close to the NFC card reader at the subway gate. At this time, the mobile phone can exchange data with the NFC card reader, that is, the subway can be completed through the mobile phone. Operation of credit card payment.
在本申请实施例中,电子设备可以使用NFC功能的不同虚拟卡,例如,公交卡,地铁卡、门禁卡、银行卡等。In the embodiment of the present application, the electronic device can use different virtual cards with NFC functions, for example, a bus card, a subway card, an access control card, a bank card, and the like.
地理围栏(Geo-fencing)Geo-fencing
地理围栏是指在用户到达某一地理位置附近的情况下,用户的电子设备能够将监测到的电子设备当前所在的经纬度坐标、电子设备扫描到的小区(Cell)基站的标识或者电子设备扫描到的Wi-Fi信息(如Wi-Fi标识)。Geofencing means that when the user arrives near a certain geographical location, the user's electronic device can monitor the current latitude and longitude coordinates of the electronic device, the identity of the cell (Cell) base station scanned by the electronic device, or the electronic device. Wi-Fi information (such as Wi-Fi logo).
地理围栏可以根据不同的监测数据确定用户电子设备的位置。因此,地理围栏可以分为全球导航卫星系统(global navigation satellite system,GNSS)地理围栏、小区(Cell)地理围栏以及无线保真(wireless fidelity,Wi-Fi)地理围栏。Geofencing can determine the location of a user's electronic device based on various monitoring data. Therefore, geofences can be classified into global navigation satellite system (global navigation satellite system, GNSS) geofences, cell (Cell) geofences, and wireless fidelity (wireless fidelity, Wi-Fi) geofences.
GNSS地理围栏监测维度可以是手机的经纬度坐标。GNSS地理围栏的监测区域可以是以某地理位置坐标点为中心,以一定长度为半径的圆形区域,也可以是以多个地理位置坐标点为顶点,各顶点连接起来的多边形区域。The GNSS geographic fence monitoring dimension can be the latitude and longitude coordinates of the mobile phone. The monitoring area of the GNSS geo-fence can be a circular area with a certain geographic location coordinate point as the center and a certain length as the radius, or a polygonal area with multiple geographic location coordinate points as vertices and connected vertices.
Cell地理围栏的监测维度可以是手机扫描到的小区基站的标识。Cell地理围栏的监测区域可以是以一个或多个小区基站的信号覆盖范围。The monitoring dimension of the Cell geo-fence may be the identification of the base station of the cell scanned by the mobile phone. The monitoring area of the Cell geo-fence may be the signal coverage of one or more cell base stations.
Wi-Fi地理围栏的监测维度可以是手机扫描到的Wi-Fi信号。Wi-Fi地理围栏的监测区域可以是以一个或多个Wi-Fi信号覆盖范围。The monitoring dimension of the Wi-Fi geofence can be the Wi-Fi signal scanned by the mobile phone. The monitoring area of the Wi-Fi geo-fence can be covered by one or more Wi-Fi signals.
一种情况下,电子设备将当前的经纬度坐标与地理位置对应的位置信息进行匹配、匹配成功后手机可以确定用户进入该地理位置对应的GNSS地理围栏中。另一种情况下,电子设备将扫描到的小区(Cell)基站的标识与对应的小区基站的标识进行匹配、匹配成功后手机可以确定用户进入该地理位置对应的小区地理围栏中。又一种情况下,电子设备将扫描到的Wi-Fi标识与对应的Wi-Fi标识进行匹配、匹配成功后手机可以确定用户进入该地理位置对应的Wi-Fi地理围栏中。In one case, the electronic device matches the current latitude and longitude coordinates with the location information corresponding to the geographic location. After the matching is successful, the mobile phone can determine that the user enters the GNSS geofence corresponding to the geographic location. In another case, the electronic device matches the ID of the scanned cell (Cell) base station with the ID of the corresponding cell base station. After the matching is successful, the mobile phone can determine that the user enters the geographic fence of the cell corresponding to the geographic location. In another case, the electronic device matches the scanned Wi-Fi identifier with the corresponding Wi-Fi identifier. After the matching is successful, the mobile phone can determine that the user enters the Wi-Fi geofence corresponding to the geographic location.
需要说明的是,在本申请实施例中,地理围栏可以简称为围栏。It should be noted that, in this embodiment of the application, the geo-fence may be simply referred to as a fence.
下面介绍本申请实施例涉及的装置。The devices involved in the embodiments of the present application are introduced below.
图2为本申请实施例提供的一种电子设备100的硬件结构示意图。FIG. 2 is a schematic diagram of a hardware structure of an electronic device 100 provided in an embodiment of the present application.
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(Universal Serial Bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(Subscriber Identification Module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(Application Processor,AP),调制解调处理器,图形处理器(Graphics Processingunit,GPU),图像信号处理器(Image Signal Processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(Digital Signal Processor,DSP),基带处理器,和/或神经网络处理器(Neural-network Processing Unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。Wherein, the controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the
在一些实施例中,处理器110可以包括一个或多个接口。USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备100,例如AR设备等。In some embodiments,
充电管理模块140用于从充电器接收充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备100供电。The charging management module 140 is configured to receive a charging input from a charger. While the charging management module 140 is charging the battery 142 , it can also supply power to the electronic device 100 through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(Low Noise Amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。The
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A,
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(WirelessLocal Area Networks,WLAN)(如无线保真(Wireless Fidelity,Wi-Fi)网络),蓝牙(Bluetooth,BT),全球导航卫星系统(Global Navigation Satellite System,GNSS),调频(Frequency Modulation,FM),近距离无线通信技术(Near Field Communication,NFC),红外技术(Infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area network (WirelessLocal Area Networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (Bluetooth, BT), global navigation satellite system, etc. applied on the electronic device 100. (Global Navigation Satellite System, GNSS), frequency modulation (Frequency Modulation, FM), near field communication technology (Near Field Communication, NFC), infrared technology (Infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the
显示屏194用于显示图片,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used for displaying pictures, videos and the like. The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light emitting diode). AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
在图2所示的电子设备中为手机的示例性的说明,本申请实施例所指的电子设备还可以是平板电脑、手持计算机、智能手环等其他设备,电子设备的结构可以包括比图3所示的更多或者更少的模块。此处图3不对电子设备的硬件结构构成限定。The electronic device shown in Figure 2 is an exemplary illustration of a mobile phone. The electronic device referred to in the embodiment of the present application may also be a tablet computer, a handheld computer, a smart bracelet, and other devices. The structure of the electronic device may include a comparison diagram 3 more or fewer modules as shown. Here, FIG. 3 does not limit the hardware structure of the electronic device.
在图2所示的电子设备中为手机的示例性的说明,本申请实施例所指的电子设备还可以是平板电脑、手持计算机、智能手环等其他设备,电子设备的结构可以包括比图2所示的更多或者更少的模块。此处图2不对电子设备的硬件结构构成限定。The electronic device shown in Figure 2 is an exemplary illustration of a mobile phone. The electronic device referred to in the embodiment of the present application may also be a tablet computer, a handheld computer, a smart bracelet, and other devices. The structure of the electronic device may include a comparison diagram 2 more or fewer modules as shown. Here, FIG. 2 does not limit the hardware structure of the electronic device.
在本申请的一些示例中,如图2所示,实现电子设备NFC卡片(也可以称为NFC虚拟卡片,即电子设备已经开启的虚拟卡片)的自动切换,至少需要处理器,如传感集线器(sensorhub)、短距离芯片以及基带处理器(也可以称为基带芯片)等硬件的支持,还需要使用围栏的应用,如NFC卡包应用以及系统服务中的应用(如GPS应用、Wi-Fi应用)等软件的配合。软件和硬件之间可通过硬件连接层连接。In some examples of the present application, as shown in Figure 2, to realize the automatic switching of the electronic device NFC card (also called NFC virtual card, that is, the virtual card that the electronic device has turned on), requires at least a processor, such as a sensor hub (sensorhub), short-distance chips, and baseband processors (also called baseband chips) and other hardware support, applications that also need to use fences, such as NFC card package applications and applications in system services (such as GPS applications, Wi-Fi application) and other software. The software and hardware can be connected through the hardware connection layer.
图3为本申请实施例提供的一种电子设备100的软件结构示意图。FIG. 3 is a schematic diagram of a software structure of an electronic device 100 provided by an embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将系统分为六层,从上至下分别为应用程序层,应用程序框架层,运行时(Runtime)和系统库,硬件抽象层以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the system is divided into six layers, which are application program layer, application program framework layer, runtime (Runtime) and system library, hardware abstraction layer and kernel layer from top to bottom.
应用程序层可以包括一系列应用程序包。The application layer can consist of a series of application packages.
如图3所示,应用程序层可以包括通话,地图,钱包,导航,等应用程序(也可以称为应用)。As shown in FIG. 3 , the application program layer may include application programs (also referred to as applications) such as call, map, wallet, navigation, and the like.
应用程序框架层为应用程序层的应用程序提供应用编程接口(ApplicationProgramming Interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (Application Programming Interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图3所示,应用程序框架层可以包括电话管理器,内容提供器,视图系统,窗口管理器,基于位置的服务(Location Based Services,LBS)Service管理器,NFC Service管理器,资源管理器,通知管理器等。As shown in Figure 3, the application framework layer can include phone manager, content provider, view system, window manager, location-based services (Location Based Services, LBS) Service manager, NFC Service manager, resource manager , notification manager, etc.
电话管理器用于提供电子设备100的通信功能。例如通话卡状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100 . For example, the management of calling card status (including connecting, hanging up, etc.).
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. Said data may include calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有卡状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a card status bar, lock the screen, capture the screen, etc.
LBSService管理器用于提供电子设备100的位置功能。例如,确定电子设备的地理围栏等。The LBSService manager is used to provide the location function of the electronic device 100 . For example, determining geofences for electronic devices, etc.
NFC Service管理器用于提供电子设备100的NFC功能,例如,确定当前电子设备使用的NFC射频参数等。The NFC Service manager is used to provide the NFC function of the electronic device 100, for example, determine the NFC radio frequency parameters currently used by the electronic device, and the like.
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在卡状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部卡状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话界面形式出现在屏幕上的通知。例如在卡状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the card status bar, which can be used to convey notification-type messages, and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder, etc. The notification manager can also be a notification that appears on the top card status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog interface. For example, prompting text information in the card status bar, issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
运行时(Runtime)包括核心库和虚拟机。Runtime负责系统的调度和管理。Runtime (Runtime) includes the core library and virtual machine. Runtime is responsible for the scheduling and management of the system.
核心库包含两部分:一部分是编程语言(例如,java语言)需要调用的功能函数,另一部分是系统的核心库。The core library includes two parts: one part is the function function that the programming language (for example, java language) needs to call, and the other part is the core library of the system.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的编程文件(例如,java文件)执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes programming files (for example, java files) of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:NFC协议栈,表面管理器(SurfaceManager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),二维图形引擎(例如:SGL)等。A system library can include multiple function modules. For example: NFC protocol stack, surface manager (SurfaceManager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
NFC协议栈支持NFC功能,例如,确定NFC射频参数,完成NFC刷卡等。The NFC protocol stack supports NFC functions, for example, determining NFC radio frequency parameters, completing NFC card swiping, and so on.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了二维(2-Dimensional,2D)和三维(3-Dimensional,3D)图层的融合。The surface manager is used to manage the display subsystem, and provides fusion of two-dimensional (2-Dimensional, 2D) and three-dimensional (3-Dimensional, 3D) layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现3D图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
硬件抽象层(Hardware Abstraction Layer,HAL)是内核层和硬件层之间的接口层。硬件抽象层可以包括,LBS接口,NFC接口,蓝牙和相机等。Hardware Abstraction Layer (Hardware Abstraction Layer, HAL) is the interface layer between the kernel layer and the hardware layer. The hardware abstraction layer can include, LBS interface, NFC interface, Bluetooth and camera, etc.
内核层是硬件和软件之间的层。内核层至少包含通用异步收发传输器(universalasynchronous receiver/transmitter,UART)、两线式串行总线(interintegratedcircuit,I2C)和串行外设接口(serial peripheral interface,SPI)等。The kernel layer is the layer between hardware and software. The kernel layer includes at least a universal asynchronous receiver/transmitter (UART), a two-wire serial bus (interintegrated circuit, I2C) and a serial peripheral interface (serial peripheral interface, SPI).
在本申请实施例中,RIL是进应用程序的通信请求发送给可以包括两部分rild和Vendor RIL,rild负责通过接口socket或硬件抽象层接口定义语言(HAL interfacedefinition langaug,HIDL)与应用框架层进行通信。In the embodiment of the present application, RIL is sent to the communication request of the application program and may include two parts, rild and Vendor RIL. communication.
基于上述图2和图3中的软硬件架构,软件和硬件之间可通过硬件连接层连接。电子设备可以通过软硬件结合的实现NFC射频参数兼容的方法。Based on the above-mentioned software and hardware architectures in FIG. 2 and FIG. 3 , software and hardware can be connected through a hardware connection layer. The electronic device can realize the method of NFC radio frequency parameter compatibility through the combination of software and hardware.
首先,电子设备可以获取地理围栏。First, electronic devices can acquire geofences.
下面说明几种电子设备获取地理围栏的方法:The following describes several methods for electronic devices to obtain geofences:
在电子设备进入某一围栏或者退出某一围栏的时候,电子设备的LBS Service管理器可以监听到围栏事件,之后LBS Service管理器可以广播围栏事件。NFC Service管理器可以监听到围栏事件。NFCService管理器监听围栏事件的广播之后,可以基于可以基于当前的地理围栏、激活卡片和第一映射关系确定第一射频参数,具体可以参考步骤S503。NFCService管理器确定第一射频参数之后,可以通过系统库、硬件抽象层向内核层的NFC驱动发送第一射频参数,使得电子设备可以通过第一射频参数进行NFC通信。When the electronic device enters a certain fence or exits a certain fence, the LBS Service manager of the electronic device can monitor the fence event, and then the LBS Service manager can broadcast the fence event. The NFC Service Manager can monitor fence events. After the NFCService manager listens to the broadcast of the fence event, it can determine the first radio frequency parameter based on the current geofence, the activation card and the first mapping relationship. For details, refer to step S503. After the NFCService manager determines the first radio frequency parameter, it can send the first radio frequency parameter to the NFC driver at the kernel layer through the system library and the hardware abstraction layer, so that the electronic device can perform NFC communication through the first radio frequency parameter.
其中,应用程序层可以包括钱包应用,电子设备的钱包应用可以向NFCService管理器发送指令信息,例如,参数添加指令、参数删除指令和参数更新指令等。NFCService管理器接收到指令信息之后,可以基于指令信息调整第一映射关系,具体可以参考图9、图10和图11中的相关描述。之后NFCService管理器可以广播调整围栏的指令信息。LBSService管理器接收到NFCService管理器之后,可以基于指令信息调整自身的获取的围栏事件。Wherein, the application layer may include a wallet application, and the wallet application of the electronic device may send instruction information to the NFCService manager, for example, a parameter addition instruction, a parameter deletion instruction, and a parameter update instruction. After the NFCService manager receives the instruction information, it may adjust the first mapping relationship based on the instruction information. For details, reference may be made to related descriptions in FIG. 9 , FIG. 10 and FIG. 11 . Afterwards, the NFCService manager can broadcast instruction information for adjusting the fence. After receiving the NFCService manager, the LBSService manager can adjust the acquired fence event based on the instruction information.
下面介绍本申请实施例涉及的NFC的应用场景。The following introduces the application scenarios of the NFC involved in the embodiment of the present application.
示例性地,图4是本申请实施例公开的一种电子设备与POS机之间的支付的流程示意图,如图4所示,电子设备可以如图1A或图1B所示打开相应的NFC卡片,当电子设备靠近POS机,电子设备可以向POS机发送支付请求。在POS机接收到来自电子设备的支付请求之后,可以向电子设备发送支付应答。这样,电子设备与POS机之间便可以完成相成支付。经过上述的支付流程,POS机的对应商户可以完成对用户NFC卡片绑定的账户的清算。需要说明的是,图4的NFC的通信流程仅仅是一种举例说明,并不构成限定。Exemplarily, FIG. 4 is a schematic flow diagram of a payment between an electronic device and a POS machine disclosed in an embodiment of the present application. As shown in FIG. 4, the electronic device can open the corresponding NFC card as shown in FIG. 1A or FIG. 1B , when the electronic device is close to the POS machine, the electronic device can send a payment request to the POS machine. After the POS machine receives the payment request from the electronic device, it can send a payment response to the electronic device. In this way, mutual payment can be completed between the electronic device and the POS machine. After the above payment process, the corresponding merchant of the POS machine can complete the settlement of the account bound to the user's NFC card. It should be noted that, the NFC communication process in FIG. 4 is only an example for illustration and does not constitute a limitation.
在上述POS机与电子设备进行NFC通信的过程中,电子设备与POS机之间的NFC射频参数需要相互匹配。例如,电子设备向POS机发送的支付请求的无线信号,其频段应当在POS机接收等频段范围内,其发射功率应当使得POS机能够进行调制和解调等等。然而,一个电子设备需要与多个NFC读卡器设备进行NFC通信,多个NFC读卡器射频参数并不相同,这样,NFC通信时的射频参数可能不匹配,从而导致通信失败。During the NFC communication between the POS machine and the electronic device, the NFC radio frequency parameters between the electronic device and the POS machine need to match each other. For example, the frequency band of the wireless signal of the payment request sent by the electronic device to the POS machine should be within the frequency band of the POS machine, and its transmission power should enable the POS machine to perform modulation and demodulation. However, an electronic device needs to perform NFC communication with multiple NFC card reader devices, and the radio frequency parameters of the multiple NFC card readers are not the same. In this way, the radio frequency parameters during NFC communication may not match, resulting in communication failure.
在一种可能的实施方式中,电子设备可以接收来自服务器的射频参数配置表,射频参数配置表中可以包括各种应用代码、POS机的射频参数以及二者之间的对应关系。电子设备获取到应用的应用代码之后,可以基于上述对应关系确定POS机的射频参数。此后,电子设备可以根据POS机的射频参数进行配置,以便具有NFC功能的电子设备基于POS机的射频参数与POS进行通信。In a possible implementation manner, the electronic device may receive a radio frequency parameter configuration table from the server, and the radio frequency parameter configuration table may include various application codes, radio frequency parameters of the POS machine and the correspondence between the two. After the electronic device acquires the application code of the application, it can determine the radio frequency parameters of the POS machine based on the above correspondence. Thereafter, the electronic device can be configured according to the radio frequency parameters of the POS machine, so that the electronic device with NFC function can communicate with the POS based on the radio frequency parameters of the POS machine.
在上述的实现方式中,由于不同POS机性能不同,在电子设备通过NFC功能进行刷卡的过程中,所需要的参数也不尽相同。例如,不同POS机天线的大小有所差异,不同的NFC读卡器在通信时信号的频点有不同程度的偏差;POS机的接收灵敏度和收发功率等等性能均不尽相同。因此,当电子设备的NFC参数与POS的参数不匹配时,用户需要通过多次靠近POS机,才能够成功刷卡。因此,这种情况下,用户的NFC参数匹配的成功率低需要尝试多次刷卡,首次NFC通信的成功率低,用户使用NFC刷卡功能的体验差。In the above implementation manner, due to the different performances of different POS machines, the required parameters are also different in the process of swiping the card by the electronic device through the NFC function. For example, the size of the antenna of different POS machines is different, and the frequency point of the signal of different NFC card readers has different degrees of deviation during communication; the performance of receiving sensitivity and transmitting and receiving power of POS machines is not the same. Therefore, when the NFC parameters of the electronic device do not match the POS parameters, the user needs to approach the POS machine several times before successfully swiping the card. Therefore, in this case, the success rate of the user's NFC parameter matching is low, and the user needs to try to swipe the card multiple times, the success rate of the first NFC communication is low, and the user's experience of using the NFC card swiping function is poor.
针对上述问题,本申请实施例中,电子设备可以在用户尝试多次刷卡之前,可以根据当前所处的地理围栏,以及地理围栏、使用的卡片和射频参数的映射关系,将NFC参数提前切换为电子设备和POS机之间匹配的NFC射频参数,从而可以提高用户刷卡的成功率,减少用户的刷卡次数,提高用户体验。In view of the above problems, in the embodiment of the present application, before the user tries to swipe the card multiple times, the electronic device can switch the NFC parameters in advance according to the current geo-fence and the mapping relationship between the geo-fence, the card used and the radio frequency parameters. The NFC radio frequency parameters matched between the electronic device and the POS machine can improve the success rate of the user's card swiping, reduce the number of times the user swipes the card, and improve the user experience.
请参阅图5,图5为本申请实施例提供的一种NFC射频参数兼容方法的流程示意图,该方法可以由图3中所示的电子设备100来执行,该方法可以包括但不限于以下步骤:Please refer to FIG. 5. FIG. 5 is a schematic flowchart of a method for NFC radio frequency parameter compatibility provided by the embodiment of the present application. The method can be executed by the electronic device 100 shown in FIG. 3. The method can include but not limited to the following steps :
S501、电子设备获取围栏事件。S501. The electronic device acquires a fence event.
电子设备可以通过LBS模块接收来自GPS、小区通信事件和Wi-Fi的围栏事件,围栏事件可以是GNSS地理围栏事件、Cell地理围栏事件或者Wi-Fi地理围栏事件中的至少一种。围栏事件用于表示电子设备进入或退出某一围栏的情况,即围栏事件可以分为进入围栏的围栏事件和退出围栏的围栏事件。电子设备的LBS模块监听到围栏事件之后,可以广播围栏事件。对应地,电子设备的NFC模块可以监听到围栏事件。The electronic device can receive fence events from GPS, cell communication events, and Wi-Fi through the LBS module, and the fence event can be at least one of GNSS geo-fence events, Cell geo-fence events, or Wi-Fi geo-fence events. The fence event is used to indicate the situation that the electronic device enters or exits a certain fence, that is, the fence event can be divided into a fence event entering the fence and a fence event exiting the fence. After the LBS module of the electronic device monitors the fence event, it can broadcast the fence event. Correspondingly, the NFC module of the electronic device can monitor the fence event.
当电子设备检测接收到围栏事件时,可以基于上述的围栏事件确定当前的围栏。图6是本申请实施例公开的一种用户经过地理围栏的行动路线示意图。如图6所示,用户甲通过沿着路线01向前行进,在用户甲行进到A点的情况下,用户甲所使用的电子设备可以检测到进入第一围栏。在用户甲行进到B点的情况下,用户所使用的电子设备可以检测到退出第一围栏。即可以理解为,电子设备在进入某一围栏的时候,即可以获取到进入某一围栏的围栏事件;在退出某一围栏的时候,电子设备可以获取到退出某一围栏的围栏事件。即电子设备的NFC模块接收到围栏事件之后,可以基于围栏事件确定自身当前是否处于围栏之中,在处于围栏的情况下,是处于哪一个围栏中。例如,在用户甲在A点接收到进入第一围栏的围栏事件之后,可以确定自身处于围栏,且所处的这一围栏为第一围栏。在用户甲在B点接收到退出第一围栏的围栏事件之后,可以确定自身不处于围栏。When the electronic device detects that a fence event is received, the current fence may be determined based on the above fence event. FIG. 6 is a schematic diagram of an action route of a user passing through a geo-fence disclosed in an embodiment of the present application. As shown in FIG. 6 , user A travels forward along the
需要说明的是,地理围栏的具体形状不一定是圆形的,也可以是其他形状的,不做限定。在实际情况中,电子设备检测进入地理围栏和退出地理围栏的情况要比上述情况复杂。It should be noted that the specific shape of the geo-fence is not necessarily circular, but may also be in other shapes, which is not limited. In actual situations, the detection of electronic devices entering and exiting the geofence is more complicated than the above-mentioned situation.
S502、电子设备获取激活卡片。S502. The electronic device acquires an activation card.
电子设备可以通过NFC模块获取激活卡片。The electronic device can obtain the activation card through the NFC module.
以下说明电子设备确定激活卡片的具体方法:The following describes the specific method by which the electronic device determines the activation of the card:
一种可能的情况下,用户可以选择NFC的卡片的情况下,电子设备可以确定激活卡片。图7是本申请实施例公开的一种用户界面示意图。如图7中的(A)所示,电子设备可以显示用户界面10,用户界面10为用户使用的NFC卡包界面,其中可以包括小区门禁卡、智能门锁卡和公共交通卡这3张卡片。应理解,用户界面10包括的卡片类型和卡片数量仅仅是举例说明,不加限定。当用户需要使用到其中的智能门锁卡时,用户可以点击智能门锁卡对应的控件。电子设备可以响应于上述用户操作,显示如图7中的(B)所示的用户界面20。如图7中的(B)所示,用户界面20可以显示当前激活的卡片,即是智能门锁卡。用户可以使用当前的智能门锁卡进行刷卡。In a possible situation, when the user can select the NFC card, the electronic device can determine to activate the card. Fig. 7 is a schematic diagram of a user interface disclosed in the embodiment of the present application. As shown in (A) in Figure 7, the electronic device can display a
另一种可能的情况下,在用户将电子设备靠近NFC读卡器的情况下,电子设备在不必显示图7中的(A)和(B)所示的卡包的用户界面的情况下(不需要用户点击选择卡片的操作,电子设备便可以确定激活卡片),电子设备也可以获取激活卡片。In another possible situation, when the user brings the electronic device close to the NFC card reader, the electronic device does not need to display the user interface of the card package shown in (A) and (B) in Figure 7 ( The electronic device can determine the activation card without the operation of the user clicking to select the card), and the electronic device can also obtain the activation card.
示例性地,电子设备可以基于当前的地理围栏确定激活卡片。当电子设备获取到进入围栏的围栏事件之后,可以基于围栏事件确定当前所处的围栏,并可以基于围栏,以及围栏与卡片之间的对应关系确定电子设备需要激活的卡片,之后电子设备可以将确定的卡片进行激活。此后,电子设备可以获取到激活卡片。Exemplarily, the electronic device may determine to activate the card based on the current geo-fence. After the electronic device obtains the fence event of entering the fence, it can determine the fence it is currently in based on the fence event, and can determine the card that the electronic device needs to activate based on the fence and the correspondence between the fence and the card. The determined card is activated. Thereafter, the electronic device can obtain the activation card.
示例性地,电子设备可以基于检测到的射频信息确定附近NFC读卡器的类型,并基于这一NFC读卡器的类型确定激活的虚拟卡片。例如,当NFC读卡器为公交车上的POS机时,电子设备可以确定激活卡片为公共交通卡。Exemplarily, the electronic device may determine the type of the nearby NFC card reader based on the detected radio frequency information, and determine the activated virtual card based on the type of the NFC card reader. For example, when the NFC card reader is a POS machine on a bus, the electronic device can determine that the activation card is a public transportation card.
应理解,上述的电子设备获取激活卡片的方法仅仅为示例性的说明,不构成限定。It should be understood that the above-mentioned method for an electronic device to obtain an activation card is only an exemplary description and does not constitute a limitation.
需要说明的是,步骤S501和步骤S502先后顺序不加限定,可以是先获取围栏事件,后获取激活卡片;也可以是先激活卡片,后获取围栏事件。It should be noted that the order of step S501 and step S502 is not limited, and the fence event may be obtained first, and then the activation card may be obtained; or the card may be activated first, and then the fence event may be obtained.
S503、电子设备在进入围栏的情况下,基于围栏事件,激活卡片以及第一映射关系确定第一射频参数。S503. When the electronic device enters the fence, based on the fence event, the activation card and the first mapping relationship determine the first radio frequency parameter.
电子设备可以基于围栏事件确定自身进入围栏,在电子设备进入围栏的情况下,可以基于当前进入的围栏、激活卡片以及第一映射关系确定当前的第一射频参数。其中,第一射频参数为电子设备当前所使用的NFC射频参数。第一映射关系可以为电子设备存储的围栏、卡片与射频参数之间的映射关系,具体可以参考表1。The electronic device may determine that it has entered the fence based on the fence event. When the electronic device enters the fence, it may determine the current first radio frequency parameter based on the currently entered fence, the activation card, and the first mapping relationship. Wherein, the first radio frequency parameter is an NFC radio frequency parameter currently used by the electronic device. The first mapping relationship may be the mapping relationship between the fence, the card, and the radio frequency parameters stored in the electronic device. For details, refer to Table 1.
电子设备可以存储有第一映射关系,第一映射关系可以是一种映射表。The electronic device may store a first mapping relationship, and the first mapping relationship may be a mapping table.
表1Table 1
表1示出了一种围栏、卡片与射频参数之间的映射表。如表1所示,电子设备可以存储有一套主射频参数和n套兼容射频参数。其中,n、m和k为正整数,上述的卡1到卡m可以是上述公交卡、地铁卡、门锁卡等等其中的一个。射频参数包括谐振频率、载波波形、振幅深度、接收灵敏度、休眠参数等其中的一项或多项。电子设备可以按照不同的射频参数与NFC读卡器之间进行通信。在不同的兼容射频参数的映射关系中,围栏、卡和射频参数的兼容射频参数之间的映射关系,不加限定。其中,可以一个围栏对应一个卡,也可以多个围一个卡,也可以一个围栏对应多个卡,也可以多个围栏对应多个卡。表1中的一套主射频参数为电子设备最常使用的NFC射频参数,而其他的几套兼容射频参数电子设备的使用频率均低于主射频参数。Table 1 shows a mapping table among fences, cards and radio frequency parameters. As shown in Table 1, the electronic device may store a set of main radio frequency parameters and n sets of compatible radio frequency parameters. Wherein, n, m and k are positive integers, and the above-mentioned card 1 to card m may be one of the above-mentioned bus cards, subway cards, door lock cards and the like. The radio frequency parameters include one or more of resonance frequency, carrier waveform, amplitude depth, receiving sensitivity, sleep parameters, etc. Electronic devices can communicate with NFC readers according to different radio frequency parameters. In the mapping relationship of different compatible radio frequency parameters, the mapping relationship among the compatible radio frequency parameters of the fence, the card and the radio frequency parameter is not limited. Wherein, one fence may correspond to one card, or multiple fences may correspond to one card, or one fence may correspond to multiple cards, or multiple fences may correspond to multiple cards. A set of main radio frequency parameters in Table 1 is the most commonly used NFC radio frequency parameters for electronic devices, while other sets of compatible radio frequency parameter electronic devices are used less frequently than the main radio frequency parameters.
需要说明的是,表1仅仅是举例说明一种可能的情况,不构成限定。It should be noted that Table 1 is only an example to illustrate a possible situation, and does not constitute a limitation.
在一种可能的实施方式中,电子设备可以基于确定的当前的围栏和激活卡片从表1中查找围栏和激活卡片对应的射频参数。一种情况下,当表1中不存在这一围栏和卡片对应的兼容射频参数的情况下,电子设备确定使用主射频参数,即第一射频参数为主射频参数。例如,当检测到电子设备进入围栏1,且激活卡片为卡5的情况下,表1中不存在这一映射关系的兼容性参数,电子设备可以确定使用主射频参数。另一种情况下,当表1中存在这一围栏和卡片对应的兼容射频参数的情况下,电子设备确定使用这个对应的兼容射频参数,即第一射频参数为某一个兼容射频参数。例如,当检测到电子设备进入围栏1,且激活卡为卡1的情况下,基于表1中这一映射关系,确定兼容性参数1,电子设备可以确定使用兼容性参数1,即可以确定当前的第一射频参数为兼容性参数1。In a possible implementation manner, the electronic device may look up radio frequency parameters corresponding to the fence and the activation card from Table 1 based on the determined current fence and the activation card. In one case, when there is no compatible radio frequency parameter corresponding to the fence and the card in Table 1, the electronic device determines to use the main radio frequency parameter, that is, the first radio frequency parameter is the main radio frequency parameter. For example, when it is detected that the electronic device enters the fence 1, and the activated card is card 5, there is no compatibility parameter of this mapping relationship in Table 1, and the electronic device can determine to use the main radio frequency parameter. In another case, when there is a compatible radio frequency parameter corresponding to the fence and the card in Table 1, the electronic device determines to use the corresponding compatible radio frequency parameter, that is, the first radio frequency parameter is a certain compatible radio frequency parameter. For example, when it is detected that the electronic device enters fence 1, and the activated card is card 1, based on the mapping relationship in Table 1, compatibility parameter 1 is determined, and the electronic device can determine to use compatibility parameter 1, that is, it can determine the current The first radio frequency parameter of is compatibility parameter 1.
在电子设备确定第一射频参数之后,还可以确定参数切换标志位。在电子设备将第一射频参数从主射频参数切换到兼容射频参数的情况下,电子设备将参数切换标志位从第一数切换为第二数。其中,第一数表示当前的射频参数为主射频参数,第二数表示当前的射频参数为兼容射频参数。在电子设备将第一射频参数从兼容射频参数切换到主射频参数的情况下,电子设备将参数切换标志位从第二数切换为第一数。在电子设备保持主射频参数不变的情况下,电子设备保持参数切换标志位为第一数。在电子设备保持兼容射频参数不变或者从一个兼容射频参数切换到另一个兼容射频参数的情况下,电子设备保持参数切换标志位为第二数。其中,参数切换标志位可以用具体的数表示,例如,第一数为“0”,第二数为“1”,在电子设备将第一射频参数从主射频参数切换到兼容射频参数的情况下,电子设备将参数切换标志位从“0”切换为“1”。After the electronic device determines the first radio frequency parameter, it may further determine a parameter switching flag. When the electronic device switches the first radio frequency parameter from the main radio frequency parameter to the compatible radio frequency parameter, the electronic device switches the parameter switching flag from the first number to the second number. Wherein, the first number indicates that the current radio frequency parameter is the main radio frequency parameter, and the second number indicates that the current radio frequency parameter is a compatible radio frequency parameter. When the electronic device switches the first radio frequency parameter from the compatible radio frequency parameter to the main radio frequency parameter, the electronic device switches the parameter switching flag from the second number to the first number. In the case that the electronic device keeps the main radio frequency parameter unchanged, the electronic device keeps the parameter switching flag as the first number. When the electronic device keeps the compatible radio frequency parameters unchanged or switches from one compatible radio frequency parameter to another compatible radio frequency parameter, the electronic device keeps the parameter switching flag at the second number. Among them, the parameter switching flag can be represented by a specific number, for example, the first number is "0", and the second number is "1". When the electronic device switches the first radio frequency parameter from the main radio frequency parameter to the compatible radio frequency parameter Next, the electronic device switches the parameter switching flag from "0" to "1".
需要说明的是,电子设备确定射频参数和确定参数切换标志位之间存在对应的关系,但是执行顺序不加限定。可以先确定射频参数,后确定参数切换标志位;也可以先确定参数切换标志位,后确定射频参数。It should be noted that there is a corresponding relationship between determining the radio frequency parameter and determining the parameter switching flag bit by the electronic device, but the execution sequence is not limited. The radio frequency parameters can be determined first, and then the parameter switching flag can be determined; or the parameter switching flag can be determined first, and then the radio frequency parameters can be determined.
以下示例性地说明几种可能的确定第一射频参数的情况:The following exemplarily illustrates several possible situations of determining the first radio frequency parameter:
情况1:从主射频参数切换为兼容射频参数。Case 1: Switch from main radio frequency parameters to compatible radio frequency parameters.
用户在进入围栏前的第一射频参数为主射频参数,进入围栏之后使用卡片的对应的NFC参数是兼容射频参数。如图6所示,电子设备从未进入第一围栏时,第一射频参数为主射频参数。用户甲从A点进入第一围栏之后,电子设备检测到围栏事件,并确定围栏为第一围栏(假设第一围栏为围栏1)。如图7所示,当电子设备打开智能门锁卡之后,电子设备可以确定当前的激活卡片为智能门锁卡(假设,智能门锁卡为卡1)。之后电子设备可以根据表1查找得到围栏1和卡1对应的射频参数为兼容射频参数1,此时,电子设备可以确定当前的第一射频参数为兼容射频参数1。此外,电子设备可以将参数切换标志位从第一数切换为第二数。The first radio frequency parameter of the user before entering the fence is the main radio frequency parameter, and the corresponding NFC parameter of the card used after entering the fence is a compatible radio frequency parameter. As shown in FIG. 6 , when the electronic device never enters the first fence, the first radio frequency parameter is the main radio frequency parameter. After user A enters the first fence from point A, the electronic device detects the fence event and determines that the fence is the first fence (assuming that the first fence is fence 1). As shown in FIG. 7 , after the electronic device unlocks the smart door lock card, the electronic device can determine that the current activated card is the smart door lock card (assuming that the smart door lock card is card 1). Afterwards, the electronic device can search according to Table 1 and obtain that the radio frequency parameter corresponding to the fence 1 and the card 1 is the compatible radio frequency parameter 1. At this time, the electronic device can determine that the current first radio frequency parameter is the compatible radio frequency parameter 1. In addition, the electronic device can switch the parameter switching flag from the first number to the second number.
情况2:保持主射频参数不变。Case 2: Keep the main radio frequency parameters unchanged.
用户在进入围栏前的第一射频参数为主射频参数,进入围栏之后使用卡片的对应的NFC参数也是主射频参数。在电子设备尚未进入围栏之前,第一射频参数为主射频参数。用户甲从A点进入第一围栏之后,电子设备检测到围栏事件,并确定围栏为第一围栏(假设第一围栏为围栏6)。如图7所示,当电子设备打开智能门锁卡之后,电子设备可以确定当前的激活卡片为智能门锁卡(假设,智能门锁卡为卡5)。之后电子设备在表1未查找到围栏6和卡5对应的射频参数,此时,电子设备可以确定当前的第一射频参数仍然为主射频参数。此外,电子设备可以将参数切换标志位保持第一数不变。The first radio frequency parameter of the user before entering the fence is the main radio frequency parameter, and the corresponding NFC parameter of using the card after entering the fence is also the main radio frequency parameter. Before the electronic device enters the fence, the first radio frequency parameter is the main radio frequency parameter. After user A enters the first fence from point A, the electronic device detects the fence event and determines that the fence is the first fence (assuming that the first fence is fence 6). As shown in FIG. 7 , after the electronic device unlocks the smart door lock card, the electronic device can determine that the current activation card is the smart door lock card (assuming that the smart door lock card is card 5 ). Afterwards, the electronic device does not find the radio frequency parameters corresponding to the fence 6 and the card 5 in Table 1. At this time, the electronic device can determine that the current first radio frequency parameter is still the main radio frequency parameter. In addition, the electronic device may keep the parameter switching flag bit unchanged at the first number.
用户在同一个围栏中,切换使用的卡片时,切换前后的卡片对应的NFC射频参数均为主射频参数。例如,用户甲在第一围栏之内,电子设备在使用其中一张卡的情况下,确定使用的NFC射频参数(第一射频参数)为主射频参数,在电子设备使用另一张卡时,确定第一射频参数同样是主射频参数,电子设备可以保持第一射频参数为主射频参数不变,并参数切换标志位保持第一数不变。When the user switches cards in the same fence, the NFC radio frequency parameters corresponding to the cards before and after switching are the main radio frequency parameters. For example, user A is within the first fence, and the electronic device determines that the NFC radio frequency parameter (the first radio frequency parameter) used is the main radio frequency parameter when using one of the cards. When the electronic device uses another card, It is determined that the first radio frequency parameter is also the main radio frequency parameter, and the electronic device can keep the first radio frequency parameter unchanged as the main radio frequency parameter, and keep the parameter switching flag bit unchanged at the first number.
情况3:兼容射频参数切换为主射频参数。Case 3: The compatible radio parameters are switched to the main radio parameters.
用户在同一个围栏中,切换激活卡片时,切换前用户使用的激活卡片为兼容射频参数,而在切换之后用户使用的卡片对应的NFC参数为主射频参数。用户在第一围栏之内,电子设备在使用其中一张卡的情况下,确定使用的NFC射频参数(第一射频参数)为兼容射频参数,在电子设备使用另一张卡时,确定第一射频参数是主射频参数(第二射频参数),电子设备可以将所使用的射频参数从兼容射频参数切换为主射频参数,并将参数切换标志位从第二数切换为第一数。When the user is in the same fence, when switching the activation card, the activation card used by the user before the switch is compatible with the radio frequency parameters, and the NFC parameter corresponding to the card used by the user after the switch is the main radio frequency parameter. The user is within the first fence, and the electronic device determines that the NFC radio frequency parameter (the first radio frequency parameter) used is a compatible radio frequency parameter when using one of the cards, and determines that the first radio frequency parameter is used when the electronic device uses another card. The radio frequency parameter is the main radio frequency parameter (second radio frequency parameter). The electronic device can switch the used radio frequency parameter from the compatible radio frequency parameter to the main radio frequency parameter, and switch the parameter switching flag from the second number to the first number.
情况4:一个兼容射频参数切换为另一个兼容射频参数。Case 4: One compatible radio frequency parameter is switched to another compatible radio frequency parameter.
用户在同一个围栏中,切换激活卡片时,切换前用户使用的激活卡片为一种兼容射频参数,而在切换之后用户使用的激活卡片对应的NFC参数为另一种兼容射频参数。用户在第一围栏之内,电子设备在使用其中一张卡的情况下,确定使用的NFC射频参数(第一射频参数)为一种兼容射频参数,在电子设备使用另一张卡时,确定第一射频参数是另一种兼容射频参数(第二射频参数),电子设备可以将所使用的射频参数从一种兼容射频参数切换为另一种兼容射频参数,并保持参数切换标志位为第二数不变。When the user is in the same fence, when switching the activation card, the activation card used by the user before the switch is a compatible radio frequency parameter, and the NFC parameter corresponding to the activation card used by the user after the switch is another compatible radio frequency parameter. The user is within the first fence, and the electronic device determines that the NFC radio frequency parameter (first radio frequency parameter) used is a compatible radio frequency parameter when using one of the cards, and determines that the electronic device uses another card. The first radio frequency parameter is another compatible radio frequency parameter (second radio frequency parameter), and the electronic device can switch the used radio frequency parameter from one kind of compatible radio frequency parameter to another kind of compatible radio frequency parameter, and keep the parameter switching flag as the first The second number remains unchanged.
电子设备的可以存储有第一映射关系,以下说明确定第一映射关系的具体方法。The electronic device may store a first mapping relationship, and a specific method for determining the first mapping relationship will be described below.
图8是本申请实施例公开的一种围栏和用户使用NFC卡片的分布示意图。如图8所示,用户的所使用的电子设备中有m张NFC卡片,用户通常会在不同的围栏使用到上述m张卡片。在围栏1中,电子设备可以检测到用户能够使用的有两张卡片,卡1和卡2,此时,卡1和卡2对应的NFC射频参数均为兼容射频参数1(斜线的圆圈表示为射频参数为兼容射频参数1)。在围栏2中,电子设备可以检测到用户能够使用的有两张卡片,卡1和卡3,此时,卡1对应的NFC射频参数为主射频参数(黑色的圆圈表示为射频参数为主射频参数),卡3对应的NFC射频参数为兼容射频参数2(点状的圆圈表示为射频参数为兼容射频参数2)。在围栏3中,电子设备可以检测到用户能够使用的有两张卡片,卡1和卡3,此时,卡1对应的NFC射频参数为主射频参数,卡3对应的NFC射频参数为兼容射频参数2。围栏2和围栏3中卡3对应的NFC兼容参数均为兼容射频参数2。在围栏k中,电子设备可以检测到用户能够使用的有1张卡片,卡m,此时,卡m对应的NFC射频参数为兼容射频参数n。在围栏x中,电子设备可以检测到用户能够使用的有两张卡片,卡1和卡2,此时,卡1和卡2对应的NFC射频参数为主射频参数。基于图8的分布,映射关系可以不需要反映主射频参数对应的围栏和卡片,而是需要反映兼容射频参数对应的围栏和卡片,电子设备存储的第一映射关系可以为表1所示的映射表。Fig. 8 is a schematic diagram of a fence and the distribution of users using NFC cards disclosed in the embodiment of the present application. As shown in FIG. 8 , there are m NFC cards in the electronic device used by the user, and the user usually uses the above m cards in different fences. In fence 1, the electronic device can detect that there are two cards that the user can use, card 1 and card 2. At this time, the NFC radio frequency parameters corresponding to card 1 and card 2 are compatible with radio frequency parameter 1 (the slashed circle indicates is the radio frequency parameter and is the compatible radio frequency parameter 1). In fence 2, the electronic device can detect that there are two cards that the user can use, card 1 and card 3. At this time, the NFC radio frequency parameter corresponding to card 1 is the main radio frequency parameter (the black circle indicates that the radio frequency parameter is the main radio frequency parameter) parameter), the NFC radio frequency parameter corresponding to card 3 is compatible radio frequency parameter 2 (dotted circle indicates that the radio frequency parameter is compatible radio frequency parameter 2). In fence 3, the electronic device can detect that there are two cards that the user can use, card 1 and card 3. At this time, the NFC radio frequency parameters corresponding to card 1 are the main radio frequency parameters, and the NFC radio frequency parameters corresponding to card 3 are compatible radio frequency parameters. parameter2. The NFC compatible parameters corresponding to card 3 in fence 2 and fence 3 are compatible radio frequency parameter 2. In the fence k, the electronic device can detect that there is one card, card m, that can be used by the user. At this time, the NFC radio frequency parameter corresponding to the card m is the compatible radio frequency parameter n. In fence x, the electronic device can detect that there are two cards that the user can use, card 1 and card 2. At this time, the NFC radio frequency parameters corresponding to card 1 and card 2 are the main radio frequency parameters. Based on the distribution in Figure 8, the mapping relationship does not need to reflect the fences and cards corresponding to the main radio frequency parameters, but needs to reflect the fences and cards corresponding to the compatible radio frequency parameters, and the first mapping relationship stored in the electronic device can be the mapping shown in Table 1 surface.
在第一映射关系中,每一种射频参数应当均不相同。射频参数可以基于不同的方式区分射频参数,以下具体说明:In the first mapping relationship, each radio frequency parameter should be different. Radio frequency parameters can be distinguished based on different methods, as follows:
一种可能的方式中,射频参数种类可以按照不同的NFC读卡器设备的厂商划分。由于不同厂商的设备,使用的NFC射频参数不同,因此按照不同厂商可以划分射频参数。例如,厂商A和厂商B均生产NFC读卡器设备,厂商A的生产的设备a1和设备a2,均可以通过射频参数a进行通信。厂商B的生产的设备b1可以通过射频参数b进行通信。In a possible manner, the types of radio frequency parameters may be divided according to different manufacturers of NFC card reader devices. Since devices of different manufacturers use different NFC radio frequency parameters, the radio frequency parameters can be divided according to different manufacturers. For example, both manufacturer A and manufacturer B produce NFC card reader devices, and the devices a1 and a2 produced by manufacturer A can both communicate through the radio frequency parameter a. The device b1 produced by the manufacturer B can communicate through the radio frequency parameter b.
另一种可能的方式中,射频参数种类可以按照不同的卡片的卡类型划分。用户可能使用的不同种类的公共交通卡和门禁卡等。例如,可以将所有公共交通卡类型(如用户使用上海和深圳的两种公共交通卡,两种卡对应的射频参数相同)的卡片设为一种射频参数,将所有门禁卡确定一种射频参数。In another possible manner, the types of radio frequency parameters may be divided according to card types of different cards. Different types of public transportation cards and access control cards that users may use. For example, it is possible to set all types of public transport cards (for example, if a user uses two public transport cards in Shanghai and Shenzhen, and the corresponding radio frequency parameters of the two cards are the same) as one radio frequency parameter, and set all access control cards to one radio frequency parameter .
又一种可能的方式中射频参数可以按照不同的地理位置划分。由于不用的用户可能在不同的地方工作和生活,可以按照不同的地区划分射频参数的类型。例如,北京使用射频参数1,上海使用射频参数2,广州使用射频参数3等。In yet another possible manner, radio frequency parameters may be divided according to different geographic locations. Since different users may work and live in different places, the types of radio frequency parameters can be divided according to different regions. For example, Beijing uses RF parameter 1, Shanghai uses RF parameter 2, Guangzhou uses RF parameter 3, and so on.
需要说明的是,上述的射频参数的划分方式仅仅是举例说明,确定第一映射关系可以按照上述的一种或多种射频参数的划分方式,也可以使用其他划分方式,不加限定。It should be noted that the above-mentioned division methods of radio frequency parameters are just examples, and the first mapping relationship may be determined according to the above-mentioned one or more division methods of radio frequency parameters, and other division methods may also be used, without limitation.
此外,还需要说明的是,电子设备存储的第一映射关系可以包括一套映射关系,也可以包括多套映射关系。当用户不同城市使用NFC的情况下,电子设备可以所有城市均使用一套映射表,也不同城市使用不同的映射表。一种可能的情况下,电子设备可以包括多套映射表,这一套映射表可以对应使用在不同的每个地区,一套映射表可以在多个地区使用。例如,表a使用在城市A,表b使用在城市B,表c使用在城市C和城市D。另一种可能的情况下,电子设备可以包括一套映射表,这一套映射表可以供所有地区使用NFC。例如,表a使用在所有城市。In addition, it should be noted that the first mapping relationship stored in the electronic device may include one set of mapping relationships, or may include multiple sets of mapping relationships. When the user uses NFC in different cities, the electronic device can use a set of mapping tables for all cities, or use different mapping tables for different cities. In a possible situation, the electronic device may include multiple sets of mapping tables, one set of mapping tables may be used in different regions, and one set of mapping tables may be used in multiple regions. For example, table a is used in city A, table b is used in city B, and table c is used in city C and city D. In another possible situation, the electronic device can include a set of mapping tables, and this set of mapping tables can be used by all regions to use NFC. For example, table a is used in all cities.
第一映射关系具体反映的是用户的活动范围,活动范围所使用的卡片和电子设备的NFC模块所使用到的射频参数,以及三者之间的映射关系。如图8所示,第一映射关系能够具体地和用户有紧密的关联,这种关联使得第一映射关系能够使得电子设备更加准确、快速地确定NFC通信时所述使用的射频参数。The first mapping relationship specifically reflects the range of activities of the user, the card used in the range of activities and the radio frequency parameters used by the NFC module of the electronic device, and the mapping relationship between the three. As shown in FIG. 8 , the first mapping relationship can be specifically closely related to the user, and this association enables the first mapping relationship to enable the electronic device to more accurately and quickly determine the radio frequency parameters used during NFC communication.
随着时间的变化,NFC读卡器设备可能会进行更新和新增等调整,因此,当NFC读卡器射频参数有所调整的情况下,电子设备存储的第一映射关系也会随之进行调整,以适应用户所使用到的NFC读卡器的变化。以下具体说明表1中NFC的射频参数调整的几种实施方式:As time changes, the NFC card reader device may undergo adjustments such as updates and additions. Therefore, when the radio frequency parameters of the NFC card reader are adjusted, the first mapping relationship stored in the electronic device will also follow. Adjust to accommodate changes in the NFC reader used by the user. Several implementations of radio frequency parameter adjustment of NFC in Table 1 are specifically described below:
实施方式1:添加射频参数。Embodiment 1: Add radio frequency parameters.
随着用户使用NFC卡片范围的拓宽,以及对应NFC读卡器的兼容射频参数的增加,可能有新的兼容射频参数并未存储在第一映射关系中,因此,对应需要添加新的兼容射频参数。With the expansion of the range of NFC cards used by users and the increase of compatible radio frequency parameters corresponding to NFC card readers, there may be new compatible radio frequency parameters that are not stored in the first mapping relationship. Therefore, new compatible radio frequency parameters need to be added accordingly .
图9是本申请实施例公开的一种射频参数调整的流程示意图。如图9所示,当云端服务器(即云端)获取到参数添加指令的情况下,可以向电子设备的钱包(如手机可以含有钱包应用)发送参数添加指令。参数添加指令用于指令电子设备添加第一映射关系中的射频参数,参数添加指令可以包括射频参数信息、围栏信息和卡片信息,参数添加指令还可以包括添加标志位,例如,“00”。参数添加指令中射频参数信息、围栏信息和卡片信息存在对应关系。钱包应用接收到来自云端服务器的参数添加指令之后,可以向电子设备的NFC模块发送参数添加指令。NFC模块接收到来自钱包的参数添加指令之后,可以基于参数添加指令增加第一映射关系的射频参数以及对应围栏和卡片信息。即可以将射频参数作为一种兼容射频参数存储到第一映射关系中,且存储的射频参数与卡片、围栏进行对应。之后NFC模块可以向电子设备的LBS模块发送添加围栏指令。LBS模块接收到来自NFC模块的添加围栏指令之后,可以添加能够监听的围栏事件。其中,添加围栏指令可以包括围栏信息和添加围栏标志位。具体地,NFC模块获取到参数添加指令之后,确定是否需要将新的围栏添加到第一映射关系中,当需要的情况下,NFC模块可以向LBS模块发送添加围栏指令,添加围栏指令可以包括围栏信息和添加围栏标志位,可以包括将这一新的围栏。电子设备的LBS模块可以基于添加围栏指令获取围栏事件。Fig. 9 is a schematic flowchart of radio frequency parameter adjustment disclosed in the embodiment of the present application. As shown in FIG. 9 , when the cloud server (that is, the cloud) obtains the parameter addition instruction, it can send the parameter addition instruction to the wallet of the electronic device (for example, the mobile phone may contain a wallet application). The parameter adding instruction is used to instruct the electronic device to add radio frequency parameters in the first mapping relationship. The parameter adding instruction may include radio frequency parameter information, fence information and card information, and the parameter adding instruction may also include adding a flag, for example, "00". There is a corresponding relationship between radio frequency parameter information, fence information and card information in the parameter addition command. After the wallet application receives the parameter addition instruction from the cloud server, it can send the parameter addition instruction to the NFC module of the electronic device. After the NFC module receives the parameter addition instruction from the wallet, it can add the radio frequency parameter of the first mapping relationship and the corresponding fence and card information based on the parameter addition instruction. That is, the radio frequency parameter can be stored in the first mapping relationship as a compatible radio frequency parameter, and the stored radio frequency parameter corresponds to the card and the fence. Then the NFC module can send an instruction to add a fence to the LBS module of the electronic device. After the LBS module receives the instruction to add a fence from the NFC module, it can add a fence event that can be monitored. Wherein, the adding fence instruction may include fence information and adding fence flags. Specifically, after the NFC module obtains the parameter adding instruction, it determines whether a new fence needs to be added to the first mapping relationship. When necessary, the NFC module can send an adding fence instruction to the LBS module, and the adding fence instruction can include a fence Information and additional fence flags can be included to place this new fence. The LBS module of the electronic device can obtain the fence event based on the adding fence instruction.
示例性地,云端服务器获取到参数添加指令,之后向钱包应用发送参数添加指令。其中,参数添加指令包括围栏4、卡2和射频参数,以及添加标志位“00”。钱包应用接收到来自云端服务器的参数添加指令之后可以向NFC模块发送参数添加指令。NFC模块接收到来自NFC的参数添加指令之后,基于添加标志位“00”确定其中的参数需要添加,可以将围栏4、卡2和射频参数加入到第一映射关系中。例如,当表1是第一映射关系的情况下,NFC模块可以添加一行对应关系之后,表1可以变为表2进行存储。Exemplarily, the cloud server obtains the parameter addition instruction, and then sends the parameter addition instruction to the wallet application. Wherein, the parameter adding instruction includes fence 4, card 2 and radio frequency parameters, and adding flag "00". After the wallet application receives the parameter addition instruction from the cloud server, it can send the parameter addition instruction to the NFC module. After the NFC module receives the parameter addition instruction from the NFC, it determines that the parameters need to be added based on the addition flag "00", and the fence 4, card 2 and radio frequency parameters can be added to the first mapping relationship. For example, when Table 1 is the first mapping relationship, after the NFC module can add a row of correspondence, Table 1 can be changed to Table 2 for storage.
表2Table 2
表2是本申请实施例公开的另一种围栏、卡片与射频参数之间的映射表。如表2所示,表2相比表1添加了索引3、围栏4、卡2和兼容射频参数3。Table 2 is another mapping table between fences, cards and radio frequency parameters disclosed in the embodiment of the present application. As shown in Table 2, compared with Table 1, Table 2 adds index 3, fence 4, card 2 and compatible radio frequency parameter 3.
NFC模块可以向LBS模块发送添加围栏指令。添加围栏指令可以包括围栏信息(即围栏4)和添加围栏标志位。LBS模块接收到添加围栏指令之后,可以基于添加围栏标志位确定需要增加自身需要获取的围栏事件,具体可以基于围栏信息增加需要监听的围栏事件。The NFC module can send an instruction to add a fence to the LBS module. The adding fence instruction may include fence information (namely fence 4) and adding fence flag. After the LBS module receives the adding fence instruction, it can determine that it needs to add fence events that it needs to acquire based on the adding fence flag bit, specifically, it can add fence events that need to be monitored based on fence information.
实施方式2:删除射频参数。Embodiment 2: Delete radio frequency parameters.
假设某一NFC读卡器设备的射频参数更新之后,不需要使用兼容射频参数,而是使用主射频参数或者已有的其他兼容参数。此时,电子设备不会再使用到第一映射关系中的这一兼容射频参数,从而让云端服务器可以下发参数删除指令。Assume that after the radio frequency parameters of an NFC card reader device are updated, it is not necessary to use compatible radio frequency parameters, but to use main radio frequency parameters or other existing compatible parameters. At this time, the electronic device will no longer use the compatible radio frequency parameter in the first mapping relationship, so that the cloud server can issue a parameter deletion instruction.
图10是本申请实施例公开的另一种射频参数调整的流程示意图。如图10所示,当云端服务器获取到参数删除指令的情况下,可以向电子设备的钱包应用发送参数删除指令。参数删除指令用于指令电子设备删除第一映射关系中的射频参数。其中,参数删除指令可以包括射频参数信息、围栏信息和卡片信息。参数删除指令中射频参数信息、围栏信息和卡片信息存在对应关系,参数添加指令还可以包括删除标志位,例如,“01”。钱包应用接收到来自云端服务器的参数删除指令之后,可以向电子设备的NFC模块发送参数删除指令。NFC模块接收到来自钱包的参数删除指令之后,可以基于参数删除指令删除第一映射关系中的射频参数以及对应围栏和卡片信息。之后可以存储删除之后的映射关系。之后NFC模块可以向电子设备的LBS模块发送删除围栏指令,删除围栏指令可以包括围栏信息和删除围栏标志位。LBS模块接收到来自NFC模块的删除围栏指令之后,可以基于删除围栏指令确定需要获取的围栏事件。Fig. 10 is a schematic flowchart of another radio frequency parameter adjustment disclosed in the embodiment of the present application. As shown in FIG. 10 , when the cloud server obtains the parameter deletion instruction, it may send the parameter deletion instruction to the wallet application of the electronic device. The parameter deletion instruction is used to instruct the electronic device to delete the radio frequency parameters in the first mapping relationship. Wherein, the parameter deletion instruction may include radio frequency parameter information, fence information and card information. There is a corresponding relationship between radio frequency parameter information, fence information and card information in the parameter deletion instruction, and the parameter addition instruction may also include a deletion flag, for example, "01". After receiving the parameter deletion instruction from the cloud server, the wallet application can send the parameter deletion instruction to the NFC module of the electronic device. After the NFC module receives the parameter deletion instruction from the wallet, it can delete the radio frequency parameters and the corresponding fence and card information in the first mapping relationship based on the parameter deletion instruction. Afterwards, the deleted mapping relationship can be stored. Afterwards, the NFC module may send a fence deletion instruction to the LBS module of the electronic device, and the fence deletion instruction may include fence information and a fence deletion flag. After receiving the fence deletion instruction from the NFC module, the LBS module may determine the fence event to be acquired based on the fence deletion instruction.
示例性地,云端服务器获取到参数删除指令,之后向钱包应用发送参数删除指令。其中,参数删除指令包括围栏2、围栏3、卡3和兼容射频参数2,以及删除标志位“01”。钱包应用接收到来自云端服务器的参数删除指令之后可以向NFC模块发送参数删除指令。NFC模块接收到来自NFC的参数删除指令之后,基于删除标志位“01”确定其中的参数需要删除第一映射关系中的信息,删除表1中与参数删除指令中信息相同的行的信息,便可以将第一映射关系中的围栏2、围栏3、卡3和兼容射频参数2进行删除。例如,当表1是第一映射关系的情况下,NFC模块可以删除一行对应关系之后,表1可以变为表3进行存储。Exemplarily, the cloud server obtains the parameter deletion instruction, and then sends the parameter deletion instruction to the wallet application. Wherein, the parameter deletion command includes fence 2, fence 3, card 3 and compatible radio frequency parameter 2, and the deletion flag "01". After receiving the parameter deletion instruction from the cloud server, the wallet application can send the parameter deletion instruction to the NFC module. After the NFC module receives the parameter deletion instruction from the NFC, it determines that the parameters in it need to delete the information in the first mapping relationship based on the deletion flag "01", and deletes the information in the row that is the same as the information in the parameter deletion instruction in Table 1. The fence 2, fence 3, card 3 and compatible radio frequency parameter 2 in the first mapping relationship may be deleted. For example, when Table 1 is the first mapping relationship, after the NFC module can delete a row of correspondence, Table 1 can be changed to Table 3 for storage.
表3table 3
表3是本申请实施例公开的又一种围栏、卡片与射频参数之间的映射表。如表3所示,表2相比表1即删除了索引2、围栏2、围栏3、卡3和兼容射频参数2。Table 3 is another mapping table between fences, cards and radio frequency parameters disclosed in the embodiment of the present application. As shown in Table 3, compared with Table 1, Table 2 deletes index 2, fence 2, fence 3, card 3 and compatible radio frequency parameter 2.
NFC模块可以向LBS模块发送删除围栏指令。删除围栏指令可以包括围栏信息(即围栏2和围栏3)和删除围栏标志位。LBS模块接收到围栏指令之后,可以基于删除围栏标志位确定需要删除自身需要获取的围栏事件,具体的基于围栏信息删除需要获取的围栏事件,围栏2和围栏3。The NFC module can send an instruction to delete the fence to the LBS module. The delete fence command may include fence information (that is, fence 2 and fence 3) and delete fence flags. After the LBS module receives the fence instruction, it can determine the fence event that needs to be deleted based on the fence flag bit, and specifically delete the fence events that need to be obtained based on the fence information, fence 2 and fence 3.
实施方式3:更新射频参数。Embodiment 3: Updating radio frequency parameters.
在用户使用NFC卡片的过程中,对应的NFC读卡器设备可能会进行升级或者系统更新等,从而可以会使得NFC读卡器的射频参数发生变化,因此,电子设备需要更新第一映射关系中对应的射频参数。When the user uses the NFC card, the corresponding NFC card reader device may be upgraded or the system is updated, which may cause the radio frequency parameters of the NFC card reader to change. Therefore, the electronic device needs to update the first mapping relationship Corresponding RF parameters.
图11是本申请实施例公开的又一种射频参数调整的流程示意图。如图11所示,当云端服务器获取到参数更新指令的情况下,可以向电子设备的钱包应用发送参数更新指令。参数更新指令用于指令电子设备更新第一映射关系中的射频参数,参数更新指令可以包括射频参数信息、围栏信息和卡片信息,参数更新指令还可以包括更新标志位,例如,“11”。参数更新指令中射频参数信息、围栏信息和卡片信息存在对应关系。钱包应用接收到来自云端服务器的参数更新指令之后,可以向电子设备的NFC模块发送参数更新指令。NFC模块接收到来自钱包的参数更新指令之后,可以基于参数更新指令更新第一映射关系中的射频参数以及对应围栏和卡片信息。之后可以存储更新之后的映射关系。NFC模块可以基于参数更新指令确定是否需要更新当前围栏信息,在需要更新围栏的情况下,NFC模块可以向电子设备的LBS模块发送更新围栏指令,其中,更新围栏指令可以包括围栏信息和更新围栏标志位。LBS模块接收到来自NFC模块的更新围栏指令之后,可以基于更新围栏指令确定需要获取的围栏事件。Fig. 11 is a schematic flowchart of another radio frequency parameter adjustment disclosed in the embodiment of the present application. As shown in FIG. 11 , when the cloud server obtains the parameter update instruction, it may send the parameter update instruction to the wallet application of the electronic device. The parameter update instruction is used to instruct the electronic device to update the radio frequency parameters in the first mapping relationship. The parameter update instruction may include radio frequency parameter information, fence information, and card information. The parameter update instruction may also include an update flag, for example, "11". In the parameter update command, there is a corresponding relationship between the radio frequency parameter information, the fence information and the card information. After receiving the parameter update instruction from the cloud server, the wallet application can send the parameter update instruction to the NFC module of the electronic device. After the NFC module receives the parameter update instruction from the wallet, it can update the radio frequency parameters and the corresponding fence and card information in the first mapping relationship based on the parameter update instruction. Afterwards, the updated mapping relationship may be stored. The NFC module can determine whether the current fence information needs to be updated based on the parameter update instruction. In the case of needing to update the fence, the NFC module can send an update fence instruction to the LBS module of the electronic device, wherein the update fence instruction can include fence information and update fence signs bit. After receiving the updated fence instruction from the NFC module, the LBS module may determine the fence event to be acquired based on the updated fence instruction.
示例性地,云端服务器获取到参数更新指令之后,向钱包应用发送参数更新指令。其中,参数更新指令包括围栏2、围栏3、卡3和兼容射频参数5,以及更新标志位“11”。钱包应用接收到来自云端服务器的参数更新指令之后可以向NFC模块发送参数更新指令。NFC模块接收到来自NFC的参数更新指令之后,基于标志位“11”可以更新当前的参数信息,可以基于围栏2、围栏3和卡3以及表1确定需要更新兼容性射频参数为兼容射频参数2,之后可以将第一映射关系中的兼容射频参数2更新为兼容射频参数5。例如,当表1是第一映射关系的情况下,NFC模块可以更新一行对应关系之后,表1可以变为表4进行存储。Exemplarily, after obtaining the parameter update instruction, the cloud server sends the parameter update instruction to the wallet application. Wherein, the parameter update instruction includes fence 2, fence 3, card 3 and compatible radio frequency parameter 5, and the update flag bit "11". After the wallet application receives the parameter update command from the cloud server, it can send the parameter update command to the NFC module. After the NFC module receives the parameter update instruction from NFC, it can update the current parameter information based on the flag "11", and can determine that the compatible radio frequency parameter needs to be updated as compatible radio frequency parameter 2 based on fence 2, fence 3 and card 3 and Table 1 , and then the compatible radio frequency parameter 2 in the first mapping relationship may be updated to the compatible radio frequency parameter 5. For example, when Table 1 is the first mapping relationship, after the NFC module can update a row of correspondence, Table 1 can be changed to Table 4 for storage.
表4Table 4
表4是本申请实施例公开的又一种围栏、卡片与射频参数之间的映射表。如表4所示,表4相比表1将兼容射频参数2更新为了兼容射频参数5。Table 4 is another mapping table between fences, cards and radio frequency parameters disclosed in the embodiment of the present application. As shown in Table 4, compared with Table 1, Table 4 updates compatible radio frequency parameter 2 to compatible radio frequency parameter 5.
基于围栏2和围栏3可以确当前的围栏信息与更新后的围栏信息相同,因此,不需要更新围栏信息。NFC模块便不需要向LBS模块下发更新围栏指令。Based on the fence 2 and the fence 3, it can be confirmed that the current fence information is the same as the updated fence information, therefore, there is no need to update the fence information. The NFC module does not need to send an update fence instruction to the LBS module.
通过上述对第一映射关系的调整,面对NFC读卡器设备的射频参数变化,电子设备还是可以适应这种变化,提前切换或者确定所使用的射频参数,从而可以提高电子设备对于不同NFC读卡器的兼容能力,扩大电子设备的NFC模块的通信范围,以及提高NFC通信的灵活性。Through the above-mentioned adjustment to the first mapping relationship, in the face of changes in the radio frequency parameters of the NFC card reader device, the electronic device can still adapt to this change, switch in advance or determine the used radio frequency parameters, so that the electronic device can improve the sensitivity of the electronic device to different NFC readers. The compatibility of the card device expands the communication range of the NFC module of the electronic device and improves the flexibility of the NFC communication.
可选地,由于电子设备的NFC模块在接收到第一映射关系中的围栏的围栏事件的情况下才能够将射频参数切换到某一兼容射频参数。因此,电子设备在获取围栏事件之前,可以对围栏事件进行筛选。在一种可能的情况下,电子设备的NFC模块可以基于上述的第一对应关系中的围栏监听LBS模块广播的围栏事件。例如,当LBS模块广播的围栏事件为表1中的围栏的情况下,NFC可以将监听到的围栏事件用于获取第一射频参数;否则不需要进一步处理。另一种可能的情况下,电子设备的LBS模块可以基于第一映射关系中的围栏事件进行广播,例如,当LBS获取到围栏事件之后,仅仅对表1中的围栏事件进行广播。即可以理解为,电子设备的LBS模块可以接收到所有可能的围栏事件之后,需要基于第一映射关系发送的围栏进行筛选,此时,电子设备的NFC模块获取的围栏事件仅仅为第一映射关系中包括的围栏的围栏事件。从而可以提高获取到有效围栏事件的效率。Optionally, the radio frequency parameter can be switched to a certain compatible radio frequency parameter only when the NFC module of the electronic device receives a fence event of the fence in the first mapping relationship. Therefore, before acquiring the fence event, the electronic device can filter the fence event. In a possible situation, the NFC module of the electronic device may monitor the fence event broadcast by the LBS module based on the fence in the above first correspondence. For example, when the fence event broadcast by the LBS module is the fence in Table 1, the NFC can use the monitored fence event to obtain the first radio frequency parameter; otherwise, no further processing is required. In another possible situation, the LBS module of the electronic device may broadcast based on the fence event in the first mapping relationship, for example, only broadcast the fence event in Table 1 after the LBS acquires the fence event. That is, it can be understood that after the LBS module of the electronic device can receive all possible fence events, it needs to filter based on the fence sent by the first mapping relationship. At this time, the fence event acquired by the NFC module of the electronic device is only the first mapping relationship. Fence events for fences included in . Therefore, the efficiency of obtaining effective fence events can be improved.
此外,当电子设备通过NFC的卡片进行刷卡的时候,NFC模块与NFC读卡器设备之间进行通信的时候,按照上述已经确定的第一射频参数的规格确定两个设备之间的信号参数。In addition, when the electronic device swipes the card through the NFC card, and when the NFC module communicates with the NFC card reader device, the signal parameters between the two devices are determined according to the above-mentioned determined specifications of the first radio frequency parameter.
S504、电子设备可以将第一射频参数确定主射频参数,并设定参数切换标志位为第一数。S504. The electronic device may determine the first radio frequency parameter as the main radio frequency parameter, and set the parameter switching flag to the first number.
在电子设备退出围栏和/或退出卡片激活状态的情况下,所述电子设备可以确定当前所使用的射频参数为主射频参数。具体地,在参数切换标识位为第二数的情况下,电子设备的NFC模块可以基于围栏状态和/或卡片的激活状态确定第一射频参数为主射频参数,并将参数切换标志位切换为第一数。When the electronic device exits the fence and/or exits the card activation state, the electronic device may determine that the currently used radio frequency parameter is the main radio frequency parameter. Specifically, when the parameter switching flag is the second number, the NFC module of the electronic device can determine the first radio frequency parameter as the main radio frequency parameter based on the fence state and/or the activation state of the card, and switch the parameter switching flag to number one.
一种可能的实施方式中,在参数切换标志位为第二数的情况下,电子设备的NFC模块可以基于围栏状态切换第一射频参数。在电子设备获取的围栏事件为退出围栏的围栏事件的情况下(例如,图6中用户甲行进到B点及其之后的路线),可以将第一射频参数从兼容射频参数切换为主射频参数。例如,在退出围栏且不退出激活状态的情况下;或者,在退出围栏且退出激活状态的情况下,NFC模块将第一射频参数从兼容射频参数切换为主射频参数。之后,NFC模块可以将参数切换标志位从第二数切换为第一数。例如,从“1”切换为“0”。在电子设备进入围栏的情况下,保持当前的第一射频参数不变,以及保持当前的参数切换标志位不变。In a possible implementation manner, when the parameter switching flag is the second number, the NFC module of the electronic device may switch the first radio frequency parameter based on the state of the fence. In the case that the fence event acquired by the electronic device is a fence event that exits the fence (for example, in Figure 6, user A travels to point B and the route thereafter), the first radio frequency parameter can be switched from the compatible radio frequency parameter to the main radio frequency parameter . For example, in the case of exiting the fence and not exiting the activation state; or, in the case of exiting the fence and exiting the activation state, the NFC module switches the first radio frequency parameter from the compatible radio frequency parameter to the main radio frequency parameter. Afterwards, the NFC module can switch the parameter switching flag from the second number to the first number. For example, switching from "1" to "0". In the case that the electronic device enters the fence, keep the current first radio frequency parameter unchanged, and keep the current parameter switching flag unchanged.
另一种可能的实施方式中,在参数切换标志位为第二数的情况下,电子设备的NFC模块可以基于卡片的激活状态切换第一射频参数。在电子设备退出卡片的激活状态的情况下(例如,用户关闭了图7中的(B)的用户界面之后,电子设备可以确定退出卡片的激活状态),可以将第一射频参数从兼容射频参数切换为主射频参数。例如,在卡片退出激活状态且电子设备不退出围栏的情况下;或者,在卡片退出激活状态且电子设备退出围栏的情况下,NFC模块将第一射频参数从兼容射频参数切换为主射频参数。之后,NFC模块可以将参数切换标志位从第二数切换为第一数。例如,从“1”切换为“0”。在卡片保持激活状态的情况下,保持当前的第一射频参数不变,以及保持当前的参数切换标志位不变。In another possible implementation manner, when the parameter switching flag is the second number, the NFC module of the electronic device may switch the first radio frequency parameter based on the activation status of the card. When the electronic device exits the activation state of the card (for example, after the user closes the user interface of (B) in FIG. Switch to main RF parameters. For example, when the card exits the activation state and the electronic device does not exit the fence; or, when the card exits the activation state and the electronic device exits the fence, the NFC module switches the first radio frequency parameter from the compatible radio frequency parameter to the main radio frequency parameter. Afterwards, the NFC module can switch the parameter switching flag from the second number to the first number. For example, switching from "1" to "0". In the case that the card remains activated, the current first radio frequency parameter and the current parameter switching flag remain unchanged.
又一种可能的情况下,在参数切换标志位为第二数的情况下,电子设备的NFC模块可以基于卡片的激活状态和电子设备所处的围栏状态切换第一射频参数。在电子设备退出卡片的激活状态且电子设备退出围栏的情况下,可以将第一射频参数从兼容射频参数切换为主射频参数。例如,在卡片退出激活状态且电子设备退出围栏的情况下,NFC模块将第一射频参数从兼容射频参数切换为主射频参数。之后,NFC模块可以将参数切换标志位从第二数切换为第一数。例如,从“1”切换为“0”。在卡片保持激活状态或电子设备进入围栏的情况下,保持当前的第一射频参数不变,以及保持当前的参数切换标志位不变。In another possible situation, when the parameter switching flag is the second number, the NFC module of the electronic device may switch the first radio frequency parameter based on the activation state of the card and the fence state of the electronic device. When the electronic device exits the activation state of the card and the electronic device exits the enclosure, the first radio frequency parameter may be switched from the compatible radio frequency parameter to the main radio frequency parameter. For example, when the card exits the activation state and the electronic device exits the fence, the NFC module switches the first radio frequency parameter from the compatible radio frequency parameter to the main radio frequency parameter. Afterwards, the NFC module can switch the parameter switching flag from the second number to the first number. For example, switching from "1" to "0". In the case that the card remains activated or the electronic device enters the fence, the current first radio frequency parameter and the current parameter switching flag remain unchanged.
此外,在电子设备刚开机的情况下,可以确定当前的第一射频参数为主射频参数。此外,电子设备还可以设定参数切换标识位为第一数。即电子设备在不使用NFC卡片的情况下,尽量保持第一射频参数为主射频参数,参数切换标志位为第一数。In addition, when the electronic device is just powered on, it may be determined that the current first radio frequency parameter is the main radio frequency parameter. In addition, the electronic device can also set the parameter switching flag to be the first number. That is, when the electronic device does not use the NFC card, try to keep the first radio frequency parameter as the main radio frequency parameter, and the parameter switching flag is the first number.
在本申请实施例中,电子设备能够在用户使用NFC之前,基于用户电子设备所处的地理围栏和当前使用的卡片,确定即将可能使用的NFC的射频参数。这样,即便不同的NFC读卡器使用的参数不尽相同,电子设备提前对两设备之间通信的无线信号的射频参数进行切换或者确定,从而可以提高两设备之间一次性通信成功的概率,进而可以减少用户刷卡失败的次数,提高用户体验。In the embodiment of the present application, before the user uses the NFC, the electronic device can determine the radio frequency parameters of the NFC that may be used based on the geographic fence where the user's electronic device is located and the currently used card. In this way, even if the parameters used by different NFC card readers are not the same, the electronic device switches or determines the radio frequency parameters of the wireless signal communicated between the two devices in advance, thereby improving the probability of a successful one-time communication between the two devices. In turn, the number of failed card swipes by the user can be reduced, and the user experience can be improved.
请参阅图12,图12为本申请实施例提供的另一种NFC射频参数兼容方法的流程示意图,该方法可以由图12中所示的电子设备来执行,该方法可以包括但不限于以下步骤:Please refer to Figure 12, Figure 12 is a schematic flowchart of another NFC radio frequency parameter compatibility method provided by the embodiment of the present application, the method can be executed by the electronic device shown in Figure 12, and the method can include but not limited to the following steps :
S1201、电子设备获取围栏事件。S1201. The electronic device acquires a fence event.
其中,步骤S1201可以参考步骤S501,不加赘述。Wherein, for step S1201, reference may be made to step S501, and details are not repeated.
S1202、电子设备获取激活卡片。S1202. The electronic device acquires an activation card.
其中,步骤S1202可以参考步骤S502,不加赘述。Wherein, for step S1202, reference may be made to step S502, and details are not repeated.
需要说明的是,步骤S1201和步骤S1202执行顺序不加限定。可以先执行步骤S1201,后执行步骤S1202;也可以先执行步骤S1202,后执行步骤S1201。It should be noted that the execution order of step S1201 and step S1202 is not limited. Step S1201 can be executed first, and then step S1202 can be executed; or step S1202 can be executed first, and then step S1201 can be executed.
S1203、电子设备在进入围栏的情况下,基于围栏事件,激活卡片以及第一映射关系确定第一射频参数。S1203. When the electronic device enters the fence, based on the fence event, activates the card and determines the first radio frequency parameter.
其中,步骤S1203可以参考步骤S503,不加赘述。Wherein, for step S1203, reference may be made to step S503, and details are not repeated.
图13是本申请实施例公开的一种用户使用NFC卡片的流程示意图。如图13所示,用户乙通过沿着路线02向前行进,在用户乙行进到第二围栏内的情况下,用户乙所使用的电子设备可以检测到进入第二围栏的围栏事件。在用户乙行进到D点的情况下,如图13中的(A)所示,用户乙电子设备可以显示用户打开智能门锁卡的用户界面30,用户界面30可以包括智能门锁卡。用户可以将显示用户界面30的电子设备靠近NFC读卡器(此时,这一NFC读卡器位于D点),电子设备与NFC读卡器便可以进行通信,从而完成刷卡。Fig. 13 is a schematic flow diagram of a user using an NFC card disclosed in an embodiment of the present application. As shown in FIG. 13 , user B moves forward along
S1204、电子设备获取卡片切换指令,并基于卡片切换指令切换当前的激活卡片。S1204. The electronic device acquires a card switching instruction, and switches the currently activated card based on the card switching instruction.
电子设备的NFC模块可以获取到卡片切换指令,并基于卡片切换指令切换当前的激活卡片。The NFC module of the electronic device can obtain the card switching instruction, and switch the currently activated card based on the card switching instruction.
一种可能的实施方式中,在用户点击切换当前的激活卡片的情况下,电子设备可以响应于上述的用户切换操作,可以获取卡片切换指令,并显示切换后的激活卡片。In a possible implementation manner, when the user clicks to switch the current active card, the electronic device may respond to the above user switching operation, acquire a card switching instruction, and display the switched active card.
示例性地,如图13中的(A)所示,在用户需要使用公共交通卡的情况下,用户可以退出当前的用户界面30,电子设备可以显示用户界面40。如图13中的(B)所示,用户界面40可以包括用户正在激活的卡片,智能门锁卡,以及当前未激活的卡片,小区门禁卡和公共交通卡。用户可以点击公共交通卡的控件,从而可以将当前的激活的切换为公共交通卡。如图13中的(C)所示,电子设备可以显示用户界面40,用户界面40可以包括切换后的卡片公共交通卡。Exemplarily, as shown in (A) in FIG. 13 , when the user needs to use a public transportation card, the user can exit the
另一种可能的实施方式中,用户不需要如图13所示点击切换激活卡片,电子设备的NFC模块可以获取卡片切换指令,并切换激活卡片。In another possible implementation manner, the user does not need to click to switch the activation card as shown in FIG. 13 , and the NFC module of the electronic device can obtain the card switching instruction and switch the activation card.
示例性地,电子设备可以基于围栏事件以及围栏与卡片的对应关系获取卡片切换指令。基于第一映射关系,某一围栏中可以对应多个卡片。电子设备获取基于不同卡片常常使用的不同位置确定会否需要切换围栏。在电子设备的激活卡片为第一个卡片,而电子设备的位置位于第二围栏中的第而个卡片的空间阈值范围内时,电子设备可以获取到卡片切换指令,并将激活卡片从第一个卡片切换为第二个卡片。Exemplarily, the electronic device may acquire the card switching instruction based on the fence event and the corresponding relationship between the fence and the card. Based on the first mapping relationship, a certain fence may correspond to multiple cards. The electronic device obtains a determination whether a fence needs to be switched based on the different locations that different cards are often used. When the activation card of the electronic device is the first card, and the position of the electronic device is within the space threshold range of the second card in the second fence, the electronic device can obtain the card switching instruction and switch the activation card from the first The first card switches to the second card.
示例性地,电子设备不需要用户的操作可以直接获取卡片切换指令。在步骤S1203中,激活卡片为智能门锁卡。电子设备可以检测到的周围NFC读卡器的射频信号,基于射频信号判断NFC读卡器的类型。之后电子设备可以NFC读卡器的类型不同与当前的使用的激活卡片,从而可以生成卡片切换指令,并切换激活卡片。例如,电子设备确定NFC读卡器的类型为地铁口的POS机,电子设备可以基于对用的卡片为公共交通卡,公共交通卡与当前的激活卡片智能门锁卡不同,电子设备可以获取卡片切换指令。卡片切换指令用于将当前的激活卡片切换从智能门锁卡切换为公共交通卡。Exemplarily, the electronic device can directly acquire the card switching instruction without user's operation. In step S1203, the activation card is a smart door lock card. The electronic device can detect the radio frequency signal of the surrounding NFC card reader, and judge the type of the NFC card reader based on the radio frequency signal. Afterwards, the electronic device can have a different type of NFC card reader from the currently used activation card, so as to generate a card switching instruction and switch the activation card. For example, if the electronic device determines that the type of NFC card reader is a POS machine at a subway entrance, the electronic device can use a public transportation card based on the card used. The public transportation card is different from the current activation card smart door lock card, and the electronic device can obtain the card switch command. The card switching instruction is used to switch the current active card switching from a smart door lock card to a public transportation card.
上述获取切换卡片指令仅仅是示例性的描述,还有其他获取卡片切换指令的方式,不加限定。The above acquisition of the card switching instruction is only an exemplary description, and there are other ways of obtaining the card switching instruction, which are not limited.
S1205、电子设备基于切换后的激活卡片,围栏事件和第一映射关系确定第二射频参数。S1205. The electronic device determines a second radio frequency parameter based on the activated card after switching, the fence event and the first mapping relationship.
电子设备获取卡片切换指令之后,可以基于卡片切换指令确定切换后的激活卡片。之后可以基于切换后的激活卡片、围栏事件以及第一映射关系确定第二射频参数。其中,第二射频参数为电子设备切换卡片之后的确定的电子设备使用的NFC射频参数。具体确定射频参数的方法可以参考步骤S503中的相关描述,不加赘述。After the electronic device acquires the card switching instruction, it may determine the activated card after switching based on the card switching instruction. Afterwards, the second radio frequency parameter may be determined based on the activated card after switching, the fence event, and the first mapping relationship. Wherein, the second radio frequency parameter is a determined NFC radio frequency parameter used by the electronic device after the electronic device switches the card. For a specific method of determining radio frequency parameters, reference may be made to relevant descriptions in step S503, and details are not repeated.
在电子设备重新确定第一射频参数之后,第二射频参数可能需要进行切换,也可能保持不变,以下说明几种具体可能的情况:After the electronic device re-determines the first radio frequency parameter, the second radio frequency parameter may need to be switched or may remain unchanged. Several specific possible situations are described below:
一种可能的情况下,在步骤S1203中电子设备确定的第一射频参数为主射频参数的情况下,电子设备重新确定的第一射频参数可能还是主射频参数,也可能是其中一种兼容射频参数。在确定的第二射频参数是主射频参数的情况下,电子设备可以保持第二射频参数为第一射频参数不变,以及保持当前的参数切换标志位为第一数不变。在第二射频参数是兼容射频参数的情况下,电子设备可以将使用的射频参数从主射频参数切换为一种兼容射频参数,以及将参数切换标志位从第一数切换为第二数。In a possible situation, when the first radio frequency parameter determined by the electronic device in step S1203 is the main radio frequency parameter, the first radio frequency parameter re-determined by the electronic device may be the main radio frequency parameter, or one of the compatible radio frequency parameters. parameter. In the case that the determined second radio frequency parameter is the main radio frequency parameter, the electronic device may keep the second radio frequency parameter unchanged as the first radio frequency parameter, and keep the current parameter switching flag unchanged at the first number. In the case that the second radio frequency parameter is a compatible radio frequency parameter, the electronic device can switch the used radio frequency parameter from the primary radio frequency parameter to a compatible radio frequency parameter, and switch the parameter switching flag from the first number to the second number.
另一种可能的情况下,在步骤S1203中电子设备确定的第一射频参数为兼容射频参数的情况下,电子设备确定的第二射频参数可能是主射频参数,也可能是另一种兼容射频参数,还可能是同一种兼容性射频参数。在确定的第二射频参数是主射频参数的情况下,电子设备可以将电子设备使用的射频参数从兼容射频参数切换为主兼容射频参数,以及将参数切换标志位从第二数切换为第一数。在确定的第二射频参数是另一种兼容射频参数的情况下,电子设备可以将电子设备使用的射频参数从一种兼容射频参数切换为另一种兼容射频参数,以及保持当前的参数切换标志位为第二数不变。在确定的第二射频参数是同一种兼容射频参数的情况下,电子设备可以保持当前的电子设备使用的射频参数和参数切换标志位不变。In another possible situation, when the first radio frequency parameter determined by the electronic device in step S1203 is a compatible radio frequency parameter, the second radio frequency parameter determined by the electronic device may be the main radio frequency parameter, or another compatible radio frequency parameter. parameters, and may also be the same type of compatibility radio frequency parameters. In the case that the determined second radio frequency parameter is the main radio frequency parameter, the electronic device can switch the radio frequency parameter used by the electronic device from the compatible radio frequency parameter to the main compatible radio frequency parameter, and switch the parameter switching flag from the second number to the first number. In the case that the determined second radio frequency parameter is another compatible radio frequency parameter, the electronic device can switch the radio frequency parameter used by the electronic device from one compatible radio frequency parameter to another compatible radio frequency parameter, and maintain the current parameter switching flag Bit is unchanged for the second number. In the case that the determined second radio frequency parameter is the same compatible radio frequency parameter, the electronic device may keep the current radio frequency parameter and the parameter switching flag used by the electronic device unchanged.
在电子设备确定第二射频参数(当前所使用的射频参数)之后,电子设备可以与NFC读卡器进行通信,完程数据交换。如图13中的(C)所示,在用户处于第二围栏中的D点的情况下,用户可以手持显示用户界面50的电子设备靠近地铁闸机口,完成刷卡支付。需要说明的是,图13中第二围栏中的D点和C点的用户使用的分别为智能门锁卡和公共交通卡仅为一种示例性地说明,也可以是其他两张不同的卡片,此处不构成限定。After the electronic device determines the second radio frequency parameter (the currently used radio frequency parameter), the electronic device can communicate with the NFC card reader to complete data exchange. As shown in (C) in Figure 13, when the user is at point D in the second fence, the user can hold the electronic device displaying the
需要说明的是,电子设备在某一个围栏中,电子设备切换激活卡片的次数可以是一次,也可以是多次,不构成限定。本申请实施例是说明其中切换一次激活卡片前后,电子设备确定射频参数的方法。It should be noted that, when the electronic device is in a certain enclosure, the number of times the electronic device switches the activation card may be one time or multiple times, which does not constitute a limitation. The embodiment of the present application is to illustrate the method of determining the radio frequency parameters of the electronic device before and after switching the activation card once.
在本申请实施例中,电子设备在同一个围栏中可以使用一张NFC卡片,也可以使用多张NFC卡片。在用户使用多张的NFC卡片存在不同的情况下,电子设备需要对当前激活的卡片进行切换,切换前后,电子设备可以再一次通过围栏和切换后的卡片,确定自身要使用的射频参数,从而可以在用户的电子设备与NFC读卡器通信之前完成使用的射频参数的确定,从而可以减少在通信过程的出现因参数不匹配导致的刷卡失败的情况,以提高用户NFC射频通信成功率,进而可以提高用户体验。In the embodiment of the present application, the electronic device can use one NFC card or multiple NFC cards in the same enclosure. When the user uses different NFC cards, the electronic device needs to switch the currently activated card. Before and after the switch, the electronic device can pass through the fence and the switched card again to determine the radio frequency parameters to be used by itself, thus The determination of the radio frequency parameters used can be completed before the user's electronic device communicates with the NFC card reader, thereby reducing the failure of swiping the card due to parameter mismatch during the communication process, so as to improve the success rate of the user's NFC radio frequency communication, and then Can improve user experience.
下面结合附图详细介绍本申请实施例提供的一种NFC射频参数切换场景。An NFC radio frequency parameter switching scenario provided by the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
图14是本实施例公开的另一种用户使用NFC卡片的流程示意图。Fig. 14 is a schematic flow diagram of another user using an NFC card disclosed in this embodiment.
电子设备进出围栏的过程中,电子设备基于围栏的变化情况调整使用的NFC射频参数。在进入围栏的情况下,电子设备可以基于进入围栏的围栏事件和激活卡片确定射频参数;在退出围栏的情况下,电子设备可以基于退出围栏的围栏事件将使用的射频参数确定为主射频参数。When the electronic device enters and exits the fence, the electronic device adjusts the NFC radio frequency parameters used based on the change of the fence. In the case of entering the fence, the electronic device can determine the radio frequency parameter based on the fence event of entering the fence and the activation card; in the case of exiting the fence, the electronic device can determine the main radio frequency parameter to be used based on the fence event of exiting the fence.
当电子设备处于围栏之外时,即电子设备的NFC模块未接收到任何围栏事件的情况下,此时,电子设备当前的使用的射频参数为主射频参数,之后电子设备可以进入围栏。如图14所示,用户丙可以携带电子设备沿着路线03向前进行。在用户丙进入到X的情况下,电子设备可以获取进入第三围栏的围栏事件。此时,电子设备可以获取当前的激活卡片,例如,智能门锁卡为当前的激活卡片。由于围栏事件为进入第三围栏,激活卡片为智能门锁卡,电子设备可以基于第一映射关系确定第一射频参数。例如,电子设备可以基于表1确定当前的射频参数为兼容射频参数2(假设第三围栏为围栏3,智能门锁卡为卡3)。即电子设备可以将当前使用的射频参数从主射频参数切换为兼容射频参数2。When the electronic device is outside the fence, that is, when the NFC module of the electronic device does not receive any fence event, at this time, the radio frequency parameter currently used by the electronic device is the main radio frequency parameter, and then the electronic device can enter the fence. As shown in FIG. 14 , user C can carry the electronic device forward along the
用户进行到图14中的Y点的情况下,电子设备靠近门口的NFC读卡器,电子设备可以通过兼容射频参数2与NFC读卡器进行射频通信。需要说明的是,在用户的电子设备与NFC读卡器进行通信之后,用户可以点击电子设备确定激活卡片,也可以不需要用户的操作确定激活卡片,这个过程中,不加限定。When the user reaches point Y in FIG. 14 , the electronic device is close to the NFC card reader at the door, and the electronic device can perform radio frequency communication with the NFC card reader through compatible radio frequency parameter 2. It should be noted that after the user's electronic device communicates with the NFC card reader, the user can click on the electronic device to confirm the activation of the card, or can confirm the activation of the card without the user's operation, and there is no limitation in this process.
在用户行进到图14中的Z点的情况下,电子设备的NFC模块可以接收到用户退出第三围栏的围栏事件。电子设备将当前使用的射频参数从兼容射频参数2切换为主射频参数。具体地,电子设备在获取到退出围栏的情况下,确定当前的参数切换标志位。当参数切换标志位第二数的情况下,电子设备可以将第二数切换为第一数,并将兼容射频参数2切换为主射频参数。When the user travels to point Z in FIG. 14 , the NFC module of the electronic device may receive a fence event that the user exits the third fence. The electronic device switches the currently used radio frequency parameter from the compatible radio frequency parameter 2 to the primary radio frequency parameter. Specifically, the electronic device determines the current parameter switch flag bit when it acquires the exit fence. When the parameter switching flag is the second number, the electronic device can switch the second number to the first number, and switch the compatible radio frequency parameter 2 to the main radio frequency parameter.
应理解,在上述的所有的实施例中,电子设备在需要切换参数切换标志位和使用的射频参数的情况下,可以先切换参数切换标志位,后切换使用的射频参数;也可以先切换使用的射频参数,后切换参数切换标志位。即执行的先后顺序不加限定。此外,所有的表(表1到表4)所示的第一映射关系都仅仅是示例性地说明,不加限定。It should be understood that in all the above-mentioned embodiments, when the electronic device needs to switch the parameter switching flag and the radio frequency parameter used, it can first switch the parameter switching flag, and then switch the used radio frequency parameter; it can also switch the used radio frequency parameter first. The radio frequency parameters, and then switch the parameter switching flag. That is, the sequence of execution is not limited. In addition, the first mapping relationships shown in all the tables (Table 1 to Table 4) are only illustrative and not limiting.
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。As used in the above embodiments, depending on the context, the term "when" may be interpreted to mean "if" or "after" or "in response to determining..." or "in response to detecting...". Similarly, depending on the context, the phrases "in determining" or "if detected (a stated condition or event)" may be interpreted to mean "if determining..." or "in response to determining..." or "on detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)".
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指示。在计算机上加载和执行所述计算机程序指示时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指示可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指示可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state hard disk), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指示相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments are realized. The processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, , may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111094242.8A CN115835132A (en) | 2021-09-17 | 2021-09-17 | A kind of NFC radio frequency parameter compatibility method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111094242.8A CN115835132A (en) | 2021-09-17 | 2021-09-17 | A kind of NFC radio frequency parameter compatibility method and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115835132A true CN115835132A (en) | 2023-03-21 |
Family
ID=85515288
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111094242.8A Pending CN115835132A (en) | 2021-09-17 | 2021-09-17 | A kind of NFC radio frequency parameter compatibility method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115835132A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112183140A (en) * | 2020-09-30 | 2021-01-05 | 上海创功通讯技术有限公司 | Parameter calling method, mobile terminal and system |
CN112395894A (en) * | 2019-08-16 | 2021-02-23 | 华为技术有限公司 | Communication method and device based on NFC |
CN113329379A (en) * | 2020-02-29 | 2021-08-31 | 华为技术有限公司 | Communication method, device and system based on NFC |
-
2021
- 2021-09-17 CN CN202111094242.8A patent/CN115835132A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112395894A (en) * | 2019-08-16 | 2021-02-23 | 华为技术有限公司 | Communication method and device based on NFC |
CN113329379A (en) * | 2020-02-29 | 2021-08-31 | 华为技术有限公司 | Communication method, device and system based on NFC |
CN112183140A (en) * | 2020-09-30 | 2021-01-05 | 上海创功通讯技术有限公司 | Parameter calling method, mobile terminal and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102032247B1 (en) | Method and apparatus for operating near field communication function in a portable terminal | |
WO2020233538A1 (en) | Method for accessing wireless local area network and terminal | |
WO2020259529A1 (en) | Indoor location method and electronic device | |
CN111835903B (en) | Method for rapidly distributing data in NFC label and electronic equipment | |
CN115297405A (en) | A kind of audio output method and terminal device | |
US20240187992A1 (en) | Bluetooth connection method and device | |
EP4350540B1 (en) | Account login method and electronic device | |
WO2023051098A1 (en) | Device search method, electronic device, and system | |
US11991040B2 (en) | Network configuration method and device | |
CN113765546B (en) | A virtual card switching method and electronic device | |
CN115278616A (en) | File sharing method and electronic equipment | |
WO2023071940A1 (en) | Cross-device method and apparatus for synchronizing navigation task, and device and storage medium | |
WO2021249231A9 (en) | Application-based short-range notification method, electronic device, and system | |
CN114816463B (en) | Upgrade prompt method, terminal device and computer readable storage medium | |
CN116033342B (en) | Geofence processing method, equipment and storage medium | |
CN115835132A (en) | A kind of NFC radio frequency parameter compatibility method and electronic equipment | |
CN115022872B (en) | Data transmission method, electronic equipment and readable storage medium | |
WO2023160217A1 (en) | Method for detecting embedded subscriber identity module (esim) card, and terminal device | |
CN116996611A (en) | Notification message processing system, method and device | |
CN116233749B (en) | A message push method, mobile terminal and computer-readable storage medium | |
CN117749936B (en) | Display method, electronic device and computer storage medium | |
CN117354884B (en) | APN switching method and related equipment | |
CN115250261B (en) | Information display method and electronic equipment | |
CN116056003B (en) | A geofence triggering method and related electronic equipment | |
CN117479344A (en) | Bluetooth connection method, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Country or region after: China Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Applicant after: Honor Terminal Co.,Ltd. Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Applicant before: Honor Device Co.,Ltd. Country or region before: China |