CN113422622B - Data verification method, device, equipment and readable storage medium for near field communication - Google Patents

Data verification method, device, equipment and readable storage medium for near field communication Download PDF

Info

Publication number
CN113422622B
CN113422622B CN202110632144.9A CN202110632144A CN113422622B CN 113422622 B CN113422622 B CN 113422622B CN 202110632144 A CN202110632144 A CN 202110632144A CN 113422622 B CN113422622 B CN 113422622B
Authority
CN
China
Prior art keywords
electronic equipment
reader
writer
nfc antenna
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110632144.9A
Other languages
Chinese (zh)
Other versions
CN113422622A (en
Inventor
曾绍祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hainan Opper Communication Technology Co ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110632144.9A priority Critical patent/CN113422622B/en
Publication of CN113422622A publication Critical patent/CN113422622A/en
Application granted granted Critical
Publication of CN113422622B publication Critical patent/CN113422622B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • H04B5/70
    • H04B5/77
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/40Security arrangements using identity modules
    • H04W12/47Security arrangements using identity modules using near field communication [NFC] or radio frequency identification [RFID] modules
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application provides a data verification method, a device, equipment and a readable storage medium for near field communication, wherein electronic equipment comprises at least two NFC antennas; when the electronic equipment approaches the reader-writer for multiple times, the electronic equipment determines a target NFC antenna which is closest to the reader-writer in the approach scene each time; then, acquiring a security verification code of the electronic equipment according to the target NFC antenna in each approaching scene and a preset mapping relation; finally, according to the safety verification code and a preset password, carrying out safety verification on the electronic equipment; the mapping relationship includes a corresponding relationship between different NFC antennas and different authentication marks. By adopting the method, the use safety of the electronic equipment can be ensured under the condition that the electronic equipment is started or shut down.

Description

Data verification method, device, equipment and readable storage medium for near field communication
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a data verification method, apparatus, device, and readable storage medium for near field communication.
Background
With the development of Communication technology, Near Field Communication (NFC) may be implemented in electronic devices through an integrated NFC module. The NFC module can have a reader-writer function, and when a mobile phone integrated with the NFC module is in contact with an NFC tag, data in the NFC tag can be read or data can be written into the NFC tag; in addition, the NFC module may also operate in a card simulation mode, that is, the electronic device integrated with the NFC module is simulated as an NFC tag or a contactless card, for example, a mobile phone integrated with the NFC module may be used as an access card.
When the NFC module works in the card simulation mode, the data exchange between the NFC module and the reader-writer can be completed without password verification. However, when the electronic device is lost or used by an illegal user, the security of the NFC module cannot be guaranteed.
Disclosure of Invention
The embodiment of the application provides a data verification method, a data verification device, data verification equipment and a readable storage medium for near field communication.
A data verification method of near field communication is applied to electronic equipment, the electronic equipment comprises at least two NFC antennas, and the method comprises the following steps:
when the electronic equipment approaches the reader-writer for multiple times, determining a target NFC antenna closest to the reader-writer in each approaching scene;
acquiring a security verification code of the electronic equipment according to a target NFC antenna in a scene close to each time and a preset mapping relation; the mapping relation comprises corresponding relations between different NFC antennas and different verification marks;
and carrying out security verification on the electronic equipment according to the security verification code and a preset password.
In one embodiment, determining a target NFC antenna closest to a reader/writer in each approach scenario includes:
acquiring voltage amplitudes output by each receiving end of the electronic equipment under each approaching scene; one receiving end corresponds to one NFC antenna;
and determining the NFC antenna corresponding to the receiving end with the maximum voltage amplitude as a target NFC antenna.
In one embodiment, the method includes acquiring a security verification code of the electronic device according to a target NFC antenna in a scene of each approach and a preset mapping relation, wherein the security verification code includes
Determining a verification mark corresponding to the target NFC antenna under each approaching scene based on the mapping relation;
and arranging the verification marks according to the time sequence of each time close to the scene to obtain the safety verification code.
In one embodiment, the security verification of the electronic device according to the security verification code and the preset password includes:
comparing the security verification code with a preset password according to bits;
and if each bit of the security verification code is the same as that of the preset password, determining that the electronic equipment passes the security verification.
In one embodiment, the method further includes:
and under the condition that the electronic equipment passes the safety verification, sending the data to be sent to the reader-writer through the target NFC antenna in the last approaching scene.
In one embodiment, the method further includes: and if the times that the electronic equipment approaches the reader-writer are less than the preset times, determining that the safety verification of the electronic equipment does not pass.
In one embodiment, the electronic device includes a first NFC antenna and a second NFC antenna located at the top and bottom of the electronic device housing, respectively.
In one embodiment, the method further includes:
under the condition that the electronic equipment safety verification is not passed, sending a card swiping again instruction to the user; the swipe again indication is used to instruct the user to bring the electronic device close to the reader/writer.
A near field communication device is applied to electronic equipment; the electronic equipment comprises at least two NFC antennas, and the device comprises:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a target NFC antenna which is closest to a reader-writer in a scene of approaching each time when the electronic equipment approaches the reader-writer for multiple times;
the acquisition module is used for acquiring a security verification code of the electronic equipment according to the target NFC antenna in each approaching scene and a preset mapping relation; wherein the mapping relationship comprises a corresponding relationship between different NFC antennas and different authentication marks;
and the verification module is used for performing security verification on the electronic equipment according to the security verification code and a preset password.
An electronic device comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the data verification method of near field communication.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned data authentication method for near field communication.
The data verification method, the device, the equipment and the readable storage medium for near field communication are characterized in that the electronic equipment comprises at least two NFC antennas; when the electronic equipment approaches the reader-writer for multiple times, the electronic equipment determines a target NFC antenna closest to the reader-writer in an approach scene each time; then, acquiring a security verification code of the electronic equipment according to the target NFC antenna in each approaching scene and a preset mapping relation; finally, according to the safety verification code and a preset password, carrying out safety verification on the electronic equipment; the mapping relationship includes a corresponding relationship between different NFC antennas and different authentication marks. The electronic equipment determines the target NFC antenna closest to the reader-writer in the approaching scene each time, so that the NFC antenna approaching sequence when the electronic equipment block approaches the reader-writer by a user can be obtained; furthermore, the electronic device determines the security verification code according to the target NFC antenna and the preset mapping relation, so that the obtained security verification code is not matched with the password under the condition that the user does not approach the electronic device and the reader-writer according to the preset approaching sequence, the electronic device and the reader-writer cannot exchange data, and the security of the electronic device is guaranteed; in addition, the data verification method can be executed through an NFC chip in the electronic equipment, so that the use safety of the electronic equipment can be ensured under the condition that the electronic equipment is started or shut down.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an exemplary embodiment of a data verification method for near field communication;
FIG. 2 is a flow diagram of a data verification method for near field communication in one embodiment;
FIG. 3 is a diagram illustrating a data verification method for near field communication in one embodiment;
FIG. 4 is a flow diagram of a data verification method for near field communication in one embodiment;
FIG. 5 is a flow diagram of a data verification method for near field communication in one embodiment;
FIG. 6 is a flow diagram of a data verification method for near field communication in one embodiment;
FIG. 7 is a block diagram showing the structure of a data authentication device for near field communication according to an embodiment;
FIG. 8 is a block diagram showing the structure of a data authentication device for near field communication according to an embodiment;
FIG. 9 is a block diagram showing the structure of a data authentication device for near field communication according to an embodiment;
FIG. 10 is a block diagram showing the structure of an electronic apparatus according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
Fig. 1 is a schematic application environment of a data verification method for near field communication according to an embodiment. As shown in fig. 1, the application environment includes an electronic device 200 provided with at least two NFC antennas 100 and a reader 300, where the electronic device 200 may implement data exchange with the reader through NFC communication via the NFC antennas. The electronic equipment can be terminal equipment such as a mobile phone, a tablet personal computer, a handheld terminal, a telephone watch and the like; the reader-writer can be a reader-writer of an access control system, an elevator reader-writer and the like.
Fig. 2 is a flow diagram of a data verification method for near field communication in one embodiment. The data verification method of near field communication in this embodiment is described by taking the electronic device operating in fig. 1 as an example. As shown in fig. 2, the method includes:
s101, when the electronic equipment approaches the reader for multiple times, determining a target NFC antenna closest to the reader under each approach scene.
The electronic device may include an NFC chip and at least two NFC antennas. The NFC antenna can be used for sending data sent by the NFC chip to the reader-writer and can also be used for receiving data sent by the reader-writer. The NFC antenna may be a single-ended antenna or a differential antenna. The electronic device may include two NFC antennas, or may include three or four NFC antennas, which is not limited herein. The positions of the at least two NFC antennas may be different, for example, the electronic device includes four NFC antennas, and the four NFC antennas may be located at upper left, lower left, upper right, and lower right positions of the rear housing of the electronic device, respectively. Optionally, the electronic device includes a first NFC antenna and a second NFC antenna, and the first NFC antenna and the second NFC antenna are respectively located at the top and the bottom of the electronic device housing.
The at least two NFC antennas may be connected to the same NFC chip, or may be connected to different NFC chips, and the different NFC chips may be in communication connection with each other.
The NFC chip in the electronic device may operate in a reader/writer operating mode, that is, the NFC chip in the electronic device may read data in the NFC tag or write data into the NFC tag; the NNFC chip can also work in a card simulation working mode, namely, the electronic equipment integrated with the NFC chip is simulated into an NFC label or a non-contact card, for example, a mobile phone integrated with the NFC chip and an NFC antenna can be used as an access card. When the NFC chip works in the card simulation mode, the electronic equipment can be subjected to security verification before data exchange is carried out between the electronic equipment and the reader-writer, so that the use security of the electronic equipment is guaranteed. In the above scenario that the electronic device communicates with the reader/writer, the electronic device may communicate with the reader/writer after contacting the electronic device, or may communicate with the reader/writer without contacting the electronic device. In a scene where the electronic device communicates with the reader/writer, the electronic device may be in a power-on state or a power-off state.
When the user uses the electronic equipment as the NFC label, the electronic equipment and the reader-writer can be approached for multiple times, so that the electronic equipment can acquire the security verification code to perform security verification. The number of times that the electronic device and the reader/writer approach may be a preset number, for example, the preset number is 4 times, 5 times, and the like, and the specific value of the preset number is not limited herein. In addition, the preset times may be determined based on the number of NFC antennas in the electronic device, and the preset times may be equal to or greater than the number of NFC antennas in the electronic device; the preset times can be in a multiple relation with the number of the NFC antennas, when the number of the NFC antennas is small, the multiple numerical values can be large, and when the number of the NFC antennas is large, the multiple numerical values can be small. In addition, the preset number of times may be in a non-multiple relationship with the number of NFC antennas, for example, the electronic device includes 2 NFC antennas, and the preset number of times is 3. In one implementation, the preset number of times may be set by the user. For example, when the electronic device includes 2 NFC antennas, the preset number of times may be 4 or 6; when the electronic device includes 4 NFC antennas, the preset number of times may be 4 or 8.
When the preset times of the multiple approaches is N, the electronic equipment can acquire the security verification code and perform security verification when approaching the reader for the Nth time; or, the electronic device may further obtain the security verification code when approaching the reader/writer for the (N + 1) th time, which is not limited herein.
The security verification code is related to the sequence of the at least two NFC antennas approaching the reader-writer. The security verification code can be obtained based on the approaching sequence of the NFC antenna approaching the reader-writer, and can also be obtained based on the reverse sequence of the approaching sequence; or, the electronic device may further generate a security verification code corresponding to the sequence of the NFC antenna according to a preset encoding rule, and an acquisition manner of the security verification code is not limited herein. For example, the NFC antennas include a first NFC antenna ANT1 and a second NFC antenna ANT2, ANT1 approaches the reader in a first approach scenario, ANT2 approaches the reader in a second approach scenario, and ANT2 approaches the reader in a third approach scenario; that is to say the order of NFC antennas is ANT1, ANT2, ANT 2; the security verification code can be obtained by coding according to ANT1, ANT2 and ANT2 in sequence, or can be obtained by coding according to ANT2, ANT2 and ANT 1; it is also possible to place ANT1 in the first-time-close scene at the middle position of the security coding and place ANT2 in the second-time-close scene at the start position of the security coding according to preset rules, that is, obtained based on the sequential ANT2, ANT1, ANT2 coding.
In the process that the electronic device approaches the reader/writer each time, the electronic device may determine which NFC antenna is closest to the reader/writer at present, and determine that the NFC antenna is the target NFC antenna in the approach scene at this time. The electronic device may be determined according to signal quality of signals received by different NFC antennas, or may be determined according to magnitude of induced current generated by different NFC antennas through electromagnetic induction, which is not limited herein.
S102, determining a safety verification code of the electronic equipment according to a target NFC antenna in a scene close to each time and a preset mapping relation; the mapping relationship includes a corresponding relationship between different NFC antennas and different authentication marks.
After determining that the target NFC antenna is close to the scene each time, the electronic device may determine the security verification code according to the target NFC antenna and the preset mapping relationship. The mapping relationship includes a corresponding relationship between different NFC antennas and different authentication marks. The verification mark may be represented by a number, a character, or a position of an antenna, which is not limited herein. When the verification mark is represented by a number, the verification mark may be represented by a binary number, and the number of bits of the verification mark corresponding to each NFC antenna may be determined by the number of NFC antennas in the electronic device. The electronic device includes two NFC antennas, and the authentication mark may be represented by a 1-bit binary number, for example, "0" may be used as the authentication mark of the first NFC antenna, and "1" may be used as the authentication mark of the second NFC antenna. In another embodiment, four NFC antennas are included in the electronic device, and the authentication mark may be represented by a 2-bit binary number, for example, "00" may be used as the authentication mark of the first NFC antenna.
The electronic device may determine the security verification code according to the target antenna and the mapping relationship of each approach after multiple approaches. Or, the electronic device may determine, in each approaching scene, the corresponding verification mark of the current approaching scene respectively. After determining the verification mark of the target NFC antenna, the electronic device may write the verification mark into a register in each approach scenario. The electronic device may write the verification flag of the first approaching scene into the highest bit of the register, may also write the lowest bit of the register, and may also write the storage location corresponding to the first approaching scene, which is not limited herein. Optionally, the electronic device may determine, based on the mapping relationship, a verification mark corresponding to the target NFC antenna in the scene of each approach; and arranging the verification marks according to the time sequence of each time of approaching the scene to obtain the security verification code.
Taking the electronic device shown in fig. 3 as an example, the electronic device includes two NFC antennas, ANT1 and ANT2, ANT1 is located at an upper portion of the back of the electronic device, and ANT2 is located at a lower portion of the back of the electronic device. The user has set the password "0110" in the electronic device. In the mapping relationship, the validation flag corresponding to ANT1 is 0, and the validation flag corresponding to ANT2 is 1. In each approach scene, the electronic device writes the authentication tag of the target NFC antenna closest to the electronic device into the register according to the order from high to low, and when the NFC antenna of the mobile phone approaches the reader and is ANT1, ANT2, ANT2, and ANT1 respectively, the result in the register is "0110". In the fourth approach scenario, the electronic device reads the value in the register to obtain the security verification code "0110".
S103, carrying out security verification on the electronic equipment according to the security verification code and a preset password.
A password is preset in the electronic equipment, and the password corresponds to a preset NFC antenna approaching sequence. The password may be set by the user through an application program and stored in the electronic device. When the security verification code is matched with the preset password, the electronic equipment passes the security verification; when the security verification code is not matched with the preset password, the electronic equipment cannot pass the security verification. When the electronic equipment matches the security verification code with the password, data conversion can be respectively carried out on the security verification code and the password, and if the converted data are the same, the security verification code is considered to be matched with the preset password. Optionally, the electronic device may perform a bit-wise comparison of the security verification code with a preset password; if each bit of the security verification code is the same as that of the preset password, determining that the security verification of the electronic equipment is passed; and if the safety verification code and the preset password have different bits, determining that the safety verification of the electronic equipment does not pass.
The user of the electronic equipment can swipe the card by adopting the preset NFC antenna approaching sequence, so that different NFC antennas approach the reader-writer in sequence, and the security verification code obtained by the electronic equipment is matched with the preset password and passes the security verification.
When other users illegally use the electronic device, the preset approaching order is not clear, but the NFC antenna is randomly brought close to the reader/writer. When the number of times of the other users approaching the electronic equipment to the reader-writer is smaller than the preset number of times, the electronic equipment cannot acquire the security verification code, or the number of bits in the acquired security verification code is smaller than the preset password, so that the security verification code is not compared with the preset password, the electronic equipment is directly determined not to pass the security verification, and the electronic equipment cannot exchange data with the reader-writer. When the number of times of approaching the electronic device to the reader-writer by other users is greater than or equal to the preset number of times and the security verification code obtained by the electronic device is not matched with the preset password, the electronic device cannot pass the security verification and cannot exchange data with the reader-writer. The above security authentication process may be as shown in fig. 4, and includes the following steps:
s201, obtaining the approaching times of the electronic equipment and the reader-writer;
s202, determining whether the approaching times are greater than or equal to preset times; if the approaching times are less than the preset times, executing S203; if the approaching times are greater than or equal to the preset times, executing S204;
s203, determining that the electronic equipment does not pass the safety verification;
s204, comparing the security verification code with a preset password according to the bit to determine whether each bit is the same; if yes, executing S205, otherwise, returning to executing S203;
s205, determining that the electronic equipment passes the safety verification.
In the data verification method of near field communication, the electronic device comprises at least two NFC antennas; when the electronic equipment approaches the reader-writer for multiple times, the electronic equipment determines a target NFC antenna closest to the reader-writer in an approach scene each time; then, acquiring a security verification code of the electronic equipment according to the target NFC antenna in each approaching scene and a preset mapping relation; finally, according to the safety verification code and a preset password, carrying out safety verification on the electronic equipment; the mapping relationship includes a corresponding relationship between different NFC antennas and different authentication marks. The electronic equipment determines the target NFC antenna closest to the reader-writer in the approaching scene each time, so that the NFC antenna approaching sequence when the electronic equipment block approaches the reader-writer by a user can be obtained; furthermore, the electronic device determines the security verification code according to the target NFC antenna and the preset mapping relation, so that the obtained security verification code is not matched with the password under the condition that the user does not approach the electronic device and the reader-writer according to the preset approaching sequence, the electronic device and the reader-writer cannot exchange data, and the security of the electronic device is guaranteed; in addition, the data verification method can be executed through an NFC chip in the electronic equipment, so that the use safety of the electronic equipment can be ensured under the condition that the electronic equipment is started or shut down.
Fig. 5 is a schematic flowchart of a data verification method for near field communication in another embodiment, where this embodiment relates to a manner in which an electronic device determines a target NFC antenna, and based on the above embodiment, as shown in fig. 5, the above S101 includes:
s301, acquiring voltage amplitudes output by each receiving end of the electronic equipment under each approaching scene; wherein, one receiving end corresponds to one NFC antenna.
When the electronic device determines the target NFC antenna closest to the reader/writer, the determination may be made according to the amplitude of the voltage output by the receiving terminal. In the electronic device, each receiving end corresponds to one NFC antenna, and after the NFC antenna receives an instruction sent by the reader, a voltage value may be output at the receiving end. The electronic device can write the voltage amplitude output by each receiving end in each approaching scene into the voltage register.
S302, determining the NFC antenna corresponding to the receiving end with the maximum voltage amplitude as a target NFC antenna.
On the basis of the above steps, when the electronic device determines the target NFC antenna, the maximum voltage amplitude may be determined by reading the voltage amplitudes of the receiving ends corresponding to different NFC antennas in the voltage register, and then comparing the voltage amplitudes of the NFC antennas. Further, the electronic device may determine, as the target NFC antenna, the NFC antenna to which the receiving end corresponding to the maximum voltage amplitude is connected.
According to the data verification method for near field communication, the electronic equipment can quickly judge the target NFC antenna closest to the reader-writer through the voltage amplitude of the receiving end, and the efficiency and accuracy of safety verification of the electronic equipment are improved.
In an embodiment, on the basis of the above embodiment, when the security verification of the electronic device passes, the electronic device sends data to be sent to the reader through the target NFC antenna in the last approach scene. Continuing with the example of the electronic device in fig. 3, when the electronic device approaches the reader/writer for the fourth time, the security verification passes, and the target NFC antenna ANT1 that approaches the reader/writer for the fourth time may be used as an antenna for sending data, and the data to be sent is sent to the reader/writer through the antenna.
According to the data verification method for near field communication, the electronic equipment selects the target NFC antenna closest to the reader-writer to transmit data, so that the reader-writer can receive a stronger signal, and the transmission reliability of data to be transmitted is improved.
In one embodiment, on the basis of the above embodiment, in the case that the electronic device fails the security verification, a card swiping again instruction can be sent to the user; the card swiping again indication is used for indicating a user to enable the electronic equipment to be close to the reader-writer.
The electronic equipment can prompt the user to swipe the card again under the condition that the safety verification fails; the prompt mode may be a voice prompt or a vibration prompt, and is not limited herein. After receiving the card swiping again instruction, the user can approach the card again according to the preset approaching sequence of the NFC antenna, so that the electronic equipment can return to execute the step of obtaining the security verification code to perform security verification.
According to the data verification method of the near field communication, the electronic equipment sends the card swiping again instruction to the user under the condition that the safety verification is not passed, so that the situation that the card swiping of the user is failed can be avoided, the card swiping is not determined to be completed for several times in the safety verification process, the user can conduct the card swiping in order according to the preset NFC antenna approaching sequence after the card swiping again instruction, and the card swiping success rate is improved.
In an embodiment, on the basis of the above embodiments, there is provided a data verification method for near field communication, as shown in fig. 6, including:
s401, obtaining voltage amplitudes output by each receiving end of the electronic equipment under the condition of approaching to the scene each time.
S402, determining the NFC antenna corresponding to the receiving end with the maximum voltage amplitude as a target NFC antenna.
And S403, determining a verification mark corresponding to the target NFC antenna under the approaching scene each time based on the mapping relation.
S404, arranging the verification marks according to the time sequence of the approach scene each time, and obtaining the safety verification code.
S405, performing security verification on the electronic equipment according to the security verification code and a preset password; if the security verification is passed, executing S406; if the security authentication is not passed, S407 is executed.
And S406, sending the data to be sent to the reader-writer through the target NFC antenna in the last approaching scene.
And S407, sending a card swiping again instruction to the user.
The implementation principle and technical effect of the data verification method for near field communication are similar to those of the embodiments, and are not described herein again.
It should be understood that although the various steps in the flow charts of fig. 2-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least some of the steps in fig. 2-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
Fig. 7 is a block diagram of a data verification apparatus for near field communication according to an embodiment, where the apparatus is applied to an electronic device, and the electronic device includes at least two NFC antennas. As shown in fig. 7, the above apparatus includes:
the determining module 10 is configured to determine, when the electronic device approaches the reader/writer for multiple times, a target NFC antenna closest to the reader/writer in a scene of approach each time;
the obtaining module 20 is configured to obtain a security verification code of the electronic device according to the target NFC antenna in each approaching scene and a preset mapping relationship; the mapping relation comprises corresponding relations between different NFC antennas and different verification marks;
and the verification module 30 is configured to perform security verification on the electronic device according to the security verification code and a preset password.
In an embodiment, on the basis of the foregoing embodiment, the determining module 10 is specifically configured to: acquiring voltage amplitudes output by each receiving end of the electronic equipment under each approaching scene; one receiving end corresponds to one NFC antenna; and determining the NFC antenna corresponding to the receiving end with the maximum voltage amplitude as a target NFC antenna.
In an embodiment, on the basis of the foregoing embodiment, the obtaining module 20 is specifically configured to: determining a verification mark corresponding to the target NFC antenna under each approaching scene based on the mapping relation; and arranging the verification marks according to the time sequence of each time close to the scene to obtain the safety verification code.
In an embodiment, on the basis of the above embodiment, the verification module 30 is specifically configured to: comparing the security verification code with a preset password according to bits; and if each bit of the security verification code is the same as that of the preset password, determining that the electronic equipment passes the security verification.
In an embodiment, on the basis of the above embodiment, as shown in fig. 8, the apparatus further includes a sending module 40, configured to: and under the condition that the electronic equipment passes the safety verification, sending the data to be sent to the reader-writer through the target NFC antenna in the last approaching scene.
In an embodiment, on the basis of the above embodiment, the verification module 30 is further configured to: and if the times that the electronic equipment approaches the reader-writer are less than the preset times, determining that the safety verification of the electronic equipment does not pass.
In one embodiment, on the basis of the above-described embodiments, the electronic device includes a first NFC antenna and a second NFC antenna, which are respectively located at the top and the bottom of the electronic device housing.
In an embodiment, on the basis of the above embodiment, as shown in fig. 9, the apparatus further includes an indication module 50, which sends a card swiping again indication to the user in case that the electronic device security verification fails; the swipe again indication is used to instruct the user to bring the electronic device close to the reader/writer.
The division of each module in the data verification device for near field communication is only used for illustration, and in other embodiments, the data verification device for near field communication may be divided into different modules as needed to complete all or part of the functions of the data verification device for near field communication.
For specific limitations of the data verification apparatus for near field communication, reference may be made to the above limitations of the data verification method for near field communication, which are not described herein again. The respective modules in the data verification apparatus for near field communication described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, an electronic device is provided, which includes a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to perform the steps of the method described in the embodiments of the present application.
Fig. 10 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 10, the electronic apparatus includes a processor and a memory connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory may include non-volatile storage media and internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program is executable by a processor for implementing a data verification method for near field communication provided in the following embodiments. The internal memory provides a cached operating environment for operating system computer programs in the non-volatile storage medium. The electronic device may be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a Point of Sales (POS), a vehicle-mounted computer, and a wearable device.
The implementation of each module in the data verification apparatus for near field communication provided in the embodiments of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. Program modules comprising the computer program may be stored on a memory of the electronic device. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the data validation method for near field communication.
A computer program product containing instructions which, when run on a computer, cause the computer to perform a data verification method for near field communication.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A data verification method of near field communication is applied to electronic equipment, and is characterized in that the electronic equipment comprises at least two Near Field Communication (NFC) antennas, and the method comprises the following steps:
when the electronic equipment approaches a reader-writer for multiple times, determining a target NFC antenna closest to the reader-writer in each approaching scene; the target NFC antenna is an NFC antenna with the largest voltage amplitude output by a receiving end after the electronic equipment receives the instruction sent by the reader-writer;
acquiring a security verification code of the electronic equipment according to the target NFC antenna in each approaching scene and a preset mapping relation; wherein the mapping relationship comprises a corresponding relationship between different NFC antennas and different authentication marks; the safety verification code is related to the sequence of at least two NFC antennas approaching the reader-writer;
according to the security verification code and a preset password, performing security verification on the electronic equipment; the safety verification is used for determining whether the electronic equipment performs data exchange with the reader-writer or not; the password is set by the user and stored in the electronic equipment;
and under the condition that the electronic equipment passes the safety verification, sending data to be sent to the reader-writer through the target NFC antenna in the last approaching scene.
2. The method of claim 1, wherein the determining the target NFC antenna closest to the reader/writer in each approach scenario comprises:
acquiring voltage amplitudes output by each receiving end in the electronic equipment under each approaching scene; one receiving end corresponds to one NFC antenna;
and determining the NFC antenna corresponding to the receiving end with the maximum voltage amplitude as the target NFC antenna.
3. The method according to claim 1, wherein obtaining the security verification code of the electronic device according to the target NFC antenna in each approaching scene and a preset mapping relationship comprises
Determining a verification mark corresponding to the target NFC antenna under each approaching scene based on the mapping relation;
and arranging the verification marks according to the time sequence of each time close to the scene to obtain the safety verification code.
4. The method according to any one of claims 1-3, wherein the performing security authentication on the electronic device according to the security authentication code and a preset password comprises:
comparing the security verification code with the preset password according to the position;
and if each digit of the safety verification code is the same as that of the preset password, determining that the safety verification of the electronic equipment is passed.
5. The method according to any one of claims 1-3, further comprising:
and if the times that the electronic equipment approaches the reader-writer are less than the preset times, determining that the safety verification of the electronic equipment does not pass.
6. The method of any of claims 1-3, wherein the electronic device includes first and second NFC antennas located at the top and bottom of the electronic device housing, respectively.
7. The method according to any one of claims 1-3, further comprising:
under the condition that the electronic equipment security verification is not passed, sending a card swiping again instruction to a user; the card swiping again indication is used for indicating a user to enable the electronic equipment to be close to the reader-writer.
8. A near field communication device is applied to electronic equipment; characterized in that, including at least two NFC antennas in the electronic equipment, the device includes:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a target NFC antenna which is closest to a reader-writer in a scene of approaching each time when the electronic equipment approaches the reader-writer for multiple times; the target NFC antenna is an NFC antenna with the largest voltage amplitude output by a receiving end after the electronic equipment receives the instruction sent by the reader-writer;
the acquisition module is used for acquiring a security verification code of the electronic equipment according to the target NFC antenna in each approaching scene and a preset mapping relation; wherein the mapping relationship comprises a corresponding relationship between different NFC antennas and different authentication marks; the security verification codes are related to the sequence of at least two NFC antennas approaching the reader-writer;
the verification module is used for performing security verification on the electronic equipment according to the security verification code and a preset password; the safety verification is used for determining whether the electronic equipment performs data exchange with the reader-writer or not; the password is set by the user and stored in the electronic equipment;
and the sending module is used for sending the data to be sent to the reader-writer through the target NFC antenna in the last approaching scene under the condition that the electronic equipment passes the safety verification.
9. An electronic device comprising a memory and a processor, the memory having stored therein a computer program, wherein the computer program, when executed by the processor, causes the processor to perform the steps of the data authentication method for near field communication according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202110632144.9A 2021-06-07 2021-06-07 Data verification method, device, equipment and readable storage medium for near field communication Active CN113422622B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110632144.9A CN113422622B (en) 2021-06-07 2021-06-07 Data verification method, device, equipment and readable storage medium for near field communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110632144.9A CN113422622B (en) 2021-06-07 2021-06-07 Data verification method, device, equipment and readable storage medium for near field communication

Publications (2)

Publication Number Publication Date
CN113422622A CN113422622A (en) 2021-09-21
CN113422622B true CN113422622B (en) 2022-07-12

Family

ID=77714005

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110632144.9A Active CN113422622B (en) 2021-06-07 2021-06-07 Data verification method, device, equipment and readable storage medium for near field communication

Country Status (1)

Country Link
CN (1) CN113422622B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205068417U (en) * 2015-09-17 2016-03-02 深圳市鼎芯无限科技有限公司 NFC label anti -counterfeit device and NFC label system that guards against falsification
CN107615674A (en) * 2015-05-15 2018-01-19 夏普株式会社 Information processor, the control method of information processor and control device
CN110073358A (en) * 2016-09-27 2019-07-30 夏普株式会社 Anneta module, display device, antenna driving method, control program and recording medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790632B (en) * 2011-05-19 2015-07-08 深圳富泰宏精密工业有限公司 Mobile equipment having near field communication protection function and protection method for mobile equipment
US20130009756A1 (en) * 2011-07-07 2013-01-10 Nokia Corporation Verification using near field communications
CN102984698A (en) * 2011-09-06 2013-03-20 中兴通讯股份有限公司 Near field communication safety protection method and mobile communication terminal
CN106255102B (en) * 2016-07-26 2019-12-27 Oppo广东移动通信有限公司 Terminal equipment identification method and related equipment
CN112364673A (en) * 2020-11-25 2021-02-12 Oppo广东移动通信有限公司 Information verification method, terminal equipment, NFC verification device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107615674A (en) * 2015-05-15 2018-01-19 夏普株式会社 Information processor, the control method of information processor and control device
CN205068417U (en) * 2015-09-17 2016-03-02 深圳市鼎芯无限科技有限公司 NFC label anti -counterfeit device and NFC label system that guards against falsification
CN110073358A (en) * 2016-09-27 2019-07-30 夏普株式会社 Anneta module, display device, antenna driving method, control program and recording medium

Also Published As

Publication number Publication date
CN113422622A (en) 2021-09-21

Similar Documents

Publication Publication Date Title
US9813116B2 (en) Secure near field communication solutions and circuits
US20100235629A1 (en) Information storage medium, authentication data generation method, and medium authentication system
KR20190093609A (en) Method and apparatus for processing a service
JP4891708B2 (en) Information communication medium
CN104809618A (en) Radio frequency identification tag-based product anti-counterfeiting method
CN101896916A (en) Interaction between secured and unsecured environments
KR101062011B1 (en) Smart card and user authentication method with signature information input unit
US9978056B2 (en) Smart card having multiple payment instruments
CN103544114A (en) Multiple M1 card control system based on single CPU card and control method thereof
CN113422622B (en) Data verification method, device, equipment and readable storage medium for near field communication
CN110808950A (en) Message processing method and device, computer equipment and storage medium
US9824246B2 (en) Radio frequency identification tag having input device
CN113541741A (en) Analog card switching method and device, electronic equipment and storage medium
US8677137B2 (en) Communication device, communication method, information processing device, information processing method, program, and communication system
US9542632B2 (en) IC card, portable electronic device, and reader/writer
CN103870958A (en) Mobile payment method and mobile payment exclusive device
CN113392062B (en) Data storage method and device, electronic equipment and computer readable storage medium
CN111885568B (en) Loading method and device of near field communication configuration parameters and electronic equipment
US20060135126A1 (en) Data synchronization control method between a user equipment and a user authentication card and a corresponding user authentication card
KR102195931B1 (en) Method and system for smartphone payment based on bluetooth communication
JP2010020513A (en) Sim card, portable terminal, and reader/writer device
RU184423U1 (en) MOBILE CRIPTOTERMINAL
US11901970B1 (en) Near-field communication functionality for partial applications accessed over a network
US20200193433A1 (en) System and method for securely processing verification data
EP2940647A1 (en) Method for processing issuance of mobile credit card

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220816

Address after: 570105 No. a5002-896, zone A1, Fuxing City, No. 32, Binhai Avenue, Longhua District, Haikou City, Hainan Province

Patentee after: Hainan opper Communication Technology Co.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

TR01 Transfer of patent right