NFC tag verification method and related equipment

By first performing local verification during NFC tag verification and starting the application service after passing it, and then performing cloud verification, the problem of incorrect startup caused by expiration or tampering of NFC tag information is solved, and fast and accurate application service startup is achieved.

CN114640976BActive Publication Date: 2024-09-24HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011384278.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2024-09-24
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

When using an NFC tag to start an application, there may be issues with the tag information being expired or tampered with, causing the application to start incorrectly and lacking an effective verification mechanism.

Method used

After the local verification passes, the application service is started first, and then the cloud verification is performed to ensure the accuracy of the verification results, and the application service is stopped when the cloud verification fails.

Benefits of technology

It speeds up the startup process of application services, and ensures the accuracy of verification results through local and cloud collaborative verification, avoiding incorrect startup problems caused by expiration or tampering of label information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114640976B
    Figure CN114640976B
Patent Text Reader

Abstract

The present application relates to the field of electronic technology, and in particular to a verification method and related equipment for NFC tags. The method is applied to a first electronic device, and includes: detecting the NFC tag information of a second electronic device; verifying the NFC tag information according to a first verification list stored locally to obtain a first verification result; if the first verification result is a successful verification, starting an application service associated with the NFC tag information; sending the NFC tag information to a cloud server; receiving a second verification result obtained by the cloud server for verifying the NFC tag information; if the second verification result is a verification failure, stopping the application service. When verifying the NFC tag, the embodiment of the present application first starts the application service after the local verification passes, and then performs the cloud verification, so that the startup of the application service can be accelerated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to a verification method and related equipment for a near field communication (NFC) tag. Background Art

[0002] NFC technology is safe, fast and anti-interference, and is widely used in various electronic devices. Based on NFC technology, the communication distance between devices is usually less than 10 cm, and the time to establish a connection can be less than 0.1 second, which can avoid signal interference from other devices.

[0003] Combined with the above characteristics, NFC technology can be applied in various near-field business scenarios. For example, in a one-touch transmission scenario, you can use your mobile phone to touch the NFC tag of other devices. The NFC module in the mobile phone reads the NFC tag information in the process of touching the NFC tag of other devices. The mobile phone can start related applications based on the NFC tag information to achieve linkage with other devices. For example, by touching the NFC tag of other devices, you can achieve one-touch screen projection, one-touch audio transmission, one-touch dial transmission, one-touch network connection, one-touch video continuation, one-touch printing, etc.

[0004] Although applications can be started based on NFC technology, in actual business, there may be problems such as NFC tag information being expired or tampered with, resulting in the application being started by mistake. Therefore, when starting an application through NFC tag information, how to verify the NFC tag information becomes a problem that needs to be solved. Summary of the invention

[0005] The embodiment of the present application provides a verification method and related equipment for an NFC tag. After the local verification is passed, the application service is started and run first, and then the cloud verification is performed, which can speed up the startup of the application service.

[0006] In the first aspect, the embodiment of the present application provides a verification method for an NFC tag, which is applied to a first electronic device, including: detecting the NFC tag information of a second electronic device; verifying the NFC tag information according to a first verification list stored locally to obtain a first verification result; if the first verification result is a successful verification, then starting and running the application service associated with the NFC tag information. If the first verification result is a failed verification, then the application service associated with the NFC tag information is not started. Afterwards, regardless of whether the first verification result is a successful verification or a failed verification, the NFC tag information is sent to a cloud server, so that the cloud server verifies the NFC tag information, and receives a second verification result obtained by the cloud server verifying the NFC tag information. Among them, if the first verification result is a successful verification and the corresponding application service is started, when the second verification result is a successful verification, the corresponding application service continues to run. If the first verification result is a successful verification and the corresponding application service is started, but the second verification result is a failed verification, then the application service is stopped. It can be seen that the embodiment of the present application starts and runs the application service first after the local verification is passed, and then performs the cloud verification, which can speed up the startup of the application service. In addition, the embodiment of the present application can ensure the accuracy of the verification results by coordinating local and cloud verification.

[0007] In combination with the first aspect, in some implementations of the first aspect, the way in which the first electronic device obtains the NFC tag information of the second electronic device may include: in response to an operation of approaching or contacting the NFC tag of the second electronic device, reading the NFC tag information stored in the NFC tag.

[0008] In combination with the first aspect, in some implementations of the first aspect, the first electronic device verifies the NFC tag information according to a first verification list stored locally to obtain a first verification result, including: the first electronic device locally stores a first verification list. The first electronic device determines, according to the NFC tag information, whether the first verification list includes first verification information for verifying the acquired NFC tag information; if the first verification list includes the first verification information, the first electronic device verifies the NFC tag according to the first verification information to obtain the first verification result.

[0009] In combination with the first aspect, in some implementations of the first aspect, the method further includes: if the first verification list does not include the first verification information, it can be determined that the first verification result is a verification failure. When the first verification result is a verification failure, the first electronic device does not start the application service corresponding to the NFC tag information, and sends the NFC tag information to the cloud server, so that the cloud server verifies the NFC tag information.

[0010] In combination with the first aspect, in some implementations of the first aspect, the method further includes: if the first verification list includes the first verification information and the verification of the NFC tag information fails according to the first verification information, determining that the first verification result is a verification failure. Similarly, when the verification of the NFC tag information fails according to the first verification information, the first electronic device does not start the application service corresponding to the NFC tag information, and sends the NFC tag information to the cloud server so that the cloud server verifies the NFC tag information.

