Near field communication card switching method, device, storage medium and terminal
By acquiring the terminal's wireless network information to determine the near-field communication card identification, the problem of switching of the near-field communication card when the satellite positioning is inaccurate, realizing low-power consumption, accurate card switching and improving user experience.
Patent Information
- Application Number
- CN202210817817.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-07-13
AI Technical Summary
In the prior art, near-field communication cards cannot be switched accurately, especially card switching errors caused by inaccurate satellite positioning information when inside buildings, and turning on the positioning function for a long time increases terminal power consumption and security risks.
By obtaining the target wireless network information scanned by the terminal, determining the target near-field communication card identification that matches it, and controlling the terminal to switch to the corresponding card, using the wireless network information to perform accurate card switching, avoiding relying on satellite positioning.
It realizes accurate switching to the correct near-field communication card in different places, reducing power consumption and improving user experience and reducing information security risks.
Smart Images

Figure CN115022861B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer communication control technology, and in particular to a near field communication card switching method, device, storage medium, and terminal. Background Art
[0002] With the rapid development of the near-field communication technology industry, near-field communication technology has not only facilitated our lives, but also changed our lifestyles. Currently, most mobile terminals have a card function based on near-field communication, so that the near-field communication cards set in the mobile terminals can be scanned and used instead of physical cards in daily life. Among them, the access control function is the most common, which is convenient for users to use different near-field communication cards in various places. Summary of the Invention
[0003] The present application provides a near field communication card switching method, device, storage medium and terminal, which can solve the technical problem in the related art that near field communication cards cannot be accurately switched.
[0004] In a first aspect, an embodiment of the present application provides a near field communication card switching method, the method comprising:
[0005] Obtaining target wireless network information scanned by the terminal;
[0006] A target near field communication card identifier that matches the target wireless network information is determined, and the terminal is controlled to switch to a target near field communication card corresponding to the target near field communication card identifier.
[0007] In a second aspect, an embodiment of the present application provides a near field communication card switching device, the device comprising:
[0008] An information acquisition module, configured to acquire information about a target wireless network scanned by the terminal;
[0009] The card switching module is configured to determine a target near field communication card identifier that matches the target wireless network information, and control the terminal to switch to a target near field communication card corresponding to the target near field communication card identifier.
[0010] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the above method.
[0011] In a fourth aspect, an embodiment of the present application provides a terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is suitable for being loaded by the processor and executing the steps of the above-mentioned method.
[0012] The beneficial effects of the technical solutions provided by some embodiments of the present application include at least:
[0013] The present application provides a method for switching near-field communication cards. The method first obtains target wireless network information scanned by a terminal; determines a target near-field communication card identifier that matches the target wireless network information of the terminal; and controls the terminal to switch to the target near-field communication card corresponding to the target near-field communication card identifier. Since different locations require different near-field communication cards, and the wireless network information of different locations may vary, by analyzing the current wireless network information of the terminal, the different locations where the terminal is located can be determined based on the corresponding different wireless network information, and then the near-field communication card that the current terminal needs to switch to can be determined. In this way, the near-field communication card currently required by the terminal can be accurately determined, and accurate switching to the correct near-field communication card in different locations can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0015] Figure 1 An exemplary system architecture diagram of a near field communication card switching method provided in an embodiment of the present application;
[0016] Figure 2 A flowchart of a near field communication card switching method provided in an embodiment of the present application;
[0017] Figure 3 A schematic diagram of a process for obtaining wireless network information provided in an embodiment of the present application;
[0018] Figure 4 A flowchart of a near field communication card switching method provided in an embodiment of the present application;
[0019] Figure 5 A structural block diagram of a near field communication card switching device provided in an embodiment of the present application;
[0020] Figure 6 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] To make the features and advantages of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.
[0022] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0023] Near Field Communication (NFC) technology is developed based on contactless radio frequency identification (RFID) technology and combined with wireless interconnection technology, providing a very safe and fast communication method for various device terminals. Near field communication services combine near field communication technology and mobile communication technology to realize multiple functions such as electronic payment, identity authentication, and data exchange, so that users' daily life behaviors can gradually move from physical operations to electronic operations. With the continuous development of near field communication technology, most mobile terminals now have the function of simulating near field communication cards based on near field communication technology. Near field communication cards can directly generate signal exchanges with NFC communication devices, so that near field communication cards can be scanned and used instead of physical cards. Among them, access control functions with various card scanning requirements are more common. In order to facilitate users to use different near field communication cards in various different places, mobile terminals are usually set to automatically switch cards based on location information.
[0024] When users use the near-field communication card function, they will use different near-field communication cards in a variety of different locations. Therefore, when using the automatic card switching function to assist users in selecting the corresponding correct card in each location, the current location of the terminal is usually determined based on the geographical location characteristics of each location and the current location information of the terminal is obtained based on satellite positioning to determine the current location of the terminal, and then the terminal switches to the near-field communication card corresponding to the location.
[0025] For users, some places where near-field communication cards are used, such as company access control, door unlocking, subway platforms, etc., are all inside buildings, and the satellite positioning information when the terminal is inside the building may be inaccurate. Therefore, when the current satellite positioning information of the terminal is used as the basis for judging whether to switch to the near-field communication card, it may not be possible to switch to the correct near-field communication card; and if the positioning information is used to assist in switching the near-field communication card, then in order for the user to be able to use this function at any time, it is necessary to always keep the satellite positioning function turned on and the permission for the satellite positioning function open, which increases a lot of power consumption and information security risks for the terminal, greatly affecting the user experience.
[0026] Therefore, an embodiment of the present application provides a near-field communication card switching method, which obtains the target wireless network information scanned by the terminal; determines the target near-field communication card identifier that matches the target wireless network information, and then switches to the target near-field communication card corresponding to the target near-field communication card identifier, so as to solve the technical problem that the above-mentioned near-field communication card cannot be accurately switched.
[0027] See also Figure 1 , Figure 1 This is an exemplary system architecture diagram of a near field communication card switching method provided in an embodiment of the present application.
[0028] like Figure 1 As shown, the system architecture may include a terminal 101, a network 102, a server 103, an NFC communication 104, and an NFC communication device 105. The network 102 is used to provide a medium for a communication link between the terminal 101 and the server 103. The network 102 may include various types of wired communication links or wireless communication links, for example, a wired communication link may include an optical fiber, a twisted pair, or a coaxial cable, and a wireless communication link may include a Bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, or a microwave communication link.
[0029] The terminal 101 can interact with the server 103 through the network 102 to receive messages from the server 103 or send messages to the server 103, or the terminal 101 can interact with the server 103 through the network 102 to receive messages or data sent by other users to the server 103. The terminal 101 can be hardware or software. When the terminal 101 is hardware, it can be various terminals, including but not limited to smart watches, smart phones, tablet computers, laptop portable computers and desktop computers. When the terminal 101 is software, it can be installed in the terminals listed above, which can be implemented as multiple software or software modules (for example: for providing distributed services), or it can be implemented as a single software or software module, which is not specifically limited here.
[0030] The server 103 may be a business server that provides various services. It should be noted that the server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or it may be implemented as a single server. When the server 103 is software, it may be implemented as multiple software or software modules (for example, for providing distributed services), or it may be implemented as a single software or software module, which is not specifically limited herein.
[0031] NFC communication 104 is a near-field communication network used to enable devices using NFC technology (such as terminals) to exchange data when they are close to each other. NFC communication device 105 can communicate with terminal 101 through NFC communication 104 to achieve information interaction and data transmission with terminal 101. NFC communication device 105 can be a device capable of NFC communication, including but not limited to access control equipment, ticket checking machines, etc.
[0032] The terminal 101 includes a wireless network scanning device, and the terminal 101 can use the wireless network scanning device to scan the wireless networks existing in the current place. After scanning the wireless network, the terminal 101 can first obtain the current target wireless network information, and then the terminal 101 determines the target near-field communication card identifier that matches the target wireless network information, and switches to the target near-field communication card corresponding to the target near-field communication card identifier; after the terminal 101 switches to the target near-field communication card, the target near-field communication card in the terminal 101 can be placed close to the NFC communication device 105, so that the NFC communication device 105 communicates and interacts with the terminal 101 through NFC communication 104, and finally realizes the scanning and identification of the target near-field communication card.
[0033] It should be understood that Figure 1 The number of terminals, networks, servers, NFC communications, and NFC communication devices in the description is only illustrative, and any number of terminals, networks, servers, NFC communications, and NFC communication devices may be used according to implementation requirements.
[0034] See also Figure 2 , Figure 2 This is a flowchart of a near-field communication card switching method provided in an embodiment of the present application. The execution subject of this embodiment of the present application can be a terminal executing the near-field communication card switching, a processor within the terminal executing the near-field communication card switching method, or a near-field communication card switching service within the terminal executing the near-field communication card switching method. For ease of description, the specific execution process of the near-field communication card switching method is described below, using the processor within the terminal as an example.
[0035] like Figure 2As shown, the near field communication card switching method may at least include:
[0036] S201: Acquire target wireless network information scanned by a terminal.
[0037] Optionally, when determining the terminal's current location and the NFC card to be switched based on positioning information, the environment of the location may interfere with the satellite positioning effect. For example, building obstructions, weak satellite signals, and cluttered surrounding signal fields may result in inaccurate positioning information, which in turn prevents the terminal from accurately selecting the NFC card. Furthermore, the long-term activation of the positioning function also increases the terminal's power consumption. Therefore, in order to accurately switch the terminal to the NFC card corresponding to each location, considering that users are usually in different locations when using different NFC cards, the terminal's current location and the NFC card to be used can be analyzed based on the characteristics and differences of each location that is not interfered with by the environment, thereby achieving accurate NFC card switching.
[0038] Optionally, the rapid development of wireless network communication technology has made the transmission of data no longer restricted by wiring. After the wireless network equipment is connected to the network, it provides a large number of devices with convenient access to the Internet, and also enables fast data transmission between various devices. In addition, wireless networks have different distinguishing characteristics due to their uses, installation settings, configurations, etc., that is, each wireless network can be distinguished based on wireless network information. Then, with the popularization of wireless networks, various types of wireless networks will also exist around the locations where near-field communication cards are used. Based on this, when the terminal needs to use an automatic switching near-field communication card, it can determine the current location of the terminal based on the wireless network information of the wireless network in the current location, and then switch the near-field communication card to be used according to the current location of the terminal. Compared with positioning information, wireless network information is less restricted by environmental interference, and the correct near-field communication card can be selected more accurately.
[0039] Furthermore, it is easy to understand that the terminal is pre-set with the near-field communication card switching function in the embodiment of the present application. Then, when the user needs to use the function of automatically switching the corresponding near-field communication card based on the wireless network information in the terminal, the near-field communication card switching function can be turned on in the corresponding setting interface, so that the terminal can automatically execute the near-field communication card switching method when the user needs to obtain the service of auxiliary switching card. Specifically, if the user has not set up the function in advance, the user can be prompted and guided to set up and turn on the operation in the display interface. In addition, when the user enters the service page of the near-field communication card switching function, it means that the user currently has the need to use the near-field communication card switching function. At this time, the terminal can execute the near-field communication card switching method, that is, execute the acquisition of the target wireless network information scanned by the terminal and subsequent operations.
[0040] Optionally, in order to analyze the near-field communication card that the terminal needs to switch to based on the wireless network information in the current location of the terminal, it is first necessary to obtain the target wireless network information scanned by the terminal. After accessing the network, each wireless network device will continuously broadcast a signal including its own wireless network information, so that the terminal can receive the broadcast signal after turning on the wireless network function, so that the terminal can join the corresponding wireless network and connect to the Internet based on the broadcast signal. Therefore, after obtaining the wireless network function, the broadcast signal emitted by the surrounding wireless network devices can be scanned, and the wireless network information corresponding to each wireless network can be obtained as the target wireless network information based on the received broadcast signal. The broadcast signal of the wireless network is not restricted by the environment, and the short-range signal is more stable and accurate than the satellite signal, which means that the card can be accurately switched in the future. At the same time, the power consumption required to receive the broadcast signal of the wireless network is relatively small, which can save the power consumption of the terminal and improve the user experience.
[0041] For example, see Figure 3 , Figure 3 A schematic diagram of a process for obtaining wireless network information provided in an embodiment of the present application. Figure 3 As shown, Figure 3 The figure includes an overhead view 300 of a place where a near-field communication card is applicable. The overhead view 300 includes a target room and other rooms, the shaded portion is the wall between different rooms, the target NFC communication device 310 and the terminal 320 in the target room, wherein the terminal 320 is close to the target NFC communication device 310 in the target room. At this time, the terminal 320 starts to scan the surrounding wireless networks 330, and obtains the current target wireless network information of the terminal 320 through the received broadcast signals of each wireless network 330.
[0042] S202: Determine a target near field communication card identifier that matches the target wireless network information, and control the terminal to switch to a target near field communication card corresponding to the target near field communication card identifier.
[0043] Optionally, according to the introduction of the above embodiments, it can be known that different near-field communication cards are used in different places, and when the terminal is in different places, it can obtain wireless network information corresponding to different wireless networks in each place. Therefore, each near-field communication card can be matched with the wireless network information existing at the location of each near-field communication card. Then, after obtaining the target wireless network information, by analyzing the target wireless network information, the target near-field communication card identifier that matches the target wireless network information can be determined.
[0044] Optionally, after determining the target near-field communication card identifier, it indicates that the terminal's current location requires the use of the target near-field communication card. At this time, in order to facilitate the user to directly use the target near-field communication card, the terminal can determine the target near-field communication card's attributes, data, characteristics and other card information based on the target near-field communication card identifier, and simulate the target near-field communication card based on the card information of the target near-field communication card, that is, control the terminal to switch to the target near-field communication card corresponding to the target near-field communication card identifier to achieve the effect of automatic card switching. After the card switching is completed, the user can directly place the terminal in the scanning area specified by the NFC communication device to complete the near-field communication card scan and obtain the corresponding service. The target wireless network information scanned by the terminal is used to determine the target near-field communication card to be switched. The card switching can be performed with low power consumption and accuracy, efficiently meeting user usage needs.
[0045] In an embodiment of the present application, a method for switching near-field communication cards is provided. The method first obtains target wireless network information scanned by a terminal; determines a target near-field communication card identifier that matches the target wireless network information of the terminal; and controls the terminal to switch to the target near-field communication card corresponding to the target near-field communication card identifier. Because different locations require different near-field communication cards, and the wireless network information of different locations may vary, by analyzing the current wireless network information of the terminal, the different locations where the terminal is located can be determined based on the corresponding different wireless network information, and then the near-field communication card to which the current terminal needs to switch can be determined. In this way, the near-field communication card currently required by the terminal can be accurately determined, and accurate switching to the correct near-field communication card in different locations can be achieved.
[0046] See also Figure 4 , Figure 4 A flowchart of a near field communication card switching method provided in an embodiment of the present application.
[0047] like Figure 4 As shown, the near field communication card switching method may at least include:
[0048] S401: Acquire target wireless network information scanned by the terminal.
[0049] Regarding step S401 , please refer to the detailed description in step S201 , which will not be repeated here.
[0050] S402: Acquire a pre-stored correspondence between networks and identifiers, and determine a target near-field communication card identifier that matches target wireless network information based on the correspondence between networks and identifiers.
[0051] Optionally, there are usually multiple different wireless networks around the locations of different places, and there is wireless network information that can characterize the uniqueness of each wireless network, that is, each wireless network information can distinguish each wireless network, and then the wireless network information in each place environment can also distinguish each place. When different near-field communication cards are used in different places, the wireless network information of each place is bound to the near-field communication card, so that the corresponding near-field communication cards can be distinguished based on different wireless network information. Therefore, when judging the near-field communication card that the terminal needs to switch, in order to determine the matching target near-field communication card identifier based on the target wireless network information scanned by the terminal, the network and identifier correspondence can be pre-stored first, and the target near-field communication card identifier matching the target wireless network information can be determined according to the network and identifier correspondence.
[0052] Optionally, when the user uses the near-field communication function of the terminal, it is necessary to pre-set various attribute information of the near-field communication card in the terminal, including the activation conditions of the near-field communication card. Then, when the user sets the sample near-field communication cards to be used, the broadcast signal of the sample wireless network in the place where the currently set sample near-field communication card is located can be scanned, and the sample wireless network information of the sample wireless network can be collected based on the scanned broadcast signal, and the sample wireless network information corresponding to each sample near-field communication card can be pre-stored in the form of a corresponding relationship. Therefore, the network and identifier correspondence includes at least one sample wireless network information, at least one sample near-field communication card identifier, and the correspondence between each sample wireless network information and each sample near-field communication card identifier.
[0053] Optionally, when determining the target near-field communication card that the terminal currently needs to switch to, the target wireless network information scanned by the terminal is first obtained. Then, when determining the target near-field communication card identifier that matches the target wireless network information based on the network-identifier correspondence, the target wireless network information is matched with each sample wireless network information in the network-identifier correspondence, and the successfully matched target sample wireless network information is found. This indicates that the current terminal is located in the location area where the target sample wireless network information is located, that is, the near-field communication card that the terminal needs to switch to at this time is the target sample near-field communication card corresponding to the target sample wireless network information. Then, according to the correspondence between each sample wireless network information and each sample near-field communication card identifier included in the network-identifier correspondence, the target sample near-field communication card identifier corresponding to the target sample wireless network information is determined. The target sample near-field communication card identifier can be used as the target near-field communication card identifier that matches the target wireless network information scanned by the terminal.
[0054] Furthermore, the wireless network parameters in the wireless network information are used to record detailed data such as the identification, characteristics, and attributes of the wireless network. In various places where near-field communication cards are used, there may be multiple wireless networks in the surrounding area. Therefore, each sample wireless network information includes sample wireless network parameters of at least one sample wireless network, and the target wireless network information includes target wireless network parameters of at least one target wireless network. Then, the target wireless network parameters included in the target wireless network information can be matched with the sample wireless network parameters included in each sample wireless network information. Based on the matching results between the wireless network parameters, the sample wireless network information that matches the target wireless network information is determined. That is, if at least one target sample wireless network parameter among each sample wireless network parameter successfully matches at least one target wireless network parameter, the sample wireless network information corresponding to the target sample wireless network parameter is determined as the target sample wireless network information that matches the target wireless network information.
[0055] Optionally, when matching each target wireless network parameter with each sample wireless network parameter, considering that the corresponding scanning devices of the two near-field communication cards in the terminal are close, it is possible that both sample wireless network information contain target sample wireless network parameters that match the target wireless network parameters. At this time, it can be determined that the sample wireless network information with the largest number of target sample wireless network parameters is the target sample wireless network information matched by the target wireless network information.
[0056] Specifically, when setting the sample wireless network information corresponding to the sample near-field communication card, it is necessary to scan the wireless networks around the current location of the terminal. The closer the distance between the wireless network device and the terminal, the stronger the wireless network signal, and the more accurate and representative its wireless network parameters are. In order to select a more accurate and more characteristic wireless network as a sample wireless network, a wireless network with a signal strength greater than a preset signal strength threshold can be selected as a sample wireless network, and when obtaining the terminal's current target wireless network signal, a wireless network with a signal strength greater than a preset signal strength threshold can be selected as the target wireless network.
[0057] Optionally, the wireless network device Media Access Control (MAC) address of each wireless network, i.e., the MAC address is unique and can uniquely identify the wireless network; the name and signal configuration parameters of each wireless network are engraved with user-defined settings and are unlikely to be repeated, thereby also identifying the wireless network. In this embodiment of the present application, the wireless network parameters include at least one of the wireless network device Media Access Control (MAC) address, the wireless network name, and the wireless network signal configuration parameters.
[0058] For example, when the wireless network parameter is a media access control (MAC) address of a wireless network device, when setting up near-field communication card A, wireless network information a corresponding to near-field communication card A is obtained and stored. Wireless network information a includes the MAC addresses 1, 2, and 3 of the wireless networks in the use environment of near-field communication card A. When setting up near-field communication card B, wireless network information b corresponding to near-field communication card B is obtained and stored. Wireless network information b includes the MAC addresses 4, 5, and 6 of the wireless networks in the use environment of near-field communication card B. When setting up near-field communication card C, wireless network information c corresponding to near-field communication card C is obtained and stored. Wireless network information c includes the MAC addresses 7, 8, and 9 of the wireless networks in the use environment of near-field communication card A. When the terminal needs to switch near-field communication cards, the target wireless network information obtained by the terminal scans contains MAC address 3. At this time, the target wireless network information successfully matches the wireless network information a, and the target near-field communication card is determined to be near-field communication card A. At this time, the terminal directly switches to near-field communication card A and provides it to the user for direct use.
[0059] Optionally, to further improve the accuracy of NFC card switching, the sample wireless network parameters included in each sample wireless network information can be made distinct. When adding a new NFC card, wireless network information, and the correspondence between the NFC card and wireless network information, if the current wireless network parameters overlap with existing wireless network parameters, a prompt message can be issued to inform the user of the situation and guide the user to modify or delete the current wireless network parameters and / or existing wireless network parameters, thereby ensuring the uniqueness of the sample wireless network parameters included in each sample wireless network information. This can avoid confusion between wireless network information corresponding to different NFC cards, ensure the unique correspondence between the NFC card and the wireless network information, and improve the accuracy of NFC card switching.
[0060] S403: Control the terminal to switch to the target near-field communication card corresponding to the target near-field communication card identifier.
[0061] Optionally, according to the introduction of the above embodiment, it can be known that after determining the target near-field communication card identifier, it means that the terminal's current location requires the use of the target near-field communication card. At this time, in order to facilitate the user to directly use the target near-field communication card, the terminal can be controlled to switch to the target near-field communication card corresponding to the target near-field communication card identifier to achieve the effect of automatic card switching. After the card switching is completed, the user can directly place the terminal in the scanning area specified by the scanning device, complete the near-field communication card scan and obtain the corresponding service, and use the target wireless network information scanned by the terminal to determine the target near-field communication card to be switched. The card switching can be performed with low power consumption and accuracy, and the user's usage needs can be efficiently met.
[0062] In an embodiment of the present application, a near-field communication card switching method is provided. When a sample near-field communication card is set in a terminal, sample wireless network information around the place where each sample near-field communication card is used is obtained in advance, and each sample near-field communication card is matched with each sample wireless network information; when the terminal needs to switch the target near-field communication card, the sample wireless network information is matched with the target wireless network information based on the correspondence between the network and the identifier, and the target sample near-field communication card identifier corresponding to the target sample wireless network information is determined as the target near-field communication card identifier corresponding to the target wireless network information, so that the terminal can more accurately determine the currently required near-field communication card based on the wireless network information in the current environment, thereby improving the accuracy of near-field communication card-assisted switching.
[0063] See also Figure 5 , Figure 5 This is a structural block diagram of a near field communication card switching device provided in an embodiment of the present application. Figure 5 As shown, the near field communication card switching device 500 includes:
[0064] The information acquisition module 510 is used to obtain the target wireless network information scanned by the terminal;
[0065] The card switching module 520 is configured to determine a target NFC card identifier that matches the target wireless network information, and control the terminal to switch to the target NFC card corresponding to the target NFC card identifier.
[0066] Optionally, the card switching module 520 is further used to obtain a pre-stored network-identifier correspondence, and determine a target near-field communication card identifier that matches the target wireless network information based on the network-identifier correspondence; wherein the network-identifier correspondence includes at least one sample wireless network information, at least one sample near-field communication card identifier, and a correspondence between each sample wireless network information and each sample near-field communication card identifier.
[0067] Optionally, the card switching module 520 is further used to search for target sample wireless network information that matches the target wireless network information in each sample wireless network information included in the network-identifier correspondence relationship; determine the target sample near-field communication card identifier corresponding to the target sample wireless network information based on the correspondence between each sample wireless network information and each sample near-field communication card identifier included in the network-identifier correspondence relationship; and use the target sample near-field communication card identifier as the target near-field communication card identifier that matches the target wireless network information.
[0068] Optionally, each sample wireless network information includes at least one sample wireless network parameter, and the target wireless network information includes at least one target wireless network parameter. The card switching module 520 is also used to match each target wireless network parameter included in the target wireless network information with each sample wireless network parameter included in each sample wireless network information; if there is at least one target sample wireless network parameter among each sample wireless network parameter that successfully matches at least one target wireless network parameter, the sample wireless network information corresponding to the target sample wireless network parameter is determined as the target sample wireless network information that matches the target wireless network information.
[0069] Optionally, the sample wireless network parameters are parameters of a sample wireless network whose signal strength is greater than a preset signal strength threshold; the target wireless network parameters are parameters of a target wireless network whose signal strength is greater than a preset signal strength threshold.
[0070] Optionally, the wireless network parameters include at least one of a wireless network device Media Access Control (MAC) address, a wireless network name, and wireless network signal configuration parameters.
[0071] Optionally, the sample wireless network parameters included in each sample wireless network information are different from each other.
[0072] In an embodiment of the present application, a near-field communication card switching device is provided, wherein an information acquisition module is used to obtain target wireless network information scanned by a terminal; and a card switching module is used to determine a target near-field communication card identifier that matches the target wireless network information of the terminal, and control the terminal to switch to the target near-field communication card corresponding to the target near-field communication card identifier. Because different locations require different near-field communication cards, and the wireless network information of different locations may vary, by analyzing the current wireless network information of the terminal, the different locations where the terminal is located can be determined based on the corresponding different wireless network information, and then the near-field communication card to which the current terminal needs to switch can be determined. In this way, the near-field communication card currently required by the terminal can be accurately determined, and accurate switching to the correct near-field communication card in different locations can be achieved.
[0073] An embodiment of the present application further provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the steps of any method in the above embodiments.
[0074] See Figure 6 , Figure 6 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present application. Figure 6 As shown, the terminal 600 may include: at least one terminal processor 601 , at least one network interface 604 , a user interface 603 , a memory 605 , and at least one communication bus 602 .
[0075] The communication bus 602 is used to implement the connection and communication between these components.
[0076] The user interface 603 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 603 may also include a standard wired interface and a wireless interface.
[0077] The network interface 604 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0078] The terminal processor 601 may include one or more processing cores. The terminal processor 601 utilizes various interfaces and circuits to connect various components within the entire terminal 600. It executes instructions, programs, code sets, or instruction sets stored in the memory 605, and accesses data stored in the memory 605 to perform various functions and process data for the terminal 600. Optionally, the terminal processor 601 may be implemented using at least one hardware form factor selected from the group consisting of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The terminal processor 601 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content displayed on the display screen; and the modem handles wireless communications. It is understood that the modem may not be integrated into the terminal processor 601 and may be implemented as a separate chip.
[0079] Among them, the memory 605 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 605 includes a non-transitory computer-readable storage medium. The memory 605 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 605 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 605 may also be optionally at least one storage device located away from the aforementioned terminal processor 601. As Figure 6 As shown, the memory 605 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a near field communication card switching program.
[0080] exist Figure 6 In the terminal 600 shown, the user interface 603 is mainly used to provide an input interface for the user and obtain user input data; and the terminal processor 601 can be used to call the near field communication card switching program stored in the memory 605 and perform the following operations:
[0081] Obtain the target wireless network information scanned by the terminal;
[0082] A target near field communication card identifier that matches the target wireless network information is determined, and the terminal is controlled to switch to the target near field communication card corresponding to the target near field communication card identifier.
[0083] In some embodiments, when the terminal processor 601 determines the target near-field communication card identifier that matches the target wireless network information, it specifically performs the following steps: obtaining a pre-stored network-identifier correspondence, and determining the target near-field communication card identifier that matches the target wireless network information based on the network-identifier correspondence; wherein the network-identifier correspondence includes at least one sample wireless network information, at least one sample near-field communication card identifier, and the correspondence between each sample wireless network information and each sample near-field communication card identifier.
[0084] In some embodiments, when the terminal processor 601 determines the target near-field communication card identifier that matches the target wireless network information based on the correspondence between the network and the identifier, it specifically performs the following steps: searching for the target sample wireless network information that matches the target wireless network information among the sample wireless network information included in the correspondence between the network and the identifier; determining the target sample near-field communication card identifier corresponding to the target sample wireless network information based on the correspondence between the sample wireless network information and the sample near-field communication card identifier included in the correspondence between the network and the identifier; and using the target sample near-field communication card identifier as the target near-field communication card identifier that matches the target wireless network information.
[0085] In some embodiments, each sample wireless network information includes at least one sample wireless network parameter, and the target wireless network information includes at least one target wireless network parameter. When the terminal processor 601 searches for target sample wireless network information that matches the target wireless network information, it specifically performs the following steps: matching each target wireless network parameter included in the target wireless network information with each sample wireless network parameter included in each sample wireless network information; if at least one target sample wireless network parameter among each sample wireless network parameter successfully matches at least one target wireless network parameter, the sample wireless network information corresponding to the target sample wireless network parameter is determined as the target sample wireless network information that matches the target wireless network information.
[0086] In some embodiments, the sample wireless network parameters are parameters of the sample wireless network whose signal strength is greater than a preset signal strength threshold; the target wireless network parameters are parameters of the target wireless network whose signal strength is greater than a preset signal strength threshold.
[0087] In some embodiments, the wireless network parameters include at least one of a wireless network device Media Access Control (MAC) address, a wireless network name, and wireless network signal configuration parameters.
[0088] In some embodiments, the sample wireless network parameters included in each sample wireless network information are different from each other.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0090] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of these modules may be selected to achieve the purpose of this embodiment based on actual needs.
[0091] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The above-mentioned computer program product includes one or more computer instructions. When the above-mentioned computer program instructions are loaded and executed on a computer, the above-mentioned process or function according to the embodiment of this specification is generated in whole or in part. The above-mentioned computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above-mentioned computer instructions can be stored in a computer-readable storage medium or transmitted by the above-mentioned computer-readable storage medium. The above-mentioned computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The above-mentioned computer-readable storage medium can 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 integrations. The above-mentioned available media can be magnetic media (for example, floppy disks, hard disks, tapes), optical media (for example, digital versatile discs (DVDs)), or semiconductor media (for example, solid state disks (SSDs)).
[0092] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0093] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0094] The above is a description of a near-field communication card switching method, device, storage medium, and terminal provided in this application. For those skilled in the art, based on the ideas of the embodiments of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A near field communication card switching method, characterized in that: Applied to a terminal, the method includes: Acquire broadcast signals scanned by the terminal and emitted by surrounding wireless network devices, and acquire wireless network information corresponding to each wireless network as target wireless network information based on the received broadcast signals; determining a target near field communication card identifier that matches the target wireless network information, and controlling the terminal to switch to a target near field communication card corresponding to the target near field communication card identifier; The determining of a target near-field communication card identifier that matches the target wireless network information includes: Obtaining a pre-stored correspondence between networks and identifiers, wherein the correspondence between networks and identifiers includes at least one sample wireless network information, at least one sample near-field communication card identifier, and a correspondence between each sample wireless network information and each sample near-field communication card identifier; each sample wireless network information includes at least one sample wireless network parameter, and the target wireless network information includes at least one target wireless network parameter; Based on the correspondence between the network and the identifier, determining the target sample wireless network information corresponding to the target wireless network information, and using the target sample near-field communication card identifier corresponding to the target sample wireless network information as the target near-field communication card identifier that matches the target wireless network information; The target sample wireless network is a sample wireless network having the largest number of target sample wireless network parameters that successfully match the target wireless network parameters.
2. The method according to claim 1, characterized in that The step of using the target sample near-field communication card identifier corresponding to the target sample wireless network information as the target near-field communication card identifier that matches the target wireless network information includes: Determining the target sample near-field communication card identifier corresponding to the target sample wireless network information according to the correspondence between each sample wireless network information and each sample near-field communication card identifier included in the network-identifier correspondence; The target sample near-field communication card identifier is used as a target near-field communication card identifier that matches the target wireless network information.
3. The method according to claim 2, characterized in that The determining target sample wireless network information corresponding to the target wireless network information includes: matching each target wireless network parameter included in the target wireless network information with each sample wireless network parameter included in each sample wireless network information; If at least one target sample wireless network parameter among the sample wireless network parameters successfully matches at least one target wireless network parameter, the sample wireless network information corresponding to the target sample wireless network parameter is determined as the target sample wireless network information matching the target wireless network information.
4. The method according to claim 3, characterized in that The sample wireless network parameters are parameters of the sample wireless networks whose signal strength is greater than a preset signal strength threshold; The target wireless network parameter is a parameter of a target wireless network whose signal strength is greater than the preset signal strength threshold.
5. The method according to claim 4, characterized in that The wireless network parameters include at least one of a wireless network device Media Access Control (MAC) address, a wireless network name, and wireless network signal configuration parameters.
6. The method according to claim 5, characterized in that The sample wireless network parameters included in each sample wireless network information are different from each other.
7. A near field communication card switching device, characterized in that: Applied to a terminal, the device includes: an information acquisition module, configured to acquire broadcast signals scanned by the terminal and emitted by surrounding wireless network devices, and acquire wireless network information corresponding to each wireless network as target wireless network information based on the received broadcast signals; a card switching module, configured to determine a target near-field communication card identifier that matches the target wireless network information, and control the terminal to switch to a target near-field communication card corresponding to the target near-field communication card identifier; The card switching module is further used to obtain a pre-stored network and identifier correspondence, wherein the network and identifier correspondence includes at least one sample wireless network information, at least one sample near-field communication card identifier, and a correspondence between each sample wireless network information and each sample near-field communication card identifier; each sample wireless network information includes at least one sample wireless network parameter, and the target wireless network information includes at least one target wireless network parameter; based on the network and identifier correspondence, the target sample wireless network information corresponding to the target wireless network information is determined, and the target sample near-field communication card identifier corresponding to the target sample wireless network information is used as the target near-field communication card identifier that matches the target wireless network information; the target sample wireless network is the sample wireless network with the largest number of target sample wireless network parameters that successfully match the target wireless network parameters.
8. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 6.
9. A terminal, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the program.
Citation Information
Patent Citations
Wearable device, and method and system for obtaining attribute information of wireless network
CN105101062A
Analog card switching method and device, computer readable medium and mobile terminal
CN111770484A
Method and device for selecting multiple NFC cards, electronic equipment and storage medium
CN113163326A