Automatic virtual card switching method and electronic equipment
By creating a virtual fence and binding multiple virtual cards, the virtual cards are distinguished according to the card swiping instructions, the problem of inaccurate automatic switching of virtual cards in the existing technology is solved, and the user's card swiping experience is improved.
Patent Information
- Application Number
- CN202311083043.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2025-03-04
AI Technical Summary
The existing technology cannot achieve accurate automatic switching of virtual cards in multiple virtual cards scenarios, resulting in poor user card swiping experience.
By pre-creating virtual fences of the same type or different types, and allowing each virtual fence to bind multiple virtual cards, distinguishing them according to the card swiping instructions corresponding to different types of virtual cards, automatic card selection for multiple virtual cards is achieved.
It improves the accuracy of automatic card selection of virtual cards, improves the user's card swiping experience, and ensures accurate switching of different virtual cards under different types and the same type.
Smart Images

Figure CN119562233A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to an automatic switching method for a virtual card and an electronic device. Background Art
[0002] Near field communication (NFC) technology is a short-range wireless communication technology that has been widely used in various electronic devices. Electronic devices that support NFC can exchange data when they are close to each other, thereby realizing various NFC functions, such as card swiping or file transfer.
[0003] For example, an electronic device supporting the NFC function can simulate multiple contactless virtual cards, such as transportation cards or access cards, through card emulation technology, so that the electronic device can implement the card swiping function when it is close to the NFC card reader terminal. At present, for scenarios where there are multiple virtual cards in an electronic device, users usually hope that the electronic device can automatically switch cards when swiping a virtual card, thereby reducing the user's participation in the card swiping process and improving the user's card swiping experience. However, the existing automatic card switching solution has a low card selection success rate and cannot achieve accurate switching of multiple virtual cards. Summary of the invention
[0004] The embodiments of the present application provide a method for automatically switching virtual cards and an electronic device, which can improve the accuracy of automatic card selection for virtual cards, thereby improving user experience.
[0005] In a first aspect, an embodiment of the present application provides a method for automatically switching a virtual card, comprising:
[0006] When entering a virtual fence, obtaining the fence type of the virtual fence and the virtual card information bound to the virtual fence;
[0007] In the case where the fence type is a geographic fence based on a first virtual card, and the virtual fence is bound to at least one first virtual card and one second virtual card, according to a card swiping instruction received in the virtual fence, a virtual card to be swiped is set from the virtual cards bound to the virtual fence; the card swiping instruction corresponding to the first virtual card carries identification information of the virtual card, and the card swiping instruction corresponding to the second virtual card does not carry identification information of the virtual card;
[0008] When the fence type is a combination fence of a WIFI fence and a geographic fence based on a second virtual card, and two second virtual cards are bound to the virtual fence, a virtual card to be swiped is set from the virtual cards bound to the virtual fence according to the positional relationship between the current location and the WIFI fence;
[0009] When the fence type is the combined fence and the virtual fence is bound to at least one first virtual card and two second virtual cards, according to the card swiping instruction received in the virtual fence and the positional relationship between the current location and the WIFI fence, the virtual card to be swiped is set from the virtual cards bound to the virtual fence;
[0010] After exiting the virtual fence, according to the card swiping instruction received outside the virtual fence, a virtual card to be swiped is set from virtual cards not bound to any virtual fence.
[0011] According to the automatic switching method of virtual cards provided in the embodiment of the present application, one or more virtual fences of the same or different types are created in advance, and each virtual fence is allowed to be bound to multiple virtual cards, so that there is no overlap between the virtual fences; then, according to the difference in card swiping instructions corresponding to different types of virtual cards, the virtual cards are divided into a first virtual card and a second virtual card; and then, the pre-created virtual fences and the card swiping instructions received inside and outside the virtual fences are combined to automatically select multiple virtual cards, which can not only achieve accurate switching of different types of virtual cards, but also achieve accurate switching of different first virtual cards of the same type and different second virtual cards of the same type, thereby improving the accuracy of automatic card selection and enhancing the user's card swiping experience.
[0012] In an optional implementation of the first aspect, setting the virtual card to be swiped from virtual cards bound to the virtual fence according to the card swiping instruction received within the virtual fence includes:
[0013] Setting any one of the first virtual cards bound to the virtual fence as a virtual card to be swiped;
[0014] When a card swiping instruction is received and the card swiping instruction does not carry identification information of a virtual card, setting the second virtual card bound to the virtual fence as the virtual card to be swiped;
[0015] When a card swiping instruction is received and the card swiping instruction carries identification information of a virtual card, the first virtual card corresponding to the identification information is set as the virtual card to be swiped.
[0016] According to the automatic switching method of virtual cards provided in the embodiment of the present application, since the data structure of the card swipe instruction corresponding to the first virtual card is different from that of the card swipe instruction corresponding to the second virtual card, and the card swipe instruction corresponding to the first virtual card carries the identification information of the virtual card, therefore, in the case where the current virtual fence is bound to at least one first virtual card and one second virtual card, the multiple first virtual cards and one second virtual card bound to the virtual fence can be distinguished according to the card swipe instruction received within the virtual fence. In addition, when exiting the virtual fence, the virtual card to be swiped can be set from the virtual cards that are not bound to any virtual fence according to the card swipe instruction received outside the virtual fence, so that the second virtual card bound to the virtual fence and the second virtual card not bound to the virtual fence can be distinguished, that is, the different second virtual cards can be distinguished, so that the accuracy of automatic card selection for virtual cards can be improved.
[0017] In an optional implementation of the first aspect, the fence radius of the geo-fence is greater than the fence radius of the WIFI fence; and setting the virtual card to be swiped from the virtual cards bound to the virtual fence according to the positional relationship between the current location and the WIFI fence includes:
[0018] When the current location is within the geographic fence and outside the WIFI fence, the second virtual card corresponding to the non-central card swiping point among the two second virtual cards bound to the virtual fence is set as the virtual card to be swiped;
[0019] When the current location is within the WIFI fence, the second virtual card corresponding to the central card swiping point among the two second virtual cards bound to the virtual fence is set as the virtual card to be swiped;
[0020] The central card swiping point is the card swiping point corresponding to the center of the virtual fence.
[0021] According to the automatic switching method of virtual cards provided in the embodiments of the present application, when only two second virtual cards are bound to the combined fence and a WIFI network exists at the card swiping point corresponding to one of the two second virtual cards, the second virtual cards bound to the virtual fence and the second virtual cards not bound to the virtual fence can be distinguished only by the positional relationship between the current location and the WIFI fence in the combined fence, that is, different second virtual cards can be distinguished, thereby improving the accuracy of automatic card selection.
[0022] In an optional implementation of the first aspect, the fence radius of the geo-fence is greater than the fence radius of the WIFI fence; and setting the virtual card to be swiped from the virtual cards bound to the virtual fence according to the card swiping instruction received in the virtual fence and the positional relationship between the current position and the WIFI fence includes:
[0023] Setting any one of the first virtual cards bound to the virtual fence as a virtual card to be swiped;
[0024] When the current location is within the geographic fence and outside the WIFI fence, according to the received card swiping instruction, determine the virtual card to be swiped from at least one first virtual card bound to the virtual fence and a second virtual card corresponding to a non-central card swiping point;
[0025] When the current location is within the WIFI fence, the second virtual card corresponding to the central card swiping point among the two second virtual cards bound to the virtual fence is set as the virtual card to be swiped;
[0026] The central card swiping point is the card swiping point corresponding to the center of the virtual fence.
[0027] According to the automatic switching method of virtual cards provided in the embodiments of the present application, when a combined fence is bound to at least one first virtual card and two second virtual cards, and a WIFI network exists at a card swiping point corresponding to one of the two second virtual cards, different types of first virtual cards and second virtual cards can be distinguished by the difference in card swiping instructions received in the virtual fence, and different first virtual cards of the same type can also be distinguished; through the positional relationship between the current position and the WIFI fence in the combined fence, multiple second virtual cards bound to the virtual fence and second virtual cards not bound to the virtual fence can be distinguished, that is, different second virtual cards can be distinguished, thereby improving the accuracy of automatic card selection.
[0028] In an optional implementation of the first aspect, determining the virtual card to be swiped from at least one first virtual card bound to the virtual fence and a second virtual card corresponding to a non-central swiping point according to the received card swiping instruction includes:
[0029] When a card swiping instruction is received and the card swiping instruction does not carry identification information of the virtual card, setting the second virtual card corresponding to the non-central card swiping point as the virtual card to be swiped;
[0030] When a card swiping instruction is received and the card swiping instruction carries identification information of a virtual card, the first virtual card corresponding to the identification information is set as the virtual card to be swiped.
[0031] In an optional implementation of the first aspect, setting the virtual card to be swiped from virtual cards that are not bound to any virtual fence according to the card swiping instruction received outside the virtual fence includes:
[0032] When a card swiping instruction is received and the card swiping instruction does not carry identification information of a virtual card, a second virtual card whose corresponding card swiping point is outside the virtual fence and within the target area and is not bound to any virtual fence is set as the virtual card to be swiped; the target area is a circular area with the central card swiping point of the virtual fence as the center and 2R as the radius, where R is the fence radius of the virtual fence;
[0033] When a card swiping instruction is received and the card swiping instruction carries identification information of a virtual card, a first virtual card corresponding to the identification information is set as a virtual card to be swiped.
[0034] In an optional implementation of the first aspect, the method further includes:
[0035] If the first virtual card is used for the first time to complete data interaction at the first card swiping point, and the distance between the current position and the central card swiping point of all created virtual fences is greater than 2R, then a first virtual fence with the first card swiping point as the central card swiping point and the fence type as a geographic fence is created, and the first virtual card that completes data interaction at the first card swiping point is bound to the first virtual fence; R is the fence radius of the virtual fence;
[0036] If the first virtual card is used for the first time to complete data interaction at the first card swiping point, and the distance between the current position and the center card swiping point of all created virtual fences is greater than R, and the distance between the current position and the center card swiping point of at least one created virtual fence is less than or equal to 2R, then a new virtual fence will not be created, and the first virtual card that completes data interaction at the first card swiping point will not be bound to any created virtual fence.
[0037] In an optional implementation of the first aspect, the method further includes:
[0038] If the second virtual card is used for the first time to complete data interaction at the second card swiping point, and the current location falls within the first virtual fence, the second virtual card that completes data interaction at the second card swiping point is bound to the first virtual fence;
[0039] If the second virtual card is used for the first time to complete data interaction at the second card swiping point, and the distance between the current position and the center card swiping point of the first virtual fence is greater than R and less than or equal to 2R, a new virtual fence will not be created, and the second virtual card that completes data interaction at the second card swiping point will not be bound to the first virtual fence.
[0040] In an optional implementation of the first aspect, the method further includes:
[0041] If the second virtual card is used for the first time to complete data interaction at the second card swiping point, and the distance between the current position and the central card swiping point of the first virtual fence is less than or equal to 2R, and at least one WIFI network is searched at the second card swiping point, a second virtual fence with the second card swiping point as the central card swiping point and a fence type of a combined fence is created, and the second virtual card that completes data interaction at the second card swiping point is bound to the second virtual fence;
[0042] The first virtual fence is deleted, and a virtual card whose corresponding card swiping point among the virtual cards bound to the first virtual fence falls within the second virtual fence is bound to the second virtual fence.
[0043] In an optional implementation of the first aspect, the method further includes:
[0044] If the second virtual card is used for the first time to complete data interaction at the third card swiping point, and the current location falls within the second virtual fence, and no WIFI network is searched at the third card swiping point, the second virtual card that completes data interaction at the third card swiping point is bound to the second virtual fence;
[0045] If the second virtual card is used for the first time to complete data interaction at the third card swiping point, and the distance between the current position and the center card swiping point of the second virtual fence is greater than R and less than or equal to 2R, and no WIFI network is searched at the third card swiping point, a new virtual fence will not be created, and the second virtual card that completes data interaction at the third card swiping point will not be bound to the second virtual fence shown.
[0046] According to the automatic switching method of virtual cards provided in the embodiment of the present application, by pre-creating one or more virtual fences, all card swiping points falling within a certain virtual fence are bound to the virtual fence, and for the card swiping point that does not fall within any virtual fence, if the virtual fence with the card swiping point as the center may overlap with other created virtual fences, a virtual fence with the card swiping point as the center is not established, so that there will be no overlap between the virtual fences. In addition, by dividing the fence types of virtual fences into geographic fences and combined fences composed of geographic fences and WIFI fences, and setting the priority of the combined fences higher than the priority of the geographic fences, when different types of virtual fences may have overlapping areas, the combined fences that can better assist electronic devices in realizing accurate card selection can be retained first, thereby further improving the accuracy of automatic card selection for virtual cards.
[0047] In a second aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; one or more memories; the one or more memories storing one or more computer executable programs, the one or more computer executable programs comprising instructions, which, when executed by the one or more processors, enable the electronic device to perform each step in the method for automatic switching of a virtual card as described in any implementation of the first aspect above.
[0048] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer-executable program. When the computer-executable program is called by a computer, the computer executes each step of the automatic switching method of the virtual card as described in any implementation method of the first aspect above.
[0049] In a fourth aspect, an embodiment of the present application provides a computer executable program product. When the computer executable program product runs on an electronic device, the electronic device executes each step of the method for automatically switching a virtual card as described in any implementation of the first aspect.
[0050] In a fifth aspect, an embodiment of the present application provides a chip system, including a processor, the processor is coupled to a memory, and the processor executes a computer executable program stored in the memory to implement each step in the method for automatically switching a virtual card as described in any implementation of the first aspect. The chip system can be a single chip or a chip module composed of multiple chips.
[0051] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A schematic diagram of a commonly used automatic card cutting method based on geographic fence;
[0053] Figure 2 A schematic diagram of the structure of a mobile phone provided in an embodiment of the present application;
[0054] Figure 3 A schematic diagram of the software architecture of a mobile phone according to an embodiment of the present application;
[0055] Figure 4 A schematic diagram of a user interface of a mobile phone provided in an embodiment of the present application;
[0056] Figure 5 A schematic diagram of a virtual fence creation scenario provided in an embodiment of the present application;
[0057] Figure 6A schematic diagram of a virtual fence creation scenario provided in another embodiment of the present application;
[0058] Figure 7 A schematic diagram of a virtual fence creation scene provided in yet another embodiment of the present application;
[0059] Figure 8 A schematic diagram of a virtual fence creation scene provided in yet another embodiment of the present application;
[0060] Fig. 9 A schematic diagram of a virtual fence creation scene provided in another embodiment of the present application;
[0061] Fig.10 A schematic flow chart of an automatic switching method of a virtual card provided in an embodiment of the present application;
[0062] Fig.11 A flowchart of the specific implementation of S1002 in a method for automatically switching a virtual card provided in an embodiment of the present application;
[0063] Fig.12 A flowchart for the specific implementation of S1003 in a method for automatically switching a virtual card provided in an embodiment of the present application;
[0064] Fig.13 This is a specific implementation flowchart of S1004 in a method for automatically switching a virtual card provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] It should be noted that the terms used in the implementation methods of the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two, "at least one" and "one or more" mean one, two or more than two.
[0066] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, it is defined that the "first" and "second" features may explicitly or implicitly include one or more of the features.
[0067] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0068] Near field communication (NFC) technology is a short-range wireless communication technology that is the result of the integration of contactless radio frequency identification technology and wireless interconnection technology. It has been widely used in various electronic devices (such as mobile phones or point of sale (POS) machines, etc.). Electronic devices that support NFC can exchange data when they are close to each other, thereby realizing various NFC functions, such as card swiping or file transfer.
[0069] When implementing the NFC function, electronic devices can usually work in the following modes: card reader mode, peer-to-peer mode, or card emulation mode. In the card reader mode, the electronic device (such as a POS machine) can be used as an NFC card reader terminal. In the card emulation mode, the electronic device (such as a mobile phone) can simulate one or more contactless virtual cards, such as a transportation card or access card, through card emulation technology, so that the electronic device can realize the card swiping function when it is close to the NFC card reader terminal.
[0070] At present, the card simulation mode can support electronic devices to simulate several different types of virtual cards such as traffic cards, access control cards and smart door lock cards, and support the simulation of multiple virtual cards of the same type. For example, it supports electronic devices to simulate 1 traffic card, 2 access control cards and 2 smart door lock cards. In a specific application, when an electronic device swipes a card through different types of virtual cards, the NFC card reader terminal corresponding to different types of virtual cards usually sends different card swipe instructions to the electronic device. For example, the NFC card reader terminal corresponding to the traffic card or smart door lock card usually sends a card swipe instruction carrying radio frequency information and identification information of the virtual card to the electronic device. Among them, the radio frequency information is used to realize normal NFC communication between the electronic device and the NFC card reader terminal. The identification information is used to distinguish different virtual cards, and the identification information can be, for example, an application identifier (AID). In this way, the terminal device can distinguish multiple different traffic cards or smart door lock cards based on the identification information of the virtual card carried in the card swipe instruction. The NFC card reader terminal corresponding to the access control card usually sends a card swipe instruction carrying only radio frequency information to the electronic device, so that the terminal device cannot distinguish multiple different access control cards.
[0071] For the scenario where users simulate multiple virtual cards through electronic devices, users usually hope that the electronic device can automatically switch cards when swiping the virtual card, that is, the electronic device can automatically switch to the corresponding virtual card according to different NFC card reading terminals, so as to achieve contactless card swiping as much as possible, reduce the user's participation in the card swiping process, and improve the user's card swiping experience.
[0072] In order to enable electronic devices to realize the automatic card cutting function, a commonly used solution is an automatic card cutting solution based on geo-fence. Among them, geo-fence can refer to a virtual geographical boundary surrounded by a virtual fence of an electronic device. In specific applications, the shape of the geo-fence can be circular or other shapes (such as irregular shapes), and the embodiment of the present application does not specifically limit the shape of the geo-fence. For ease of understanding, the geo-fence is circular as an example for exemplary description in the following text.
[0073] The automatic card cutting scheme based on geo-fence usually establishes a geo-fence centered on the geographical location where the electronic device is located when the card is successfully swiped, and binds the virtual card of the successful card swiping to the geo-fence, that is, each geo-fence is bound to only one virtual card. After that, when the electronic device enters the geo-fence again, it will automatically switch to the virtual card bound to the geo-fence, thereby realizing the automatic card cutting function. However, since the fence accuracy of the geo-fence (that is, the fence radius) cannot be reduced indefinitely, when there are multiple card swiping points that are close to each other, there will usually be overlapping areas between the geo-fences corresponding to the multiple card swiping points that are close to each other, and the electronic device cannot achieve accurate card cutting in the overlapping area, that is, the electronic device often selects the wrong card in the overlapping area, thereby reducing the success rate of automatic card selection.
[0074] For example, see Figure 1 , Figure 1 The following is a schematic diagram of a commonly used automatic card switching method based on geographic fence. Figure 1 As shown, when there is an overlapping area C1 between the geo-fences (geo-fence 1, geo-fence 2 and geo-fence 3) corresponding to three card swiping points (card swiping point K1, card swiping point K2 and card swiping point K3) that are close to each other, since the overlapping area C1 belongs to both geo-fence 1, geo-fence 2 and geo-fence 3, when the electronic device is in the overlapping area C1, for example, the electronic device may use the virtual card bound to geo-fence 1 as the virtual card to be swiped, while the actual place the user wants to go may be card swiping point K2; for another example, the electronic device may use the virtual card bound to geo-fence 2 as the virtual card to be swiped, while the actual place the user wants to go may be card swiping point K3. It can be seen that the electronic device often selects the wrong card in the overlapping area C1, thereby reducing the success rate of automatic card selection.
[0075] In order to enable electronic devices to realize the automatic card switching function, another commonly used solution is to automatically switch to the corresponding virtual card by identifying the information carried in the card swiping instruction according to the different card swiping instructions issued by different types of NFC card reader terminals, so as to realize the automatic card switching function. For example, when the electronic device recognizes that the card swiping instruction carries the identification information of the virtual card, the transportation card or smart door lock card corresponding to the identification information can be set as the virtual card to be swiped; because the identification information of different transportation cards or smart door lock cards is different, this solution can realize the automatic switching of different transportation cards or smart door lock cards. For another example, when the electronic device recognizes that the card swiping instruction only carries radio frequency information, it can set the access card as the virtual card to be swiped, so that the automatic switching between different types of virtual cards can be realized. However, since the card swiping instruction sent by the NFC card reader terminal corresponding to the access card does not carry any information related to the virtual card itself, this solution cannot realize the automatic switching of different access cards, resulting in the user needing to manually select the card when swiping with different access cards.
[0076] In view of this, in order to realize automatic switching of multiple virtual cards in an electronic device and to improve the accuracy of automatic card selection of the electronic device, an embodiment of the present application provides an automatic switching method of virtual cards and an electronic device, by pre-creating one or more virtual fences of the same type or different types, and allowing each virtual fence to be bound to multiple virtual cards, so that there is no overlap between the virtual fences; then, according to the difference in card swiping instructions corresponding to different types of virtual cards, the virtual cards are divided into a first virtual card and a second virtual card; and then, the pre-created virtual fences and the card swiping instructions received inside and outside the virtual fences are combined to automatically select multiple virtual cards, which can not only realize accurate switching of virtual cards of different types, but also realize accurate switching of different first virtual cards of the same type and different second virtual cards of the same type, thereby improving the accuracy of automatic card selection and enhancing the user's card swiping experience.
[0077] The automatic switching method of virtual cards provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices (such as smart watches, smart bracelets, smart glasses and smart jewelry, etc.), augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks and personal digital assistants (PDA). The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0078] The following uses a mobile phone as an example to describe the structure of the electronic device to which the automatic switching method of the virtual card provided in the embodiment of the present application is applicable. Figure 2 , is a structural diagram of a mobile phone provided in an embodiment of the present application.
[0079] like Figure 2 As shown, the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, and a bone conduction sensor 180M, etc.
[0080] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0081] The controller may be the nerve center and command center of the mobile phone 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0082] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0083] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a USB interface, etc.
[0084] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface to realize the touch function of the mobile phone 100.
[0085] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0086] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0087] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0088] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to realize the shooting function of the mobile phone 100. The processor 110 and the display screen 194 communicate via the DSI interface to realize the display function of the mobile phone 100.
[0089] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0090] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the mobile phone 100, and can also be used to transfer data between the mobile phone 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0091] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0092] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the mobile phone 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0093] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0094] The wireless communication function of the mobile phone 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0095] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0096] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the mobile phone 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0097] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0098] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the mobile phone 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0099] In some embodiments, the antenna 1 of the mobile phone 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wide-band code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0100] The mobile phone 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0101] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0102] The mobile phone 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0103] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0104] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0105] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the mobile phone 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0106] Video codecs are used to compress or decompress digital videos. Mobile phone 100 may support one or more video codecs. Thus, mobile phone 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0107] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, the intelligent cognition of the mobile phone 100 can be realized, such as: image recognition, face recognition, voice recognition, text understanding, etc.
[0108] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0109] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile phone 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0110] The mobile phone 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
[0111] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0112] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The mobile phone 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0113] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the mobile phone 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.
[0114] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The mobile phone 100 can be provided with at least one microphone 170C. In other embodiments, the mobile phone 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the mobile phone 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0115] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0116] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The mobile phone 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the mobile phone 100 detects the touch operation intensity according to the pressure sensor 180A. The mobile phone 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0117] The gyroscope sensor 180B can be used to determine the motion posture of the mobile phone 100. In some embodiments, the angular velocity of the mobile phone 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. Exemplarily, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shaking of the mobile phone 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the mobile phone 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0118] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the mobile phone 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0119] The magnetic sensor 180D includes a Hall sensor. The mobile phone 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the mobile phone 100 is a flip phone, the mobile phone 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.
[0120] The acceleration sensor 180E can detect the magnitude of the acceleration of the mobile phone 100 in various directions (generally three axes). When the mobile phone 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0121] The distance sensor 180F is used to measure the distance. The mobile phone 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the mobile phone 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0122] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The mobile phone 100 emits infrared light outward through the light emitting diode. The mobile phone 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone 100. When insufficient reflected light is detected, the mobile phone 100 can determine that there is no object near the mobile phone 100. The mobile phone 100 can use the proximity light sensor 180G to detect that the user holds the mobile phone 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in the leather case mode and the pocket mode to automatically unlock and lock the screen.
[0123] The ambient light sensor 180L is used to sense the ambient light brightness. The mobile phone 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the mobile phone 100 is in a pocket to prevent accidental touches.
[0124] The fingerprint sensor 180H is used to collect fingerprints. The mobile phone 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0125] The temperature sensor 180J is used to detect temperature. In some embodiments, the mobile phone 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the mobile phone 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the mobile phone 100 heats the battery 142 to avoid abnormal shutdown of the mobile phone 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the mobile phone 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
[0126] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the mobile phone 100, which is different from the position of the display screen 194.
[0127] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0128] The key 190 includes a power key, a volume key, etc. The key 190 can be a mechanical key or a touch key. The mobile phone 100 can receive key input and generate key signal input related to the user settings and function control of the mobile phone 100.
[0129] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0130] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0131] The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the mobile phone 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The mobile phone 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The mobile phone 100 interacts with the network through the SIM card to realize functions such as calls and data communications. In some embodiments, the mobile phone 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the mobile phone 100 and cannot be separated from the mobile phone 100.
[0132] Understandably, Figure 2 The illustrated structure does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer components than those shown in the figure, or combine some components, or separate some components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0133] Exemplarily, the software system of the mobile phone 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The present application embodiment takes the Android system of the layered architecture as an example to illustrate the software structure of the mobile phone 100. Figure 3 , which is a software structure block diagram of a mobile phone 100 according to an embodiment of the present application.
[0134] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0135] The application layer may include a series of application packages. Figure 3 As shown, the application package may include application packages such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, short message, wallet, etc.
[0136] In the embodiment of the present application, when the wallet application package is running, it can access the fence construction module and / or positioning module provided by the application layer, so as to provide corresponding intelligent services for the user, such as providing a service of automatically switching virtual cards in the NFC communication scenario.
[0137] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0138] like Figure 3 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a fence building module, a positioning module, and the like.
[0139] In the embodiment of the present application, when the mobile phone 100 needs to create a virtual fence, the application framework layer can provide the application layer with APIs related to creating a geographic fence, such as APIs corresponding to a fence construction module and / or a positioning module, etc. Among them, the positioning module can be used to obtain the positioning data of the mobile phone 100, thereby realizing the positioning of the mobile phone 100. The fence construction module can realize functions such as the creation of a virtual fence based on the positioning data of the mobile phone 100.
[0140] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0141] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0142] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0143] The phone manager is used to provide communication functions of the mobile phone 100, such as management of call status (including answering, hanging up, etc.).
[0144] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0145] The notification manager enables applications to display notification information in the status bar. It 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 download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, the phone 100 vibrates, the indicator light flashes, etc.
[0146] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0147] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0148] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application 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.
[0149] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0150] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0151] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static 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.
[0152] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0153] A 2D graphics engine is a drawing engine for 2D drawings.
[0154] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0155] The following describes in detail the automatic switching method for a virtual card provided in an embodiment of the present application by taking the mobile phone 100 in the above embodiment as an example in which the execution subject of the automatic switching method for a virtual card is used.
[0156] In the embodiment of the present application, the mobile phone 100 supports the NFC function. The mobile phone 100 can implement short-range wireless communication services with other electronic devices (such as NFC card reader terminals) through the NFC function, such as mobile phone card swiping services.
[0157] See also Figure 4 , Figure 4 A schematic diagram of a user interface of a mobile phone provided in an embodiment of the present application. Figure 4 As shown in (a) of FIG. 1 , a wallet application 401 may be installed in the mobile phone 100. The wallet application 401 may be located at Figure 3 The application layer of the software architecture of the mobile phone 100 shown in FIG. 4 is a schematic diagram showing a plurality of virtual cards pre-added to the wallet application 401. The plurality of virtual cards may be electronic cards simulated by the mobile phone 100 based on the card simulation technology.
[0158] It is understandable that since the specific process of the mobile phone 100 simulating a virtual card through card simulation technology is an existing technology, the specific simulation process of the virtual card can refer to the relevant description in the existing technology and will not be described in detail here.
[0159] Exemplarily, the multiple virtual cards may include but are not limited to a variety of different types of virtual cards such as transportation cards, access cards, and smart door lock cards. The present application embodiment does not impose any restrictions on the specific types of virtual cards. Among them, transportation cards may include, for example, subway cards, etc.; access cards may include, for example, community access cards, elevator access cards, or underground garage access cards, etc.; smart door lock cards may include, for example, smart door lock cards corresponding to home keys, etc.
[0160] In one embodiment of the present application, when a user needs to swipe a virtual card in the mobile phone 100, the user can manually select a virtual card from multiple virtual cards added in the mobile phone 100 as the virtual card to be swiped. For example, the user can call out multiple virtual cards in the mobile phone 100 by inputting a preset operation to the mobile phone 100. The preset operation can be set according to actual needs, for example, the preset operation can be a double-click operation for the power button of the mobile phone 100.
[0161] For example, when the user double-clicks the power button of the mobile phone 100, the mobile phone 100 may display the following information: Figure 4The virtual card selection interface 42 shown in (b) of FIG. 1 may include all virtual cards added to the mobile phone 100. When the user clicks on one of the virtual cards (such as a transportation card), the mobile phone 100 may use the clicked virtual card as the virtual card to be swiped. Figure 4 As shown in (c) in FIG. 1 , the mobile phone 100 may display the virtual card to be swiped on the side close to the upper edge of the mobile phone in the virtual card selection interface 42, and display other virtual cards except the virtual card to be swiped on the side close to the lower edge of the mobile phone in the virtual card selection interface 42. Based on this, Figure 4 As shown in (d), when the user brings the mobile phone 100 close to the NFC card reader terminal, the mobile phone 100 can perform NFC communication with the NFC card reader terminal based on the virtual card to be swiped, thereby realizing the card swiping service.
[0162] In another embodiment of the present application, the wallet application in the mobile phone 100 may support an automatic card switching function. The automatic card switching function may be used to realize automatic switching of multiple virtual cards in the mobile phone 100, that is, when the user needs to swipe a virtual card in the mobile phone 100, the mobile phone 100 may automatically select a virtual card from multiple virtual cards as the virtual card to be swiped, without the user having to manually switch the card, thereby improving the efficiency of swiping virtual cards.
[0163] In a specific application, the realization of the automatic card switching function needs to rely on the virtual fence created by the mobile phone 100 in the process of using the virtual card. The virtual fence may refer to a virtual geographical boundary surrounded by the mobile phone 100 through the virtual fence.
[0164] It can be understood that when the mobile phone 100 interacts with the corresponding NFC card reader terminal through the transportation card, the NFC card reader terminal corresponding to the transportation card will send a card swipe instruction carrying the identification information of the transportation card to the mobile phone 100; when the mobile phone 100 interacts with the NFC card reader terminal corresponding to the smart door lock card through the smart door lock card, the NFC card reader terminal corresponding to the smart door lock card will send a card swipe instruction carrying the identification information of the smart door lock card to the mobile phone 100; when the mobile phone 100 interacts with the NFC card reader terminal corresponding to the access control card through the access control card, the NFC card reader terminal corresponding to the access control card will send a card swipe instruction carrying only the radio frequency information used to realize normal NFC communication to the mobile phone. That is, when the mobile phone 100 interacts with the corresponding NFC card reader terminal through the transportation card or the smart door lock card, the data structure of the interactive data transmitted between the mobile phone 100 and the NFC card reader terminal is the same. The data structure of the interactive data transmitted between the mobile phone 100 and the NFC card reader terminal corresponding to the transportation card or the smart door lock card is different from the data structure of the interactive data transmitted between the mobile phone and the NFC card reader terminal corresponding to the access control card.
[0165] Therefore, for the sake of convenience, the embodiment of the present application can divide virtual cards into two different types of virtual cards: a first virtual card and a second virtual card. Specifically, the card swipe instruction corresponding to the first virtual card carries the identification information of the virtual card, and the card swipe instruction corresponding to the second virtual card does not carry the identification information of the virtual card. Exemplarily, the first virtual card may include a transportation card and a smart door lock card, etc.; the second virtual card may include an access card.
[0166] The specific process of the mobile phone 100 creating a virtual fence is described in detail below.
[0167] In one embodiment, when the mobile phone 100 uses the first virtual card to complete data interaction for the first time at the first card swiping point, the mobile phone 100 can obtain geographic location information of the current location and determine whether to create a virtual fence based on the geographic location information.
[0168] The first card swiping point may be an NFC card reader corresponding to any first virtual card in the mobile phone 100, for example, an NFC card reader corresponding to any transportation card or smart door lock card. The mobile phone 100 uses the first virtual card to complete data interaction at the first card swiping point, which specifically means that the mobile phone 100 uses the first virtual card to swipe the card successfully at the first card swiping point.
[0169] The current location may be the location where the mobile phone 100 uses the first virtual card to complete data interaction at the first card swiping point, and may also be regarded as the location of the first card swiping point. The geographical location information of the current location may be obtained by the mobile phone 100 by calling the positioning module in the application framework layer. The location information may be represented by latitude and longitude coordinates, for example.
[0170] In an optional implementation of the present embodiment, when the mobile phone 100 uses the first virtual card to complete data interaction for the first time at the first card swiping point, and the distance between the current location of the mobile phone 100 and the center card swiping point of all created virtual fences is greater than 2R, the mobile phone 100 can create a first virtual fence with the first card swiping point as the center card swiping point and the fence type is a geographic fence, and bind the first virtual card that completes data interaction at the first card swiping point to the first virtual fence.
[0171] The center swipe point of the virtual fence may refer to the center of the virtual fence, and R may be the fence radius of the virtual fence. That is, the first virtual fence with the first swipe point as the center swipe point may be a geographic fence with the first swipe point as the center and R as the radius. For example, R may be 200 meters to 300 meters.
[0172] In another optional implementation of the present embodiment, when the mobile phone 100 uses the first virtual card for the first time to complete data interaction at the first card swiping point, and the distance between the current position of the mobile phone 100 and the center card swiping point of all created virtual fences is greater than R, and the distance between the current position of the mobile phone 100 and the center card swiping point of at least one created virtual fence is less than or equal to 2R, the mobile phone 100 may not create a new virtual fence, and may not bind the above-mentioned first virtual card to any created virtual fence.
[0173] For example, see Figure 5 , Figure 5 A schematic diagram of a virtual fence creation scenario provided in an embodiment of the present application. Figure 5 As shown, it is assumed that the mobile phone 100 has created a virtual fence W0 with the traffic card swiping point S0 as the center swiping point. Afterwards, when the mobile phone 100 uses the traffic card J1 to complete data interaction for the first time at the swiping point S1 of the traffic card J1 (i.e., the first swiping point mentioned above), optionally, if the distance between the position where the mobile phone 100 is located when completing the data interaction and the center swiping point of the virtual fence W0 (i.e., the traffic card swiping point S0) is greater than 2R, then Figure 5 As shown in (a) in FIG. 1 , the mobile phone 100 can create a virtual fence W1 (i.e., a first virtual fence) with the card swiping point S1 of the transportation card J1 as the central card swiping point and the fence type as a geographic fence, and can bind the transportation card J1 to the virtual fence W1; if the distance between the location where the mobile phone 100 is located when completing the data interaction and the central card swiping point of the virtual fence W0 (i.e., the transportation card swiping point S0) is greater than R and less than or equal to 2R, then Figure 5 As shown in (b), the mobile phone 100 may not create a new virtual fence and may not bind the transportation card J1 to the virtual fence W0.
[0174] In another embodiment, when the mobile phone 100 uses the second virtual card to complete data interaction for the first time at the second card swiping point, the mobile phone 100 can obtain the geographic location information of the current location and determine whether to create a virtual fence based on the geographic location information.
[0175] The second card swiping point may be an NFC card reader corresponding to any second virtual card in the mobile phone 100, for example, an NFC card reader corresponding to any access control card. The mobile phone 100 uses the second virtual card to complete data interaction at the second card swiping point, which means that the mobile phone 100 uses the second virtual card to swipe the card successfully at the second card swiping point.
[0176] The current location may be the location where the mobile phone 100 completes data interaction at the second card swiping point using the second virtual card, and may also be regarded as the location of the second card swiping point.
[0177] In an optional implementation of this embodiment, when the mobile phone 100 uses the second virtual card to complete data interaction for the first time at the second card swiping point, and the current location of the mobile phone 100 falls within the above-mentioned first virtual fence, the mobile phone 100 can bind the second virtual card that completes data interaction at the second card swiping point to the first virtual fence.
[0178] For example, see Figure 6 , Figure 6 A schematic diagram of a virtual fence creation scene provided by another embodiment of the present application. Figure 6 As shown, in Figure 5 Based on the scenario shown in (a), if the mobile phone 100 uses the access card M1 for the first time to complete data interaction at the access card M1 swiping point S2 (i.e., the second swiping point mentioned above), and the position of the mobile phone 100 when completing the data interaction falls within the virtual fence W1, then the mobile phone 100 can bind the access card M1 with the virtual fence W1.
[0179] In another optional implementation of the present embodiment, when the mobile phone 100 uses the second virtual card to complete data interaction for the first time at the second card swiping point, and the distance between the current position of the mobile phone 100 and the center card swiping point of the first virtual fence is greater than R and less than or equal to 2R, the mobile phone 100 may not create a new virtual fence, and may not bind the second virtual card that completes the data interaction at the second card swiping point to the first virtual fence.
[0180] For example, please refer to Figure 6 If the mobile phone 100 uses the access card M2 for the first time to complete data interaction at the card swiping point S3 of the access card M2 (i.e. the second card swiping point mentioned above), and the distance between the position where the mobile phone 100 is located when completing the data interaction and the center card swiping point of the virtual fence W1 (i.e. the card swiping point S1 of the transportation card J1) is greater than R and less than or equal to 2R, then the mobile phone 100 may not create a new virtual fence and may not bind the access card M2 to the virtual fence W1.
[0181] In another optional implementation of this embodiment, when the mobile phone 100 uses the second virtual card to complete data interaction for the first time at the second card swiping point, and the distance between the current location of the mobile phone and the central card swiping point of the first virtual fence is less than or equal to 2R, and at least one WIFI network is searched at the second card swiping point, a second virtual fence with the second card swiping point as the central card swiping point and the fence type as a combined fence is created, and the second virtual card that completes data interaction at the second card swiping point is bound to the second virtual fence. In addition, the mobile phone 100 can also delete the first virtual fence, and bind the virtual card whose corresponding card swiping point in the virtual card bound to the first virtual fence falls within the second virtual fence to the second virtual fence.
[0182] The creation of a second virtual fence with the second card swiping point as the center card swiping point and a fence type of a combined fence may specifically include: creating a WIFI fence and a geofence with the second card swiping point as the center card swiping point, respectively, and determining the combination of the WIFI fence and the geofence with the second card swiping point as the center card swiping point as a virtual fence with a fence type of a combined fence. The fence radius of the geofence is greater than the fence radius of the WIFI fence. The fence radius of the WIFI fence may be, for example, about 10 meters.
[0183] In this embodiment, falling within the second virtual fence may refer to falling within the outermost geographic fence of the second virtual fence.
[0184] It should be noted that in order to avoid the failure of the mobile phone 100 to accurately cut the card due to overlapping fences, when there is an overlapping area between two virtual fences created by the mobile phone 100, the mobile phone 100 can retain the virtual fence with a higher priority and delete the virtual fence with a lower priority. Among them, the priority of the combined fence is higher than the priority of the geographic fence.
[0185] For example, see Figure 7 , Figure 7 A schematic diagram of a virtual fence creation scene provided by another embodiment of the present application. Figure 7 As shown, in Figure 5 Based on the scenario shown in (a), if the mobile phone 100 uses the access card M1 for the first time to complete data interaction at the card swiping point S2 of the access card M1 (i.e., the second card swiping point mentioned above), and the distance between the position where the mobile phone 100 is located when completing the data interaction and the center card swiping point of the virtual fence W1 (i.e., the card swiping point S1 of the transportation card J1) is greater than R and less than or equal to 2R, and at least one WIFI network is searched at the card swiping point S2 of the access card M1, then the mobile phone 100 can respectively create a WIFI fence and a geo-fence with the card swiping point S2 of the access card M1 as the center card swiping point, and determine the combination of the WIFI fence and the geo-fence as a virtual fence W2 (i.e., the second virtual fence) with a fence type of a combined fence, and can bind the access card M1 to the virtual fence W2.
[0186] It is understandable that, since there is an overlapping area between the virtual fence W2 and the virtual fence W1, the mobile phone 100 can delete the virtual fence W1 after creating the virtual fence W2 (the dotted line in the figure indicates that the virtual fence W1 has been deleted). After deleting the virtual fence W1, the mobile phone 100 can determine whether there is a virtual card whose corresponding card swiping point falls within the virtual fence W2 among the virtual cards bound to the virtual fence W1. For example, since the card swiping point S1 corresponding to the traffic card J1 bound to the virtual fence W1 does not fall within the virtual fence W2, the mobile phone 100 may not bind the traffic card J1 to the virtual fence W2.
[0187] In another embodiment, when the mobile phone 100 uses the second virtual card to complete data interaction for the first time at the third card swiping point, and the current location falls within the second virtual fence, and no WIFI network is searched at the third card swiping point, the mobile phone 100 can bind the second virtual card that completes data interaction at the third card swiping point to the second virtual fence.
[0188] The third card swiping point may be an NFC card reader terminal corresponding to any second virtual card in the mobile phone 100. For example, it may be an NFC card reader terminal corresponding to any access control card. The mobile phone 100 uses the second virtual card to complete data interaction at the third card swiping point, which means that the mobile phone 100 uses the second virtual card to swipe the card successfully at the third card swiping point.
[0189] The current location may be the location where the mobile phone 100 completes data interaction at the third card swiping point using the second virtual card, and may also be regarded as the location of the third card swiping point.
[0190] For example, please refer to Figure Figure 8 , Figure 8 A schematic diagram of a virtual fence creation scene provided by another embodiment of the present application. Figure 8 As shown, in Figure 7 Based on the scenario shown, if the mobile phone 100 uses the access card M3 for the first time to complete data interaction at the access card M2 swiping point S3 (i.e. the third swiping point mentioned above), and the position of the mobile phone 100 when completing the data interaction falls within the virtual fence W2, and the mobile phone 100 does not search for a WIFI network at the access card M2 swiping point S3, then the mobile phone 100 can bind the access card M3 to the virtual fence W2.
[0191] In another embodiment, when the mobile phone 100 uses the second virtual card to complete data interaction for the first time at the third card swiping point, and the distance between the current position and the center card swiping point of the second virtual fence is greater than R and less than or equal to 2R, and no WIFI network is searched at the third card swiping point, the mobile phone 100 may not create a new virtual fence, and may not bind the second virtual card that completes data interaction at the third card swiping point to the second virtual fence.
[0192] For example, please refer to Figure 8 If the mobile phone 100 uses the access card M3 for the first time to complete data interaction at the card swiping point S4 of the access card M3 (i.e., the third card swiping point mentioned above), and the distance between the position where the mobile phone 100 is located when completing the data interaction and the central card swiping point of the virtual fence W2 (i.e., the card swiping point S2 of the access card M1) is greater than R and less than or equal to 2R, and no WIFI network is searched at the card swiping point S4 of the access card M3, then the mobile phone 100 may not create a new virtual fence, and may not bind the access card M3 to the virtual fence W2.
[0193] In another embodiment, when the mobile phone 100 uses the first virtual card to complete data interaction for the first time at the first card swiping point, and the current location falls within the second virtual fence, the mobile phone 100 can bind the first virtual card that completes the data interaction at the first card swiping point with the second virtual fence.
[0194] For example, see Fig. 9 , Fig. 9 A schematic diagram of a virtual fence creation scene provided by another embodiment of the present application. Fig. 9 As shown, in Figure 8 Based on the scenario shown, if the mobile phone 100 uses the transportation card J1 for the first time to complete data interaction at the transportation card J1's swiping point S1 (i.e., the first swiping point mentioned above), and the position of the mobile phone 100 when completing the data interaction falls within the virtual fence W2, then the mobile phone 100 can bind the transportation card J1 to the virtual fence W2.
[0195] When creating a virtual fence, the embodiment of the present application binds all the card swiping points that fall within a certain virtual fence to the virtual fence, and for the card swiping point that does not fall within any virtual fence, if the virtual fence with the card swiping point as the center card swiping point may overlap with other created virtual fences, a virtual fence with the card swiping point as the center card swiping point is not established, so that there will be no overlap between the virtual fences. In addition, by dividing the fence types of virtual fences into geo-fences and combined fences composed of geo-fences and WIFI fences, and setting the priority of the combined fence higher than the priority of the geo-fence, when different types of virtual fences may have overlapping areas, the combined fence that can better assist the electronic device in realizing accurate card selection can be retained first, thereby further improving the accuracy of automatic card selection for virtual cards.
[0196] The specific process involved in implementing the automatic card switching function of the mobile phone 100 is described in detail below.
[0197] For example, see Fig.10 , Fig.10 The following is a schematic flow chart of a method for automatically switching a virtual card provided in an embodiment of the present application. Fig.10 As shown, the virtual card switching method may include S1001 to S1005, which are described in detail as follows:
[0198] S1001, when entering a virtual fence, obtaining the fence type of the virtual fence and the virtual card information bound to the virtual fence.
[0199] In a specific application, when the automatic card cutting function of the wallet application of the mobile phone 100 is turned on, the mobile phone 100 can obtain the geographic location information of its current location in real time, and determine the positional relationship between the mobile phone 100 and each pre-created virtual fence based on the geographic location information.
[0200] When the mobile phone 100 determines that the mobile phone 100 enters any pre-created virtual fence based on the geographical location information of the current location, the mobile phone 100 can obtain the fence type of the virtual fence and the virtual card information bound to the virtual fence.
[0201] Among them, the fence type may include a geographic fence based on a first virtual card and a combined fence based on a second virtual card, etc.
[0202] The virtual card information may include, for example, the number and type of virtual cards.
[0203] The card type may include, for example, a first virtual card and a second virtual card.
[0204] It should be noted that, for specific instructions on the first virtual card, the second virtual card, the geographic fence and the combined fence, reference may be made to the relevant descriptions in the aforementioned embodiments, which will not be repeated here.
[0205] Optionally, when the fence type is a geographic fence based on a first virtual card, and the virtual fence is bound to at least one first virtual card and one second virtual card, the mobile phone 100 may execute S1002.
[0206] Optionally, when the fence type is a combination fence of a WIFI fence and a geographic fence based on the second virtual card, and the virtual fence is bound to two second virtual cards, the mobile phone 100 may execute S1003.
[0207] Optionally, when the fence type is a combination fence of a WIFI fence based on the second virtual card and a geographic fence, and the virtual fence is bound to at least one first virtual card and two second virtual cards, the mobile phone 100 can execute S1004.
[0208] That is to say, in the embodiment of the present application, S1002, S1003 and S1004 are mutually exclusive steps. When the mobile phone 100 executes S1002, it does not execute S1003 and S1004; when the mobile phone 100 executes S1003, it does not execute S1002 and S1004; when the mobile phone 100 executes S1004, it does not execute S1002 and S1003.
[0209] S1002, when the fence type is a geographic fence based on a first virtual card, and the virtual fence is bound to at least one first virtual card and one second virtual card, according to a card swiping instruction received in the virtual fence, a virtual card to be swiped is set from the virtual cards bound to the virtual fence.
[0210] Since the data structure of the card swipe instruction corresponding to the first virtual card is different from that of the card swipe instruction corresponding to the second virtual card, and the card swipe instruction corresponding to the first virtual card carries the identification information of the virtual card, therefore, when the virtual fence currently located by the mobile phone 100 is bound to at least one first virtual card and one second virtual card, the mobile phone 100 can distinguish between multiple first virtual cards and one second virtual card bound to the virtual fence according to the card swipe instruction received within the virtual fence. In addition, in combination with S1005, when the mobile phone 100 exits the virtual fence, the mobile phone 100 can set the virtual card to be swiped from the virtual cards that are not bound to any virtual fence according to the card swipe instruction received outside the virtual fence, so that the mobile phone 100 can distinguish between the second virtual card bound to the virtual fence and the second virtual card not bound to the virtual fence, that is, to distinguish between different second virtual cards, thereby improving the accuracy of automatic card selection by the mobile phone 100.
[0211] For example, Figure 6 Taking the virtual fence W1 in the illustrated scenario as an example, when the mobile phone 100 enters the virtual fence W1, the mobile phone 100 can set the transportation card J1 or the access card M1 as the virtual card to be swiped according to the card swiping instruction received in the virtual fence W1. After the mobile phone 100 exits the virtual fence W1, the mobile phone 100 can set the access card M2 as the virtual card to be swiped according to the card swiping instruction received outside the virtual fence W1.
[0212] It is understandable that after the mobile phone 100 is set with the virtual card to be swiped, when the mobile phone 100 is close to the NFC card reader terminal, the mobile phone 100 can directly exchange data with the NFC card reader terminal through the virtual card to be swiped, thereby realizing the card swiping function.
[0213] In a specific implementation, in S1002, according to the card swiping instruction received in the virtual fence, setting the virtual card to be swiped from the virtual cards bound to the virtual fence may specifically include: Fig.11 S1002-1 to S1002-3 shown are described in detail as follows:
[0214] S1002-1, setting any first virtual card bound to the virtual fence as the virtual card to be swiped.
[0215] S1002-2: When a card swiping instruction is received and the card swiping instruction does not carry identification information of the virtual card, a second virtual card bound to the virtual fence is set as the virtual card to be swiped.
[0216] S1002-3: When a card swiping instruction is received and the card swiping instruction carries identification information of a virtual card, a first virtual card corresponding to the identification information is set as a virtual card to be swiped.
[0217] In this implementation, when the mobile phone 100 enters any virtual fence and determines that the fence type of the virtual fence is a geographic fence based on a first virtual card, and the virtual fence is bound to at least one first virtual card and one second virtual card, the mobile phone 100 can directly set any first virtual card bound to the virtual fence as the virtual card to be swiped. Afterwards, when the mobile phone 100 receives a card swiping instruction that does not carry the identification information of the virtual card, the mobile phone 100 can set the second virtual card bound to the virtual fence as the virtual card to be swiped; when the mobile phone 100 receives a card swiping instruction that carries the identification information of the virtual card, the mobile phone 100 can set the first virtual card corresponding to the identification information as the virtual card to be swiped.
[0218] For example, Figure 6 Taking the virtual fence W1 in the illustrated scenario as an example, when the mobile phone 100 enters the virtual fence W1, the mobile phone 100 can set the transportation card J1 as the virtual card to be swiped. Afterwards, when the mobile phone 100 approaches the card swiping point S2 of the access card M1, the mobile phone 100 will receive a card swiping instruction from the card swiping point S2. Since the card swiping instruction does not carry the identification information of the virtual card, the mobile phone 100 can set the access card M1 as the virtual card to be swiped. In addition, when the mobile phone 100 exits the virtual fence W1, if the mobile phone 100 receives a card swiping instruction that does not carry the identification information of the virtual card, the mobile phone 100 can set the access card M2 that is not bound to any virtual fence as the virtual card to be swiped, thereby achieving the distinction between different access cards and improving the accuracy of the automatic card selection of the mobile phone 100.
[0219] S1003, when the fence type is a combination fence of a WIFI fence and a geographic fence based on the second virtual card, and the virtual fence is bound to two second virtual cards, a virtual card to be swiped is set from the virtual cards bound to the virtual fence according to the positional relationship between the current location and the WIFI fence.
[0220] In this embodiment, the fence radius of the geographic fence is greater than the fence radius of the WIFI fence.
[0221] In a specific application, the positional relationship between the current location and the WIFI fence may include: the current location is located inside the WIFI fence and the current location is located outside the WIFI fence.
[0222] In a specific implementation, in S1003, according to the positional relationship between the current location and the WIFI fence, setting the virtual card to be swiped from the virtual cards bound to the virtual fence may include: Fig.12 S1003-1 to S1003-2 shown are described in detail as follows:
[0223] S1003-1, when the current location is within the geographic fence and outside the WIFI fence, the second virtual card corresponding to the non-central card swiping point among the two second virtual cards bound to the virtual fence is set as the virtual card to be swiped.
[0224] S1003-2, when the current location is within the WIFI fence, the second virtual card corresponding to the central card swiping point among the two second virtual cards bound to the virtual fence is set as the virtual card to be swiped.
[0225] The central card swiping point may be the card swiping point corresponding to the center of the circle of the virtual fence. For example, when the fence type of the virtual fence is a combined fence, the central card swiping point may refer to the card swiping point corresponding to the center of the circle shared by the WIFI fence and the geofence; when the fence type of the virtual fence is a geofence, the central card swiping point may refer to the card swiping point corresponding to the center of the circle of the geofence.
[0226] For example, Figure 8 Taking the virtual fence W2 in the shown scenario as an example, when the mobile phone 100 enters the virtual fence W2, if the mobile phone 100 is inside the geographic fence of the virtual fence W2 and outside the WIFI fence, the mobile phone 100 can set the access card M2 as the virtual card to be swiped; if the mobile phone 100 enters the WIFI fence of the virtual fence W2, the mobile phone 100 can set the access card M1 as the virtual card to be swiped; after the mobile phone 100 exits the virtual fence W2, if the mobile phone 100 receives a card swiping instruction that does not carry the identification information of the virtual card, the mobile phone 100 can set the access card M3 as the virtual card to be swiped, so that it can realize the distinction between multiple different access cards inside and outside the WIFI fence and / or inside and outside the geographic fence, thereby improving the accuracy of automatic card selection by the mobile phone 100.
[0227] S1004, when the fence type is a combination fence of a WIFI fence and a geographic fence based on a second virtual card, and the virtual fence is bound to at least one first virtual card and two second virtual cards, according to the card swiping instruction received in the virtual fence and the positional relationship between the current location and the WIFI fence, a virtual card to be swiped is set from the virtual cards bound to the virtual fence.
[0228] It should be noted that the difference between S1004 and S1003 is that the virtual fence currently located by the mobile phone 100 is bound with an additional first virtual card. Since the mobile phone 100 can directly recognize the first virtual card based on the card swiping instruction, in this embodiment, the mobile phone 100 can set the virtual card to be swiped from the virtual cards bound to the virtual fence based on the card swiping instruction received in the virtual fence and the positional relationship between the mobile phone 100 and the WIFI fence of the combined fence.
[0229] In a specific implementation, in S1004, according to the card swiping instruction received in the virtual fence and the positional relationship between the current location and the WIFI fence, the virtual card to be swiped is set from the virtual cards bound to the virtual fence, which may specifically include the following steps: Fig.13 S1004-1 to S1004-3 shown are described in detail as follows:
[0230] S1004-1, setting any first virtual card bound to the virtual fence as the virtual card to be swiped.
[0231] S1004-2, when the current location is within the geographic fence and outside the WIFI fence, determine the virtual card to be swiped from at least one first virtual card bound to the virtual fence and the second virtual card corresponding to the non-central swiping point according to the received card swiping instruction.
[0232] S1004-3, when the current location is within the WIFI fence, the second virtual card corresponding to the central card swiping point among the two second virtual cards bound to the virtual fence is set as the virtual card to be swiped.
[0233] Specifically, S1004-2 may include the following steps 1 and 2:
[0234] Step a1: when a card swiping instruction is received and the card swiping instruction does not carry identification information of the virtual card, a second virtual card corresponding to the non-central card swiping point is set as the virtual card to be swiped.
[0235] Step a2: when a card swiping instruction is received and the card swiping instruction carries identification information of a virtual card, a first virtual card corresponding to the identification information is set as the virtual card to be swiped.
[0236] In this implementation, when the mobile phone 100 enters any virtual fence and determines that the fence type of the virtual fence is a combined fence based on the second virtual card, and the virtual fence is bound to at least one first virtual card and two second virtual cards, the mobile phone 100 can first set any first virtual card bound to the virtual fence as the virtual card to be swiped. Afterwards, when the mobile phone 100 is within the geographic fence of the virtual fence and outside the WIFI fence, the mobile phone 100 can set the second virtual card corresponding to the non-central swiping point among the two second virtual cards bound to the virtual fence as the virtual card to be swiped when receiving a swiping instruction that does not carry the identification information of the virtual card; or, when the mobile phone 100 receives a swiping instruction that carries the identification information of the virtual card, the mobile phone 100 can set the first virtual card corresponding to the identification information of the virtual card as the virtual card to be swiped. When the mobile phone 100 is within the WIFI fence of the virtual fence, the mobile phone 100 can set the second virtual card corresponding to the central swiping point among the two second virtual cards bound to the virtual fence as the virtual card to be swiped.
[0237] For example, Fig. 9 Taking the virtual fence W2 in the illustrated scenario as an example, when the mobile phone 100 enters the virtual fence W2, the mobile phone 100 can set the transportation card J1 as the virtual card to be swiped. Afterwards, when the mobile phone 100 receives a card swiping instruction without the identification information of the virtual card within the geographic fence of the virtual fence W2 and outside the WIFI fence, the mobile phone 100 can set the access card M2 as the virtual card to be swiped. Afterwards, when the mobile phone 100 enters the WIFI fence of the virtual fence W2, the mobile phone 100 can set the access card M1 as the virtual card to be swiped.
[0238] S1005, after exiting the virtual fence, according to the card swiping instruction received outside the virtual fence, a virtual card to be swiped is set from virtual cards not bound to any virtual fence.
[0239] In a specific implementation, in S1005, according to the card swiping instruction received outside the virtual fence, setting the virtual card to be swiped from the virtual cards not bound to any virtual fence may specifically include the following steps b1 to b2:
[0240] Step b1, when a card swiping instruction is received and the card swiping instruction does not carry the identification information of the virtual card, a second virtual card whose corresponding card swiping point is outside the virtual fence and within the target area and is not bound to any virtual fence is set as the virtual card to be swiped.
[0241] Step b2: when a card swiping instruction is received and the card swiping instruction carries identification information of a virtual card, a first virtual card corresponding to the identification information is set as the virtual card to be swiped.
[0242] Optionally, after the mobile phone 100 exits the virtual fence, if a card swiping point instruction that does not carry the identification information of the virtual card is received outside the virtual fence, the mobile phone 100 can obtain the geographic location information of the card swiping points corresponding to each of the second virtual cards that are not bound to any virtual fence, and based on the geographic location information, determine the positional relationship between the card swiping points corresponding to each of the second virtual cards that are not bound to any virtual fence and the target area, and set the virtual card to be swiped from the second virtual card that is not bound to any virtual fence according to the positional relationship. Specifically, the mobile phone 100 can set the second virtual card that is not bound to any virtual fence and has a corresponding card swiping point outside the virtual fence and within the target area as the virtual card to be swiped.
[0243] The target area may be a circular area with the central card swiping point of the virtual fence as the center and 2R as the radius.
[0244] For example, Figure 6 Taking the virtual fence W1 in the shown scenario as an example, after the mobile phone 100 exits the virtual fence W1, if the mobile phone 100 receives a card swiping instruction that does not carry the identification information of the virtual card, since the distance between the swiping point S3 of the access card M2 and the center swiping point of the virtual fence W1 (i.e., the swiping point S1 of the transportation card J1) is greater than R and less than 2R, the mobile phone 100 can set the access card M2 as the virtual card to be swiped.
[0245] For example, Figure 8 or Fig. 9 Taking the virtual fence W2 in the shown scenario as an example, after the mobile phone 100 exits the virtual fence W2, if the mobile phone 100 receives a card swiping instruction that does not carry the identification information of the virtual card, since the distance between the swiping point S4 of the access card M3 and the center swiping point of the virtual fence W2 (i.e., the swiping point S2 of the access card 1) is greater than R and less than 2R, the mobile phone 100 can set the access card M3 as the virtual card to be swiped.
[0246] Optionally, after the mobile phone 100 exits the virtual fence, if a card swiping point instruction carrying identification information of a virtual card is received outside the virtual fence, the mobile phone 100 can directly set the first virtual card corresponding to the identification information as the virtual card to be swiped.
[0247] For example, Figure 7 Taking the virtual fence W1 in the illustrated scenario as an example, after the mobile phone 100 exits the virtual fence W1, if the mobile phone 100 receives a card swiping instruction carrying the identification information of the transportation card J1, the mobile phone 100 can set the transportation card J1 as the virtual card to be swiped.
[0248] Based on the same technical concept, an embodiment of the present application also provides an electronic device, which may include: one or more processors; one or more memories; the one or more memories store one or more computer programs, and the one or more computer programs include instructions. When the instructions are executed by the one or more processors, the electronic device executes one or more steps in any of the above method embodiments.
[0249] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer-executable program. When the computer-executable program is called by a computer, the computer executes one or more steps in any of the above method embodiments.
[0250] Based on the same technical concept, the embodiment of the present application also provides a chip system, including a processor, the processor is coupled to a memory, and the processor executes a computer executable program stored in the memory to implement one or more steps in any of the above method embodiments. The chip system can be a single chip, or a chip module composed of multiple chips.
[0251] Based on the same technical concept, an embodiment of the present application also provides a computer executable program product. When the computer executable program product runs on an electronic device, the electronic device executes one or more steps in any of the above method embodiments.
[0252] In the above embodiments, the description of each embodiment has its own emphasis. For the parts not described or recorded in detail in a certain embodiment, please refer to the relevant description of other embodiments. It should be understood that the size of the sequence number of each step in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0253] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.
[0254] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, 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, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0255] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.
Claims
1. A method for automatically switching a virtual card, characterized in that: include: When entering a virtual fence, obtaining the fence type of the virtual fence and the virtual card information bound to the virtual fence; In the case where the fence type is a geographic fence based on a first virtual card, and the virtual fence is bound to at least one first virtual card and one second virtual card, according to a card swiping instruction received in the virtual fence, a virtual card to be swiped is set from the virtual cards bound to the virtual fence; the card swiping instruction corresponding to the first virtual card carries identification information of the virtual card, and the card swiping instruction corresponding to the second virtual card does not carry identification information of the virtual card; When the fence type is a combination fence of a WIFI fence and a geographic fence based on a second virtual card, and two second virtual cards are bound to the virtual fence, a virtual card to be swiped is set from the virtual cards bound to the virtual fence according to the positional relationship between the current location and the WIFI fence; When the fence type is the combined fence and the virtual fence is bound to at least one first virtual card and two second virtual cards, according to the card swiping instruction received in the virtual fence and the positional relationship between the current location and the WIFI fence, the virtual card to be swiped is set from the virtual cards bound to the virtual fence; After exiting the virtual fence, according to the card swiping instruction received outside the virtual fence, a virtual card to be swiped is set from virtual cards not bound to any virtual fence.
2. The method for automatically switching a virtual card according to claim 1, characterized in that: The step of setting a virtual card to be swiped from virtual cards bound to the virtual fence according to a card swiping instruction received within the virtual fence includes: Setting any one of the first virtual cards bound to the virtual fence as a virtual card to be swiped; When a card swiping instruction is received and the card swiping instruction does not carry identification information of a virtual card, setting the second virtual card bound to the virtual fence as the virtual card to be swiped; When a card swiping instruction is received and the card swiping instruction carries identification information of a virtual card, the first virtual card corresponding to the identification information is set as the virtual card to be swiped.
3. The method for automatically switching virtual cards according to claim 1, characterized in that: The fence radius of the geo-fence is greater than the fence radius of the WIFI fence; and setting the virtual card to be swiped from the virtual cards bound to the virtual fence according to the positional relationship between the current location and the WIFI fence includes: When the current location is within the geographic fence and outside the WIFI fence, the second virtual card corresponding to the non-central card swiping point among the two second virtual cards bound to the virtual fence is set as the virtual card to be swiped; When the current location is within the WIFI fence, the second virtual card corresponding to the central card swiping point among the two second virtual cards bound to the virtual fence is set as the virtual card to be swiped; The central card swiping point is the card swiping point corresponding to the center of the virtual fence.
4. The method for automatically switching a virtual card according to claim 1, characterized in that: The fence radius of the geo-fence is greater than the fence radius of the WIFI fence; and setting the virtual card to be swiped from the virtual cards bound to the virtual fence according to the card swiping instruction received in the virtual fence and the positional relationship between the current location and the WIFI fence, comprises: Setting any one of the first virtual cards bound to the virtual fence as a virtual card to be swiped; When the current location is within the geographic fence and outside the WIFI fence, according to the received card swiping instruction, determine the virtual card to be swiped from at least one first virtual card bound to the virtual fence and a second virtual card corresponding to a non-central card swiping point; When the current location is within the WIFI fence, the second virtual card corresponding to the central card swiping point among the two second virtual cards bound to the virtual fence is set as the virtual card to be swiped; The central card swiping point is the card swiping point corresponding to the center of the virtual fence.
5. The method for automatically switching virtual cards according to claim 4, characterized in that: The step of determining the virtual card to be swiped from at least one first virtual card bound to the virtual fence and a second virtual card corresponding to a non-central swiping point according to the received card swiping instruction includes: When a card swiping instruction is received and the card swiping instruction does not carry identification information of the virtual card, setting the second virtual card corresponding to the non-central card swiping point as the virtual card to be swiped; When a card swiping instruction is received and the card swiping instruction carries identification information of a virtual card, the first virtual card corresponding to the identification information is set as the virtual card to be swiped.
6. The method for automatically switching virtual cards according to claim 1, characterized in that: The step of setting a virtual card to be swiped from virtual cards not bound to any virtual fence according to a card swiping instruction received outside the virtual fence includes: When a card swiping instruction is received and the card swiping instruction does not carry identification information of a virtual card, a second virtual card whose corresponding card swiping point is outside the virtual fence and within the target area and is not bound to any virtual fence is set as the virtual card to be swiped; the target area is a circular area with the central card swiping point of the virtual fence as the center and 2R as the radius, where R is the fence radius of the virtual fence; When a card swiping instruction is received and the card swiping instruction carries identification information of a virtual card, a first virtual card corresponding to the identification information is set as a virtual card to be swiped.
7. The method for automatically switching a virtual card according to any one of claims 1 to 6, characterized in that: Also includes: If the first virtual card is used for the first time to complete data interaction at the first card swiping point, and the distance between the current location and the central card swiping point of all created virtual fences is greater than 2R, then a first virtual fence with the first card swiping point as the central card swiping point and a fence type of geographic fence is created, and the first virtual card that completes data interaction at the first card swiping point is bound to the first virtual fence; R is the fence radius of the virtual fence; If the first virtual card is used for the first time to complete data interaction at the first card swiping point, and the distance between the current position and the center card swiping point of all created virtual fences is greater than R, and the distance between the current position and the center card swiping point of at least one created virtual fence is less than or equal to 2R, then a new virtual fence will not be created, and the first virtual card that completes data interaction at the first card swiping point will not be bound to any created virtual fence.
8. The method for automatically switching virtual cards according to claim 7, characterized in that: Also includes: If the second virtual card is used for the first time to complete data interaction at the second card swiping point, and the current location falls within the first virtual fence, the second virtual card that completes data interaction at the second card swiping point is bound to the first virtual fence; If the second virtual card is used for the first time to complete data interaction at the second card swiping point, and the distance between the current position and the center card swiping point of the first virtual fence is greater than R and less than or equal to 2R, a new virtual fence will not be created, and the second virtual card that completes data interaction at the second card swiping point will not be bound to the first virtual fence.
9. The method for automatically switching virtual cards according to claim 7, characterized in that: Also includes: If the second virtual card is used for the first time to complete data interaction at the second card swiping point, and the distance between the current position and the central card swiping point of the first virtual fence is less than or equal to 2R, and at least one WIFI network is searched at the second card swiping point, a second virtual fence with the second card swiping point as the central card swiping point and a fence type of a combined fence is created, and the second virtual card that completes data interaction at the second card swiping point is bound to the second virtual fence; The first virtual fence is deleted, and a virtual card whose corresponding card swiping point among the virtual cards bound to the first virtual fence falls within the second virtual fence is bound to the second virtual fence.
10. The method for automatically switching virtual cards according to claim 8, characterized in that: Also includes: If the second virtual card is used for the first time to complete data interaction at the third card swiping point, and the current location falls within the second virtual fence, and no WIFI network is searched at the third card swiping point, the second virtual card that completes data interaction at the third card swiping point is bound to the second virtual fence; If the second virtual card is used for the first time to complete data interaction at the third card swiping point, and the distance between the current position and the center card swiping point of the second virtual fence is greater than R and less than or equal to 2R, and no WIFI network is searched at the third card swiping point, a new virtual fence will not be created, and the second virtual card that completes data interaction at the third card swiping point will not be bound to the second virtual fence shown.
11. An electronic device, characterized in that: include: one or more processors; one or more memories; The one or more memories store one or more computer executable programs, and the one or more computer executable programs include instructions. When the instructions are executed by the one or more processors, the electronic device executes each step in the automatic switching method of the virtual card as described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer-executable program, and when the computer-executable program is called by a computer, the computer executes each step of the automatic switching method of a virtual card as described in any one of claims 1 to 10.
13. A chip system, characterized in that: It includes a processor, which is coupled to a memory, and the memory is used to store computer program instructions. When the processor executes the computer program instructions, the chip system implements each step in the automatic switching method of the virtual card as described in any one of claims 1-10.