[0011] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: if the first verification result is a verification failure, the application service associated with the NFC tag information is not started; when the NFC tag information is sent to a cloud server and the second verification result obtained from the cloud server is a verification success, the first electronic device starts the application service associated with the NFC tag information.

[0012] In combination with the first aspect, in some implementations of the first aspect, when the first electronic device needs to send the NFC tag information to the cloud server, if the first electronic device determines that the connection with the cloud server fails, the first electronic device sends a first message to the third electronic device in a short-distance communication manner, wherein the first message includes the NFC tag information, and the third electronic device is a device that establishes a connection with the cloud server. Optionally, the failure of the first electronic device to connect to the cloud server may be the failure of the first electronic device to connect to the cloud server in an Internet manner. The above-mentioned short-distance communication manner may be an NFC communication manner, a Bluetooth communication manner, or other possible short-distance communication manners. That is, when the first electronic device fails to connect to the cloud server in an Internet manner, the first electronic device sends the NFC tag information to the third electronic device in a short-distance communication manner, so that the third electronic device uploads the NFC tag information to the cloud server. The third electronic device further obtains a second verification result from the cloud server. The third electronic device then sends the second verification result to the first electronic device in a short-distance communication manner. That is, the first electronic device can implement cloud verification with the assistance of the third electronic device.

[0013] In combination with the first aspect, in some implementations of the first aspect, before sending the first message to the third electronic device in a short-distance communication manner, the method further includes: determining a trusted device set, the trusted device set including multiple electronic devices connected to the cloud server; sending a second message for requesting resource occupation information to each electronic device in the trusted device set; receiving a third message sent by each electronic device according to the second message, the third message including resource occupation information; and determining the third electronic device from each electronic device according to the resource occupation information received from each electronic device. Optionally, the first electronic device may pre-store a trusted device set. For example, the first electronic device may determine the electronic devices under the same user account as a trusted device set. In some embodiments, the first electronic device may also obtain a trusted device set by searching. For example, the first electronic device searches for Bluetooth devices and determines a trusted device set based on the search results. Of course, the way in which the first electronic device obtains the trusted device set may also be other possible implementations, which are not listed here one by one.

[0014] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: receiving a second verification list sent by the cloud server, the second verification list containing verification information for verifying each NFC tag information; and updating the first verification list according to the second verification list. In an embodiment of the present application, the cloud server maintains a verification list for verifying each NFC tag information. When the verification list maintained by the cloud server is updated or when the first electronic device requests, the cloud server sends the second verification list to the first electronic device. Optionally, the second verification list is the latest version of the verification list for verifying each NFC tag information maintained by the cloud server.

[0015] In a second aspect, an embodiment of the present application provides an electronic device, where the electronic device is a first electronic device and includes:

[0016] One or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, cause the electronic device to perform the following steps: detecting NFC tag information of a second electronic device; verifying the NFC tag information according to a first verification list stored locally to obtain a first verification result; if the first verification result is a verification success, starting an application service associated with the NFC tag information; sending the NFC tag information to a cloud server; receiving a second verification result obtained by the cloud server from verifying the NFC tag information; if the second verification result is a verification failure, stopping the application service.

[0017] In combination with the second aspect, in certain implementations of the second aspect, when the instruction is executed by the device, the device specifically performs the following steps: in response to an operation of approaching or contacting the NFC tag of the second electronic device, reading NFC tag information stored in the NFC tag.

[0018] In combination with the second aspect, in certain implementations of the second aspect, when the instruction is executed by the device, the device specifically performs the following steps: determining, based on the NFC tag information, whether the first verification list includes first verification information for verifying the NFC tag information; if the first verification list includes the first verification information, verifying the NFC tag according to the first verification information to obtain the first verification result.

[0019] In combination with the second aspect, in certain implementations of the second aspect, when the instruction is executed by the device, the device specifically performs the following steps: if the first verification list does not include the first verification information, determining that the first verification result is a verification failure.

[0020] In combination with the second aspect, in certain implementations of the second aspect, when the instruction is executed by the device, the device specifically performs the following steps: if the first verification list contains the first verification information and the verification of the NFC tag information fails according to the first verification information, then determining that the first verification result is a verification failure.

[0021] In combination with the second aspect, in certain implementations of the second aspect, when the instruction is executed by the device, the device specifically performs the following steps: if the first verification result is a verification failure, the application service associated with the NFC tag information is not started; when the NFC tag information is sent to a cloud server and the second verification result obtained from the cloud server is a verification success, the application service associated with the NFC tag information is started.

[0022] In combination with the second aspect, in certain implementations of the second aspect, when it is determined that the connection with the cloud server fails, a first message is sent to a third electronic device in a near field communication manner, wherein the first message includes the NFC tag information, and the third electronic device is a device that establishes a connection with the cloud server; and the second verification result sent by the third electronic device is received, wherein the third electronic device is used to send the NFC tag information to the cloud server and obtain the second verification result from the cloud server.

[0023] In combination with the second aspect, in certain implementations of the second aspect, when the instruction is executed by the device, the device specifically performs the following steps: determine a trusted device set, the trusted device set includes multiple electronic devices that establish connections with the cloud server; send a second message for requesting resource occupancy information to each electronic device in the trusted device set; receive a third message sent by each electronic device based on the second message, the third message including resource occupancy information; and determine the third electronic device from the various electronic devices based on the resource occupancy information received from each electronic device.

[0024] In combination with the second aspect, in certain implementations of the second aspect, when the instruction is executed by the device, the device specifically performs the following steps: receiving a second verification list sent by the cloud server, the second verification list containing verification information for verifying each NFC tag information; and updating the first verification list according to the second verification list.

[0025] In a third aspect, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the first aspect or any possible implementation of the first aspect.

[0026] In the embodiment of the present application, when the application service is started through the NFC tag information, the application service is started first after the local verification is passed, and then the cloud verification is performed, so that the startup of the application service can be accelerated. Moreover, the local and cloud collaborative verification can ensure the accuracy of the verification result. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a schematic diagram of a near field communication scenario provided by an embodiment of the present application;

[0028] Figure 2 It is a flow chart of a verification method of an NFC tag provided in an embodiment of the present application;

[0029] Figure 3 is a flow chart of another NFC tag verification method provided in an embodiment of the present application;

[0030] Figure 4 is another schematic diagram of a near field communication scenario provided by an embodiment of the present application;

[0031] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0033] As described in the background technology section, in the scenario where an application is started by touching the NFC tag of the device, there may be problems such as NFC tag information being expired or tampered with, resulting in the application being mistakenly started. To this end, an embodiment of the present application provides a verification method for an NFC tag. In the method of the embodiment of the present application, after obtaining the NFC tag information, the NFC tag information can be verified according to the verification list. If the NFC tag information is successfully verified, the application is started to avoid the application being mistakenly started as much as possible. The NFC tag verification method of the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings.

[0034] Figure 1 Schematic diagram of a near field communication scenario provided by an embodiment of the present application. Figure 1 As shown, in this communication scenario, it includes: a first electronic device 100, a second electronic device 200 and a cloud server 300. Among them, the first electronic device 100 or the second electronic device 200 can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA) and other electronic devices. The embodiment of the present application does not impose any restrictions on the specific type of the electronic device.

[0035] In an embodiment of the present application, the first electronic device 100 includes an NFC module. The second electronic device 200 includes an NFC tag. The NFC module of the first electronic device 100 can be used as a card reader to read the NFC tag information stored in the NFC tag. In some embodiments, the NFC tag information may include a combination of one or more of the following information: a tag identifier, a device identifier, address information, and an application service identifier, etc. Among them, the tag identifier can be used to identify the NFC tag. The device identifier can be used to identify the second electronic device 200. Optionally, the device identifier can also be the device identifier of the device associated with the second electronic device 200. After the first electronic device 100 obtains the device identifier of the device associated with the second electronic device 200, it can interact with the associated device according to the device identifier. In some embodiments, the address information can be used to represent the access address of the second electronic device 200. Optionally, the address information can also be the address information of the device associated with the second electronic device 200. The first electronic device 100 can interact with the corresponding associated device according to the address information of the device associated with the second electronic device 200. Optionally, the address information can be a Bluetooth address. The first electronic device 100 can perform Bluetooth communication with the second electronic device 200 or an associated device of the second electronic device 200 according to the Bluetooth address. In some embodiments, the application service identifier can be used to identify the application service that can be started. In some embodiments, the application service identifier can be, for example, an identifier of a service such as a printing service, a screen projection service, or a networking service. After obtaining the application service identifier, the first electronic device 100 can start the corresponding application to achieve linkage with the second electronic device 200 or the corresponding associated device. Of course, the NFC tag information can also contain other possible information according to actual needs, which will not be listed here one by one.

[0036] In the embodiment of the present application, the first electronic device 100 approaches or contacts the NFC tag of the second electronic device 200. The NFC module in the first electronic device 100 reads the NFC tag information stored in the NFC tag. After the first electronic device 100 obtains the NFC tag information, it can verify the NFC tag information through the first verification list stored locally. And based on the verification of the NFC tag information, the first electronic device 100 can perform cloud verification on the NFC tag information in conjunction with the cloud server 300. Figure 2 As shown, the method for verifying the NFC tag includes:

[0037] 101, detecting NFC tag information of a second electronic device. In the embodiment of the present application, the first electronic device may approach or touch the NFC tag of the second electronic device to read the NFC tag information stored in the NFC tag.

[0038] 102. Verify the NFC tag information according to a first verification list stored locally to obtain a first verification result.

[0039] In an embodiment of the present application, the first electronic device stores a first verification list. The first electronic device verifies the acquired NFC tag information according to the first verification list. Optionally, the first verification list includes verification information for verifying the NFC tag information. The first electronic device verifies the NFC tag information according to the verification information in the first verification list to obtain a first verification result.

[0040] 103, whether the first verification result is verification success. If the first verification result is verification success, execute step 104; if the first verification result is verification failure, execute step 105.

[0041] 104, run the application service. When the first electronic device determines that the NFC tag information verification is successful according to the first verification result, the application service associated with the NFC information is started. After the first electronic device starts the application service associated with the NFC tag information according to the first verification result, the NFC tag information is further sent to the cloud server. The first electronic device verifies the NFC tag information again through the cloud server, that is, jumps to step 106.

[0042] 105, do not start the application service. When the first electronic device determines that the NFC tag information verification fails according to the first verification result, it refuses to start the application service associated with the NFC information. After the first electronic device refuses to start the application server associated with the NFC tag information according to the first verification result, it sends the NFC tag information to the cloud server. The first electronic device verifies the NFC tag information again through the cloud server, that is, jumps to step 106.

[0043] 106, sending the NFC tag information to the cloud server. In the above step 104, regardless of whether the first verification result is a success or a failure, the first electronic device sends the NFC tag information to the cloud server. The cloud server verifies the NFC tag information according to the second verification list stored in the cloud to obtain a second verification result. The cloud server sends the second verification result to the first electronic device.

[0044] 107, receiving a second verification result of the NFC tag information from the cloud server.

[0045] 108, whether the second verification result is a successful verification. If the first verification result is a successful verification and the second verification result is also a successful verification, the first electronic device continues to run the application service associated with the NFC tag information. If the first verification result is a successful verification and the second verification result is a failed verification, the first electronic device stops running the application service associated with the NFC tag information. If the first verification result is a failed verification and the second verification result is a successful verification, the first electronic device starts running the application service associated with the NFC tag information.

[0046] In an embodiment of the present application, the NFC tag information is first verified locally. If the local verification is successful, the application service is started. Afterwards, the NFC tag information is also sent to the cloud server for cloud verification. If the result of the cloud verification is also a successful verification, the application service continues to run. If the result of the cloud verification is a verification failure, the application service is stopped. In an embodiment of the present application, after the local verification is passed, the application service is started first and then the cloud verification is performed, which can speed up the startup of the application service. Moreover, local and cloud collaborative verification can ensure the accuracy of the verification results.

[0047] In the embodiment of the present application, if the verification result of the cloud server on the NFC tag information is inconsistent with the local verification result, the first electronic device further obtains a second verification list from the cloud server, the second verification list including verification information for verifying each NFC tag information. The first electronic device updates the first verification list stored locally according to the second verification list.

[0048] In some embodiments, the second check list stored in the cloud server is updated periodically. Optionally, after each update of the second check list, the cloud server sends the updated check information or the updated second check list to the first electronic device. The first electronic device updates the first check list according to the check information or the second check list sent by the cloud device.

[0049] In some embodiments, the first electronic device periodically sends query information to the cloud server. The query information is used to query whether the second check list in the cloud server has been updated. When the cloud server determines that the second check list has been updated, the cloud server sends the updated check information or the second check list to the first electronic device.

[0050] In the embodiment of the present application, by updating the first verification list in the first electronic device, the verification list of the first electronic device can be synchronized with the verification list in the cloud, thereby ensuring the accuracy of the verification of the NFC tag information.

[0051] Figure 3 FIG. 1 is a flow chart of another NFC tag verification method provided by an embodiment of the present application. Figure 3 As shown, the processing steps of the method include:

[0052] 201, detecting NFC tag information of a second electronic device. In the embodiment of the present application, the first electronic device can approach or touch the NFC tag of the second electronic device to read the NFC tag information stored in the NFC tag.

[0053] 202, whether the first verification list contains the first verification information. In an embodiment of the present application, the first electronic device locally stores the first verification list. The first verification list contains verification information of multiple NFC tags. The first electronic device determines whether the first verification list contains the first verification information. Among them, the first verification information is information used to verify the NFC tag information of the second electronic device. If the first verification list contains the first verification information, step 203 is executed, that is, the NFC tag information is verified through the first verification list locally of the first electronic device. If the first verification list does not contain the first verification information, cloud verification is performed through the cloud server. Among them, the process of cloud verification through the cloud server is described in subsequent steps.

[0054] 203, verify the NFC tag information according to the first verification information to obtain a local verification result. In some embodiments, the first verification information includes the validity condition of the electronic tag. If the NFC tag information meets the validity condition, the NFC tag information is successfully verified. If the NFC tag information does not meet the validity condition, the NFC tag information verification fails. In some embodiments, the validity condition of the electronic tag may be a validity period. If the current time of acquiring the NFC tag is within the validity period, it can be determined that the NFC tag information verification is successful. If the current time of acquiring the NFC tag is not within the validity period, it can be determined that the NFC tag information verification fails. In some embodiments, the validity condition of the electronic tag may be, for example, device type information that allows access to the NFC tag information. If the device type of the first electronic device is a type that allows access to the NFC tag, it can be determined that the NFC tag information verification is successful; if the device type of the first electronic device is not a type that allows access to the NFC tag, it can be determined that the NFC tag information verification fails. Of course, the validity condition of the electronic tag can also be limited according to the actual scenario, which will not be listed here one by one.

[0055] 204, whether the local verification result is successful. If the local verification result is successful, execute step 205; if the local verification result is failed, execute step 206.

[0056] 205, run the application service. When the first electronic device determines that the NFC tag information verification is successful based on the local verification result, it starts the application service associated with the NFC information. After the first electronic device starts the application service associated with the NFC tag information based on the local verification result, it further performs cloud verification on the NFC tag information through the cloud server.

[0057] 206, do not run the application service. When the first electronic device determines, based on the first verification result, that the NFC tag information verification fails, it refuses to start the application service associated with the NFC information. After the first electronic device refuses to start the application server associated with the NFC tag information based on the first verification result, it further performs cloud verification on the NFC tag information through the cloud server.

[0058] like Figure 3 As shown, the process of the first electronic device sending the NFC tag information to the cloud server for cloud verification includes:

[0059] 207, determine whether the connection with the cloud server is successful. That is, the first electronic device determines whether it can establish a connection with the cloud server. If the first electronic device can establish a connection with the cloud server, execute step 208. If the first electronic device fails to connect to the cloud server, execute step 210, that is, use other electronic devices to assist in cloud verification.

[0060] 208, sending the NFC tag information to the cloud server.

[0061] 209 , receiving the cloud verification result sent by the cloud server, and then jumping to step 212 .

[0062] 210, send the NFC tag information to the third electronic device. When the first electronic device determines that it cannot connect to the cloud server, it can send the NFC tag information to the cloud server through other electronic devices (such as the third electronic device). The third electronic device is an electronic device that establishes a connection with the cloud server. The third electronic device receives the cloud verification result of the NFC tag information by the cloud server. The third electronic device sends the cloud verification result to the first electronic device. In some embodiments, the first electronic device sends a first message to the third electronic device via short-distance communication, and the first message includes the NFC tag information. Optionally, the short-distance communication method may be an NFC communication method, a Bluetooth communication method, or other possible short-distance communication methods. For example, the first electronic device sends the first message to the third electronic device via Bluetooth. Optionally, after the third electronic device obtains the second verification result from the cloud server, it may also send the second verification result to the first electronic device via short-distance communication.

[0063] In some embodiments, the way in which the first electronic device determines the third electronic device may be: the first electronic device determines a trusted device set. The trusted device set includes multiple electronic devices that establish connections with a cloud server. Among them, the way in which the first electronic device determines the trusted device set may include: the first electronic device logs in to the first account. The first electronic device regards other electronic devices that log in to the first account as electronic devices in the trusted device set. Optionally, the first electronic device performs identity authentication with other electronic devices. The first electronic device regards the electronic devices that have passed the identity authentication as trusted devices.

[0064] The first electronic device sends a second message to each electronic device in the trusted device set for requesting resource occupancy information. After receiving the second message, each electronic device sends a third message to the first electronic device. The third message includes resource occupancy information. The resource occupancy information is used to reflect the resource occupancy of the electronic device. The first electronic device determines the third electronic device from each electronic device based on the resource occupancy information of each electronic device. Optionally, the first electronic device can select a device that is in a networked state and has a low resource occupancy rate from each electronic device as the third electronic device.

[0065] 211, receive the cloud verification result sent by the third electronic device, and then jump to step 212.

[0066] 212, whether the cloud verification result is successful. When the cloud verification result is successful and the local verification result is also successful, the first electronic device continues to run the application service associated with the NFC tag information. When the cloud verification result is successful and the local verification result is failed, the first electronic device starts to run the application service associated with the NFC tag information. When the cloud verification result is failed and the local verification result is successful, the first electronic device stops running the application service that has been started. When both the cloud verification result and the local verification result are failed, the application service associated with the NFC tag information is not run. That is, after the first electronic device starts or does not start the application service according to the local verification result, it further determines whether to continue to run the application service according to the cloud verification result.

[0067] In some embodiments, the first verification list stored in the first electronic device may not be the latest list. After the acquired NFC tag information is verified according to the first verification list, the local verification result obtained may be inaccurate. Therefore, in addition to starting or refusing to start the application service according to the local verification result, the first electronic device also sends the NFC tag information to the cloud server. The cloud server verifies the received NFC tag information according to the second verification list to obtain a cloud verification result. The cloud server sends the cloud verification result to the first electronic device. The first electronic device determines whether the cloud verification result is the same as the local verification result. If the cloud verification result is different from the local verification result, the first electronic device changes the running state of the application service.

[0068] In an embodiment of the present application, the first electronic device verifies the NFC tag information according to a first verification list stored locally. When the local verification is successful, the first electronic device first starts the application service, and then performs cloud verification. This method can speed up the startup process of the application service. Moreover, local and cloud collaborative verification can ensure the accuracy of the verification results. In an embodiment of the present application, when the first electronic device is in an offline state, cloud verification can be assisted by peripheral devices. Furthermore, if the cloud verification result is different from the local verification result, the first electronic device can also obtain a second verification list from the cloud server, and update the locally stored first verification list according to the second verification list.

[0069] Figure 4 is another schematic diagram of a near field communication scenario provided by an embodiment of the present application. Figure 4 As shown, the communication scenario includes: mobile phone 410, TV 440, TV remote control 420, tablet computer 430 and cloud server 300. Mobile phone 410 is provided with an NFC module. TV remote control 420 is provided with an NFC tag. In the scenario, after mobile phone 410 touches the NFC tag of TV remote control 420, the verification process of NFC tag information performed includes:

[0070] (1) The mobile phone 410 detects the NFC tag information of the TV remote control 420.

[0071] In some embodiments, the NFC tag information may include the Bluetooth address of the TV 440. Optionally, the NFC tag information may also include an identifier of the NFC tag.

[0072] (2) Mobile phone 410 verifies the NFC tag information.

[0073] The mobile phone 410 stores a first verification list. As shown in Table 1, the first verification list includes multiple verification information. As shown in Table 1, each row represents a verification information. Each verification information may include a tag identifier, application service information associated with the tag identifier, and a validity period.

[0074] Label identification Application service information Validity period Tag 1 Application Service 1 2018.01.01-2025.01.01 Tag 2 Application Service 2 2017.01.01-2021.01.01 Tag 3 Application Service 3 2017.01.01-2018.01.01 Tag 4 Application Service 4 2016.01.01-2017.01.01

[0075] Table 1

[0076] As shown in Table 1, NFC tag 1 is associated with application service 1; the validity period is 2018.01.01-2025.01.01.

[0077] NFC tag 2 is associated with application service 2; the validity period is 2017.01.01-2021.01.01.

[0078] NFC tag 3 is associated with application service 3; the validity period is 2017.01.01-2018.01.01.

[0079] NFC tag 4 is associated with application service 4; the validity period is 2016.01.01-2017.01.01.

[0080] The mobile phone 410 verifies the NFC tag information according to the first verification list. Optionally, the mobile phone 410 matches the first verification information from the first verification list according to the NFC tag information. For example, the tag identifier contained in the NFC tag information is tag 2. Then the mobile phone 410 verifies the NFC tag information according to the verification information corresponding to tag 2. In the example given in Table 1, the validity period corresponding to Table 2 is 2017.01.01-2021.01.01. The mobile phone 410 can determine that the currently acquired tag information is within the validity period and the NFC tag information verification is successful.

[0081] (3) Mobile phone 410 starts the application service associated with the tag information. In the example given in Table 1, tag 2 is associated with application service 2, and mobile phone 410 starts application service 2. In one example, application service 2 is a screen projection service. Then, after mobile phone 410 establishes a screen projection connection with TV 440, it projects the screen to TV 440. Optionally, the NFC tag information obtained by mobile phone 410 may include address information for establishing a screen projection connection with TV 440. Mobile phone 410 establishes a screen projection connection with TV 440 through the address information. In some embodiments, application service 2 may be a simulated remote control service. Then, after mobile phone 410 determines that the NFC tag information is successful, it may display a simulated remote control interface in mobile phone 410. That is, mobile phone 410 implements the function of a remote control to control TV 440.

[0082] (4) The mobile phone 410 sends the NFC tag information to the cloud server 300. After the mobile phone 410 successfully verifies the NFC tag information locally, the mobile phone 410 sends the NFC tag information to the cloud server 300. The cloud server 300 verifies the NFC tag information according to the second verification list. In some embodiments, if the cloud server 300 fails to verify the NFC tag, it sends the verification failure result to the mobile phone 410.

[0083] (5) The mobile phone 410 stops running the application service associated with the tag information. In an embodiment of the present application, when the mobile phone 410 successfully verifies the NFC tag information and the cloud server 300 fails to verify the NFC tag information, the mobile phone 410 stops running the application service associated with the tag information. If the mobile phone 410 successfully verifies the NFC tag information and the cloud server 300 also successfully verifies the NFC tag information, the mobile phone 410 continues to run the application service associated with the NFC tag information. In some embodiments, if the mobile phone 410 fails to verify the NFC tag information, the mobile phone 410 also sends the NFC tag information to the cloud server 300 for cloud verification. If the cloud server 300 also fails to verify the NFC tag information, the mobile phone 410 refuses to run the application service associated with the NFC tag information. If the cloud server 300 successfully verifies the NFC tag information, the mobile phone 410 starts the application service associated with the NFC tag information.

[0084] In some embodiments, the mobile phone 410 sending NFC tag information to the cloud server 300 may be: when the mobile phone 410 is successfully connected to the cloud server 300, the mobile phone 410 sends NFC verification information to the cloud server 300. In some embodiments, when the mobile phone 410 fails to connect to the cloud server 300, the mobile phone 410 can assist in cloud verification through other devices. Optionally, the mobile phone 410 obtains a device that logs in to the first account. Among them, the first account is the account logged in by the mobile phone 410. In one example, the tablet computer 430 is a device with the same account as the mobile phone 410. Then the mobile phone 410 sends an assistance verification message to the tablet computer 430 through a short-range wireless communication method such as Bluetooth and Zigbee. The assistance verification message contains NFC tag information. The tablet computer 430 sends the NFC tag information to the cloud server 300. After the cloud server 300 verifies the NFC tag information, it sends the verification result to the tablet computer 430. The tablet computer 430 sends the verification result to the mobile phone 410. The mobile phone 410 determines whether to start the application associated with the NFC tag information according to the verification result. If the verification result sent by the tablet computer 430 to the mobile phone 410 is a verification failure, the mobile phone 410 stops running the application service associated with the FNC tag information.

[0085] In some embodiments, the mobile phone 410 determines that there are multiple devices with the same account, such as Figure 4 In the example, the same account devices of the mobile phone 410 include a tablet computer 430 and a TV 440. Then the mobile phone 410 determines a target device from the multiple devices. The mobile phone 410 sends NFC tag information to the cloud server 300 with the assistance of the target device. Optionally, the mobile phone 410 may store a list of devices with the same account. The mobile phone 410 determines some or all of the electronic devices included in the list of devices with the same account as candidate electronic devices. The mobile phone 410 sends an assistance verification message to each candidate electronic device. After receiving the assistance verification message, each candidate electronic device sends resource occupancy information to the mobile phone 410. Among them, the resource occupancy information may include a network connection status and a resource occupancy status. The mobile phone 410 determines the target device from each candidate electronic device based on the resource occupancy information. Among them, the network connection status is used to indicate whether the electronic device can connect to the cloud server 300. The resource occupancy status may include central processing unit (CPU) utilization, input / output (I / O) utilization, bandwidth utilization, etc. Optionally, the mobile phone 410 may determine an electronic device that is in a networked state and has low resource occupancy as the target device. As Figure 4 In the embodiment, the mobile phone 410 can use the tablet computer 430 as the target device. The mobile phone 410 sends NFC verification information to the cloud server 300 through the tablet computer 430.

[0086] When verifying NFC tag information, the embodiment of the present application adopts local and cloud collaborative verification, and starts the application service first when the local verification is successful, which can solve the delay problem caused by cloud verification under the premise of ensuring the accuracy of the verification result. Moreover, in offline scenarios, electronic devices can entrust surrounding trusted devices to assist in verification, realizing offline verification of NFC tag information.

[0087] The embodiment of the present application also provides an electronic device, which can be a terminal device or a circuit device built into the terminal device. The device can be used to execute the functions / steps in the above method embodiment.

[0088] like Figure 5 As shown, the electronic device 900 includes a processor 910 and a transceiver 920. Optionally, the electronic device 900 may also include a memory 930. The processor 910, the transceiver 920 and the memory 930 may communicate with each other through an internal connection path to transmit control and / or data signals, and the memory 930 is used to store a computer program, and the processor 910 is used to call and run the computer program from the memory 930.

[0089] Optionally, the electronic device 900 may further include an antenna 940 for transmitting the wireless signal output by the transceiver 920. In an embodiment of the present application, the transceiver 920 may implement a mobile communication function and / or a wireless communication function. Optionally, the transceiver 920 includes an NFC module for reading NFC tag information of other electronic devices. Optionally, the transceiver 920 includes a Bluetooth module and a Wireless-Fidelity (Wi-Fi) module, which are respectively used to implement a Bluetooth communication function and a function of accessing a Wi-Fi network.

[0090] The processor 910 and the memory 930 may be combined into a processing device, or more commonly, they are independent components, and the processor 910 is used to execute the program code stored in the memory 930 to implement the above functions. In specific implementation, the memory 930 may also be integrated into the processor 910, or may be independent of the processor 910.

[0091] In addition, in order to make the functions of the electronic device 900 more complete, the electronic device 900 may further include one or more of an input unit 960, a display unit 970, an audio circuit 980, a camera 990, and a sensor 901, and the audio circuit may further include a speaker 982, a microphone 984, etc. The display unit 970 may include a display screen.

[0092] Optionally, the electronic device 900 may further include a power supply 950 for providing power to various devices or circuits in the terminal device.

[0093] It should be understood that Figure 5 The electronic device 900 shown can be implemented as a first electronic device. Figures 2 to 3 The various processes of the method embodiment shown. The operations and / or functions of the various modules in the electronic device 900 are respectively to implement the corresponding processes in the above method embodiment. For details, please refer to the description in the above method embodiment. To avoid repetition, the detailed description is appropriately omitted here.

[0094] It should be understood that Figure 5 The processor 910 in the electronic device 900 shown may be a system on a chip (SOC), which may include a central processing unit (CPU), and may further include other types of processors, the CPU may be called a host CPU, and the neural network processor NPU is mounted on the host CPU (Host CPU) as a coprocessor, and the Host CPU assigns tasks. The processors of each part cooperate to implement the previous method flow, and each processor may selectively execute a part of the software driver.

[0095] The present application also provides a computer-readable storage medium in which instructions are stored. When the instructions are executed on a computer, the computer executes the above-mentioned Figure 2 or Figure 3 The individual steps in the method shown.

[0096] The present application also provides a computer program product comprising instructions, which, when executed on a computer or any at least one processor, enables the computer to execute the following Figure 2 or Figure 3 The individual steps in the method shown.

[0097] The present application also provides a chip, including a processor. The processor is used to read and run a computer program stored in a memory to execute corresponding operations and / or processes performed by the method provided in the present application.

[0098] Optionally, the chip also includes a memory, the memory is connected to the processor through a circuit or wire, and the processor is used to read and execute the computer program in the memory. Further optionally, the chip also includes a communication interface, and the processor is connected to the communication interface. The communication interface is used to receive data and / or information to be processed, and the processor obtains the data and / or information from the communication interface and processes the data and / or information. The communication interface can be an input and output interface.

[0099] In the above embodiments, the processor 910 involved may include, for example, a central processing unit (CPU), a microprocessor, a microcontroller or a digital signal processor, and may also include a GPU, an NPU and an ISP. The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as application-specific integrated circuits (ASICs), or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a memory.

[0100] The memory can be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or it can also be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer.

[0101] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0102] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0103] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for verifying an NFC tag, characterized in that: The method is applied to a first electronic device, comprising: Detecting NFC tag information of a second electronic device; Verify the NFC tag information according to a first verification list stored locally to obtain a first verification result; If the first verification result is successful, starting and running an application service associated with the NFC tag information; Sending the NFC tag information to a cloud server; Receiving a second verification result obtained by the cloud server through verification of the NFC tag information; If the second verification result is a verification failure, stopping the application service; If the first verification result is a verification failure, the application service associated with the NFC tag information is not started; when the NFC tag information is sent to a cloud server and the second verification result obtained from the cloud server is a verification success, the application service associated with the NFC tag information is started.

2. The method according to claim 1, characterized in that: Detecting NFC tag information of a second electronic device includes: In response to an operation of approaching or contacting the NFC tag of the second electronic device, NFC tag information stored in the NFC tag is read.

3. The method according to claim 1 or 2, characterized in that: Verifying the NFC tag information according to a first verification list stored locally to obtain a first verification result includes: Determining, according to the NFC tag information, whether the first verification list includes first verification information for verifying the NFC tag information; If the first verification list includes the first verification information, the NFC tag is verified according to the first verification information to obtain the first verification result.

4. The method according to claim 3, characterized in that The method further comprises: If the first verification list does not include the first verification information, it is determined that the first verification result is a verification failure.

5. The method according to claim 3, characterized in that: The method further comprises: If the first verification list includes the first verification information and verification of the NFC tag information fails according to the first verification information, it is determined that the first verification result is a verification failure.

6. The method according to claim 1, characterized in that Sending the NFC tag information to the cloud server includes: when it is determined that the connection with the cloud server fails, sending a first message to a third electronic device in a near field communication manner, wherein the first message includes the NFC tag information, and the third electronic device is a device that establishes a connection with the cloud server; Receiving a second verification result of the NFC tag information by the cloud server includes: receiving the second verification result sent by the third electronic device, wherein the third electronic device is used to send the NFC tag information to the cloud server, and obtain the second verification result from the cloud server.

7. The method according to claim 6, characterized in that Before sending the first message to the third electronic device in a near field communication manner, the method further includes: Determine a trusted device set, the trusted device set including a plurality of electronic devices connected to the cloud server; Sending a second message for requesting resource occupation information to each electronic device in the trusted device set; receiving a third message sent by each electronic device according to the second message, wherein the third message includes resource occupation information; The third electronic device is determined from the electronic devices according to the received resource occupation information of the electronic devices.

8. The method according to claim 1, characterized in that The method further comprises: Receive a second verification list sent by the cloud server, where the second verification list includes verification information for verifying each NFC tag information; The first check list is updated according to the second check list.

9. An electronic device, characterized in that: The electronic device as a first electronic device includes: One or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, cause the electronic device to perform the following steps: Detecting NFC tag information of a second electronic device; Verify the NFC tag information according to a first verification list stored locally to obtain a first verification result; If the first verification result is successful, starting and running an application service associated with the NFC tag information; Sending the NFC tag information to a cloud server; Receiving a second verification result obtained by the cloud server through verification of the NFC tag information; If the second verification result is a verification failure, stopping the application service; If the first verification result is a verification failure, the application service associated with the NFC tag information is not started; when the NFC tag information is sent to a cloud server and the second verification result obtained from the cloud server is a verification success, the application service associated with the NFC tag information is started.

10. The electronic device according to claim 9, characterized in that: When the instruction is executed by the device, the device specifically performs the following steps: In response to an operation of approaching or contacting the NFC tag of the second electronic device, NFC tag information stored in the NFC tag is read.

11. The electronic device according to claim 9 or 10, characterized in that: When the instruction is executed by the device, the device specifically performs the following steps: Determining, according to the NFC tag information, whether the first verification list includes first verification information for verifying the NFC tag information; If the first verification list includes the first verification information, the NFC tag is verified according to the first verification information to obtain the first verification result.

12. The electronic device according to claim 11, characterized in that: When the instruction is executed by the device, the device specifically performs the following steps: If the first verification list does not include the first verification information, it is determined that the first verification result is a verification failure.

13. The electronic device according to claim 11, characterized in that: When the instruction is executed by the device, the device specifically performs the following steps: If the first verification list includes the first verification information and verification of the NFC tag information fails according to the first verification information, it is determined that the first verification result is a verification failure.

14. The electronic device according to claim 9, characterized in that: When it is determined that the connection with the cloud server fails, a first message is sent to a third electronic device in a near field communication manner, wherein the first message includes the NFC tag information, and the third electronic device is a device that establishes a connection with the cloud server; The second verification result sent by the third electronic device is received, wherein the third electronic device is used to send the NFC tag information to the cloud server and obtain the second verification result from the cloud server.

15. The electronic device according to claim 14, characterized in that: When the instruction is executed by the device, the device specifically performs the following steps: Determine a trusted device set, the trusted device set including a plurality of electronic devices connected to the cloud server; Sending a second message for requesting resource occupation information to each electronic device in the trusted device set; receiving a third message sent by each electronic device according to the second message, wherein the third message includes resource occupation information; The third electronic device is determined from the electronic devices according to the received resource occupation information of the electronic devices.

16. The electronic device according to claim 9, characterized in that: When the instruction is executed by the device, the device specifically performs the following steps: Receive a second verification list sent by the cloud server, where the second verification list includes verification information for verifying each NFC tag information; The first check list is updated according to the second check list.

17. A computer storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 8.