CN111711942B - Electronic device, control method of electronic device, and readable storage medium - Google Patents

Electronic device, control method of electronic device, and readable storage medium Download PDF

Info

Publication number
CN111711942B
CN111711942B CN202010464426.8A CN202010464426A CN111711942B CN 111711942 B CN111711942 B CN 111711942B CN 202010464426 A CN202010464426 A CN 202010464426A CN 111711942 B CN111711942 B CN 111711942B
Authority
CN
China
Prior art keywords
signal amplitude
processor
comparator
nfc antenna
nfc
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
CN202010464426.8A
Other languages
Chinese (zh)
Other versions
CN111711942A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010464426.8A priority Critical patent/CN111711942B/en
Publication of CN111711942A publication Critical patent/CN111711942A/en
Application granted granted Critical
Publication of CN111711942B publication Critical patent/CN111711942B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10297Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves arrangements for handling protocols designed for non-contact record carriers such as RFIDs NFCs, e.g. ISO/IEC 14443 and 18092
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Electromagnetism (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Near-Field Transmission Systems (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses electronic equipment, a control method of the electronic equipment and a readable storage medium, and belongs to the technical field of communication. The electronic equipment comprises an NFC antenna, a signal amplitude detection circuit, an analog-to-digital converter, a comparator, a processor and an information prompt device; the NFC antenna is electrically connected with the signal amplitude detection circuit, the signal amplitude detection circuit is simultaneously electrically connected with the comparator and the analog-to-digital converter, the analog-to-digital converter is simultaneously electrically connected with the comparator and the processor, the comparator is electrically connected with the processor, and the processor is electrically connected with the information prompt device. In this application embodiment, when the user simulates the card on the electronic equipment, the equipment can learn the variation trend of the signal amplitude of the NFC antenna, and the processor can control the information prompting device according to the variation trend of specific differences to remind the user to move the NFC card to the correct direction, so that time waste caused by random blind movement is avoided, and the reliability of data exchange is improved.

Description

Electronic device, control method of electronic device, and readable storage medium
Technical Field
The present application belongs to the field of communication technologies, and in particular, to an electronic device, a control method of the electronic device, and a readable storage medium.
Background
Near Field Communication (NFC) technology is applied to access control management, identity recognition, electronic payment, information exchange, and other scenes due to the characteristics of short distance, high bandwidth, low energy consumption, high security, and the like.
One mode of operation of the NFC technology is an analog Card mode (Card emulation), and in this mode, an electronic device supporting the NFC technology can serve as an entity NFC Card, for example, replace a bus Card to take a bus and a subway, replace an access Card to swipe a gate, and the like. In order to replace the entity NFC card with the electronic device, the user needs to attach the entity NFC card to the electronic device supporting the NFC technology, so as to copy data of the entity NFC card, thereby completing the simulation process of the entity NFC card. In the above card simulation process, the existing NFC technology has certain requirements on the positions and distances of the NFC antenna in the physical NFC card and the electronic device, and requires that the physical NFC card and the NFC antenna are close enough to exchange data.
However, when actually simulating a card, the inventors found that at least the following problems existed in the prior art: the user often is difficult to learn the accurate position of NFC antenna in electronic equipment, needs to move entity NFC card in different position many times repeatedly, just can accomplish the data exchange of card and electronic equipment, leads to consuming time longer, can cause the data exchange failure because of overtime even.
Disclosure of Invention
The embodiment of the application aims to provide electronic equipment and a control method of the electronic equipment, and the problem that the time consumption of a user card simulation process is long can be solved.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides an electronic device, where the electronic device includes an NFC antenna, a signal amplitude detection circuit, an analog-to-digital converter, a comparator, a processor, and an information prompt device;
the NFC antenna is electrically connected with the signal amplitude detection circuit, the signal amplitude detection circuit is simultaneously electrically connected with the comparator and the analog-to-digital converter, the analog-to-digital converter is simultaneously electrically connected with the comparator and the processor, the comparator is electrically connected with the processor, and the processor is electrically connected with the information prompt device.
In a second aspect, an embodiment of the present application provides a control method for an electronic device, where the control method is used for the electronic device in the first aspect, and the method includes:
when the NFC card moves relative to the NFC antenna, the signal amplitudes of the NFC antenna at different moments are acquired successively according to a preset time interval;
determining a variation trend of the signal amplitude;
and generating prompt information to prompt a user to enable the NFC card to be close to the NFC antenna according to the change trend.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the second aspect.
In a fourth aspect, embodiments of the present application provide a read storage medium on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the second aspect.
In a fifth aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the second aspect.
In this embodiment of the application, when a user simulates a card on an electronic device, as an NFC card moves relative to an NFC antenna, the signal amplitude of the NFC antenna changes. The signal amplitude detection circuit in the electronic equipment can detect the signal amplitude received by the NFC antenna, the comparator can compare the signal amplitudes at different successive moments, so that the variation trend of the signal amplitude of the NFC antenna is known, the processor can control the information prompt device to remind a user to move the NFC card to the correct direction according to specific different variation trends, time waste caused by random blind movement is avoided, and the reliability of data exchange is improved.
Drawings
Fig. 1 is a block diagram of an electronic device according to an embodiment of the present application;
fig. 2 is a flowchart of a control method of an electronic device according to an embodiment of the present application;
fig. 3 is a schematic diagram of the movement of the NFC card relative to the NFC antenna in the embodiment of the present application;
fig. 4 is a schematic diagram of prompt information when an NFC card approaches an NFC antenna in the embodiment of the present application;
fig. 5 is a schematic diagram of prompt information when the NFC card is away from the NFC antenna in the embodiment of the present application;
fig. 6 is a block diagram of another electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The electronic device provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof. It should be noted that the electronic device disclosed in the embodiment of the present application may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA) that supports the NFC technology, or may be an immovable electronic device.
Referring to fig. 1, a block diagram of an electronic device according to an embodiment of the present application is shown, where the electronic device includes an NFC antenna 10, a signal amplitude detection circuit 11, an analog-to-digital converter 12, a comparator 13, a processor 14, and an information prompting device 15;
the NFC antenna 10 is electrically connected to the signal amplitude detection circuit 11, the signal amplitude detection circuit 11 is simultaneously electrically connected to the comparator 13 and the analog-to-digital converter 12, the analog-to-digital converter 12 is simultaneously electrically connected to the comparator 13 and the processor 14, the comparator 13 is electrically connected to the processor 14, and the processor 14 is electrically connected to the information prompt device 15.
Specifically, as shown in fig. 1, in the electronic device disclosed in the embodiment of the present application, the NFC antenna 10 is an antenna for receiving or sending data in the electronic device, and the NFC antenna may be a multi-turn coil formed by winding a copper wire, and may be packaged as an independent sheet component, so as to be conveniently attached inside a housing of the electronic device. The signal amplitude detection circuit 11 is used for dynamically detecting the amplitude of the signal received by the NFC antenna in real time. Specifically, in the process of simulating the card, the magnetic field generated by the NFC antenna on one side of the electronic device mainly induces current in the entity NFC card in the magnetic field, so that data exchange is realized based on the principle of electromagnetic interaction. It can be understood that, the closer to the NFC antenna, the stronger the magnetic field intensity, and the position of the physical NFC card is equivalent to inserting a metal material into the magnetic field, so that the magnetic field intensity is also enhanced. Thus, the signal amplitude detection circuit 11 can be used to dynamically detect the magnetic field strength of the NFC antenna in real time. The signal amplitude obtained by the signal amplitude detection circuit 11 is an analog signal, and needs to be converted by the analog-to-digital converter 12 before being temporarily stored in the processor 14. Comparator 13 can compare two signal amplitude of different moments, according to the comparison result, can learn, and signal amplitude is the grow or weaken, and comparator 13 can transmit the comparison result to processor 14, and processor 14 can be based on a series of comparison results, control information prompting device 15, sends different types of suggestion information to, at the in-process of simulating the card, suggestion user removes entity NFC card to the correct direction.
In this embodiment of the application, when a user simulates a card on an electronic device, as an NFC card moves relative to an NFC antenna, the signal amplitude of the NFC antenna changes. The signal amplitude detection circuit in the electronic equipment can detect the signal amplitude received by the NFC antenna, the comparator can compare the signal amplitude at different moments in sequence, so that the change trend of the signal amplitude of the NFC antenna is known, the processor can control the information prompt device according to the specific different change trends to remind a user to move the NFC card to the correct direction, time waste caused by random blind movement is avoided, and the reliability of data exchange is improved.
Alternatively, referring to fig. 1, the comparator 13 includes a first input terminal 131, a second input terminal 132 and an output terminal 133, the output terminal of the signal amplitude detection circuit 11 is electrically connected to the first input terminal 131, the output terminal of the analog-to-digital converter 12 is electrically connected to the second input terminal 132, and the output terminal 133 of the comparator 13 is electrically connected to the processor 14.
Specifically, as shown in fig. 1, the comparator 13 may compare the amplitudes of the signals at two different time instants, and the amplitudes of the signals at the two different time instants enter the comparator 13 through two input ports respectively. For example, at the time t1, the signal amplitude detection circuit 11 obtains a first signal amplitude D1, the first signal amplitude D1 enters the comparator 13 through the first input terminal 131, and at the same time, the first signal amplitude D1 is converted by the analog-to-digital converter 12 and enters the processor 14 for temporary storage, that is, at the time t1, two signals compared by the comparator 13 are the first signal amplitude D1 of the first input terminal 131 and a null signal of the second input terminal 132. It can be understood that when the time is changed, signals at two input ends of the comparator 13 are also changed, so as to output different comparison results, which indicate the signal amplitude change condition of the NFC antenna, that is, indicate the movement direction of the NFC card relative to the NFC antenna.
Optionally, the analog-to-digital converter 12 is bidirectionally electrically connected to the processor 14, and the analog-to-digital converter 12 is configured to input a digital signal to the processor 14 and receive a digital signal from the processor 14.
Specifically, in order to input signal amplitudes at different times to the comparator 13, for a signal amplitude acquired at the same time, on one hand, the signal amplitude is directly input to the comparator 13, on the other hand, the signal amplitude is input to the processor 14 after being converted by the analog-to-digital converter 12 and temporarily stored in the processor 14, after a preset time, and after a new signal amplitude is acquired at another time, the signal amplitude temporarily stored in the processor 14 can be sent to the comparator 13, so that delayed sending of the signal amplitude at a certain time can be realized by using the temporary storage time of the processor 14, and the comparator 13 can compare and judge signal amplitudes acquired successively at two different times.
Optionally, the information prompting device 15 includes at least one of a display screen, a speaker, and a vibration motor.
In particular, when the information prompting device 15 is a display screen, the user can be prompted with the correct direction of movement on the screen by text, for example, by text plus arrow symbols indicating the correct direction to the user. When the information prompting device 15 is a loudspeaker, a voice prompt can be sent to inform the user of the correct moving direction. Further, when the information presentation device 15 is a vibration motor, the magnitude of the vibration amplitude may be changed to present the user with the correct movement direction. Of course, in practice, the different types of information presentation devices 15 described above may be combined to present information to the user. For example, when the user moves in a wrong direction, the display screen prompts correction, and when the user moves in a correct direction, the vibration motor prompts the user to continue moving. The various information prompting devices 15 provide various information prompting modes, are suitable for different users and scenes, and are easy to realize personalized setting.
With reference to fig. 2, an embodiment of the present application further provides a control method for an electronic device, where the control method is used for any one of the foregoing electronic devices, and the method includes:
and 101, when the NFC card moves relative to the NFC antenna, sequentially acquiring the signal amplitude of the NFC antenna according to a preset time interval.
When the handheld entity NFC card of user moved for the NFC antenna of electronic equipment, when the entity NFC card was close to or kept away from the NFC antenna, all can arouse the change of the peripheral magnetic field intensity of NFC antenna 10, and at same spatial position, the change of intensity can take place for the magnetic field intensity of this position at different moments. The signal amplitude detection circuit 11 may successively obtain the signal amplitude of the NFC antenna 10 according to a preset time interval (for example, 0.05 second), exemplarily, the signal amplitude may be measured by a magnetic field intensity at a preset position, for example, the detected magnetic field intensity is a magnetic field intensity at a position 3mm away from a coil plane of the NFC antenna 10, when there is no external electromagnetic device, the magnetic field intensity at the preset position is a stable and unchangeable value, in a process of simulating a card by a user, when the entity NFC card is close to the preset position, the magnetic field intensity at the position is enhanced, and when the entity NFC card is far away from the preset position, the magnetic field intensity at the position is weakened. Therefore, from the time dimension, the signal amplitudes acquired successively according to the preset time interval may be different, and such a changed signal amplitude may be used to indicate the distance relationship between the entity NFC card and the NFC antenna 10.
And step 102, determining the variation trend of the signal amplitude.
From the above process, it can be appreciated that the trend of the signal amplitude may indicate whether the physical NFC card is close to or far from the NFC antenna 10. Therefore, the acquired signal amplitudes at different moments can be arranged and compared in a time sequence by taking time as a dimension, and whether the change trend of the signal amplitude is enhanced or weakened can be known.
Specifically, step 102 may be performed with reference to the following method:
step a, inputting the first signal amplitude at the first time into one input end of the comparator 13 and the processor 14 respectively.
For the comparator, two input signals can be received, and the comparison judgment is performed on the two input signals to output the comparison result. At the moment of the user card simulation process, the signal amplitude is continuously changed, the signal amplitude is sampled according to a preset time interval, a plurality of discrete signal amplitudes can be obtained, the discrete signal amplitudes are respectively the signal amplitude at each moment, the signal amplitude at each moment is input into one input end of the comparator 13 and the processor 14, the signal input into the comparator 13 is directly compared with another input signal at the current moment, and the signal input into the processor 14 is compared with a subsequent signal at the next moment. Thus, the signal amplitude at each time is involved in the comparison process of the signal amplitude with the original null signal or with the signal at the immediately preceding time.
And b, comparing the signals received by the two input ends by the comparator 13, and outputting a comparison result to the processor 14.
The two signal amplitudes compared in the comparator 13 are always two signal amplitudes one after the other with a predetermined time interval. The comparison result of the amplitudes of every two adjacent signals is either constant or large or small in time sequence. Such comparison results may be output to the processor 14, and the processor 14 may analyze the output results to determine the variation trend of the signal amplitude.
And c, transmitting the first signal amplitude in the processor to the other input end of the comparator, and respectively inputting a second signal amplitude at a second moment to one input end of the comparator and the processor, wherein the second moment is separated from the first moment by the preset time, and the second moment is later than the first moment.
The signal amplitude detection circuit 11 acquires a first signal amplitude at a first timing, and after a preset time interval elapses as time passes, the signal amplitude detection circuit 11 acquires a second signal amplitude at a second timing, that is, at a time point of the second timing later than the first timing, the second signal amplitude being input to one input terminal of the comparator 13 and the processor 14, respectively.
Since the comparator 13 compares the signal amplitudes at two different time instants, one signal that the comparator 13 has acquired at the second time instant is the second signal amplitude, and the other signal that is compared with the second signal amplitude is derived from the first signal amplitude temporarily stored by the processor 14. The processor 14 may trigger the processor 14 to send the temporarily stored signal amplitude of the previous time to the comparator 13 through another input terminal of the comparator 13 when receiving the comparison result of the upper side, that is, the first signal amplitude in the processor 14 is transmitted to another input terminal of the comparator 13 and is input into the comparator 13. Thus, the comparator 13 always has two input signals at different times.
And d, iteratively updating the input signals of the two input ends of the comparator 13, and continuously outputting a plurality of comparison results.
In the process of the user simulating the card, the comparator 13 receives the input signals at two different times at each time according to the preset time interval. The input signal to the comparator 13 is updated iteratively as the time instants are updated over time, and accordingly there is a comparison result for each time instant. The comparator 13 can output the same number of comparison results for the processor 14 to analyze at how many sampling instants the user has simulated the card.
And e, determining the variation trend of the signal amplitude according to a plurality of comparison results at different moments.
At each moment, a comparison result of two signal amplitudes at the current moment and the previous moment is generated, and for a plurality of generated comparison results, the comparison results are related front and back, so that the change trend of the signal amplitudes can be intuitively known.
For example:
in the case where a plurality of the comparison results are successively high level, the signal amplitude is increased;
in the case where a plurality of the comparison results are continuously low level, the signal amplitude is weakened;
the comparison result is the difference between the signal amplitude of the end of the comparator 13 connected to the signal amplitude detection circuit 11 and the signal amplitude of the end of the comparator 13 connected to the analog-to-digital converter 12.
The following description will be made with reference to different comparative result examples. Taking the preset time interval as 0.05 second as an example, suppose that the user approaches the physical NFC card to the NFC antenna 10 from the time t1, a series of signal amplitudes at different times are obtained, respectively, as shown in table 1 below.
TABLE 1
t1 t2 t3 t4 t5
First input terminal 131 1A/m 2A/m 4A/m 7A/m 8A/m
Second input terminal 132 0 1A/m 2A/m 4A/m 7A/m
Output
133 1A/m 1A/m 2A/m 3A/m 1A/m
Level state High level of voltage High level High level High level High level
With reference to table 1, at time t1, the user starts to bring the physical NFC card close to the NFC antenna 10, at this time, the signal amplitude acquired by the signal amplitude detection circuit 11 is 1A/m, at this time, since no data is stored in the processor 14, the second input end 132 is 0, the comparison result is the signal amplitude difference between the two input ends of the comparator 13, that is, 1A/m of the output end 133, when the value is positive, the value may be represented by a high level 1, as can be seen from table 1, as long as the output end 133 continuously outputs a high level, it means that the signal amplitude is increased from 1A/m to 8A/m from t1 to t5, that is, it can be stated that the physical NFC card is close to the NFC antenna 10.
Also taking the preset time interval of 0.05 second as an example, suppose that the user moves the physical NFC card away from the NFC antenna 10 from time t1, and a series of signal amplitudes at different times are obtained, respectively, as shown in table 2 below.
TABLE 2
t1 t2 t3 t4 t5
First input terminal 131 8A/m 7A/m 4A/m 2A/m 1A/m
Second input terminal 132 0 8A/m 7A/m 4A/m 2A/m
Output
133 8A/m -1A/m -3A/m -2A/m -1A/m
Level state High level Low level of electricity Low level of electricity Low level of electricity Low level of electricity
With reference to table 2, at a time t1, the user starts to move the entity NFC card away from the NFC antenna 10, at this time, the signal amplitude obtained by the signal amplitude detection circuit 11 is 8A/m, at this time, since no data is stored in the processor 14, the second input end 132 is 0, and the comparison result is a signal amplitude difference between two input ends of the comparator 13, that is, 8A/m of the output end 133, when the value is negative, the value may be represented by low level 0, as can be seen from table 2, as long as the output end 133 continuously outputs low level, it means that the signal amplitude is reduced from 8A/m to 1A/m from t1 to t5, that is, it can be stated that the entity NFC card is moving away from the NFC antenna 10.
Therefore, through continuous comparison and analysis of the level states of the comparison results, it can be known whether the signal amplitude is increased or decreased, and the movement direction of the physical NFC card relative to the NFC antenna 10 can also be known.
It should be noted that, in another way opposite to the way of calculating the comparison result given in the above example, the difference between the signal amplitudes of the end of the comparator 13 connected to the analog-to-digital converter 12 and the end of the comparator 13 connected to the signal amplitude detection circuit 11 may be used as the comparison result, and at this time, if a plurality of comparison results are continuously at a high level, it indicates that the signal amplitudes are weakened; if a plurality of comparison results are continuously low level, the signal amplitude is enhanced. Any of the above manners for calculating the comparison result can be flexibly selected by those skilled in the art for determining the variation trend of the signal amplitude, and will not be described herein again.
And 103, generating prompt information according to the change trend to prompt a user to enable the NFC card to approach the NFC antenna.
The trend of the signal amplitude changes differently, and correspondingly, the prompt information given to the user should also be different. Specifically, under the condition that the signal amplitude is enhanced, first prompt information is generated, and the first prompt information is used for prompting a user to move the NFC card continuously along the original direction. The signal amplitude is increased, which means that the NFC card is closer to the center of the NFC antenna 10, and the NFC card needs to keep moving continuously in the original direction.
And generating second prompt information under the condition that the signal amplitude is weakened, wherein the second prompt information is used for prompting the user to move the NFC card in the direction opposite to the original direction. The reduced signal amplitude means that the NFC card is further away from the center of the NFC antenna 10, which is not conducive to data exchange, and therefore, the user needs to be prompted to move the NFC card in the opposite direction to approach the center of the NFC antenna 10.
Optionally, the prompt information includes at least one of image-text information, audio information, and vibration information.
In the electronic equipment, graphic and text information can be prompted to a user through a display screen, for example, a display text of 'please continue to move along the current direction' or 'please move along the opposite direction', audio information can also be prompted to the user through a loudspeaker, for example, voice broadcasting of 'please continue to move along the current direction' or 'please move along the opposite direction', and vibration touch feeling can also be provided to the user through a vibration motor, for example, when the moving direction of the user is correct, the vibration is slight, and when the moving direction of the user is wrong, the vibration is violent.
As shown in fig. 3, an illustration of moving the NFC card closer to the NFC antenna 10 in the a direction or moving the NFC card away from the NFC antenna 10 in the B direction is also given. Fig. 4 is a prompt information diagram when the NFC card approaches the NFC antenna 10 along the a direction, and fig. 5 is a prompt information diagram when the NFC card moves away from the NFC antenna 10 along the B direction.
In this embodiment of the application, when a user simulates a card on an electronic device, as an NFC card moves relative to an NFC antenna, the signal amplitude of the NFC antenna changes. The signal amplitude detection circuit in the electronic equipment can detect the signal amplitude received by the NFC antenna, the comparator can compare the signal amplitude at different moments in sequence, so that the change trend of the signal amplitude of the NFC antenna is known, the processor can control the information prompt device according to the specific different change trends to remind a user to move the NFC card to the correct direction, time waste caused by random blind movement is avoided, and the reliability of data exchange is improved.
Optionally, an electronic device is further provided in this embodiment of the present application, and includes a processor 110, a memory 109, and a program or an instruction stored in the memory 109 and capable of being executed on the processor 110, where the program or the instruction is executed by the processor 110 to implement each process of the above control method embodiment, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing the embodiment of the present application.
The electronic device 100 includes, but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.
Those skilled in the art will appreciate that the electronic device 100 may further comprise a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The input unit 104 may be a signal amplitude detection circuit in this embodiment, and is configured to successively acquire the signal amplitude of the NFC antenna according to a preset time interval when the NFC card moves relative to the NFC antenna.
A processor 110 for determining a trend of change in the signal amplitude; and generating prompt information to prompt a user to enable the NFC card to be close to the NFC antenna according to the change trend.
In the embodiment of the application, when a user simulates a card on an electronic device, the signal amplitude of the NFC antenna changes along with the movement of the NFC card relative to the NFC antenna. The signal amplitude detection circuit in the electronic equipment can detect the signal amplitude received by the NFC antenna, the comparator can compare the signal amplitude at different moments in sequence, so that the change trend of the signal amplitude of the NFC antenna is known, the processor can control the information prompt device according to the specific different change trends to remind a user to move the NFC card to the correct direction, time waste caused by random blind movement is avoided, and the reliability of data exchange is improved.
Optionally, the processor 110 is further configured to input a first signal amplitude at a first time to one input terminal of the comparator and the processor, respectively;
the comparator compares the amplitudes of the signals received by the two input ends and outputs a comparison result to the processor;
transmitting the first signal amplitude in the processor to the other input end of the comparator, and respectively inputting a second signal amplitude at a second moment to one input end of the comparator and the processor, wherein the second moment is separated from the first moment by the preset time, and the second moment is later than the first moment;
iteratively updating input signals of two input ends of the comparator, and continuously outputting a plurality of comparison results;
and determining the variation trend of the signal amplitude according to a plurality of comparison results at different moments.
Optionally, the processor 110 is further configured to determine that the signal amplitude is increased if a plurality of the comparison results are continuously high; determining that the signal amplitude is weakened in a case where a plurality of the comparison results are continuously low level; the comparison result is the difference between the signal amplitude of the end of the comparator connected with the signal amplitude detection circuit and the signal amplitude of the end of the comparator connected with the analog-to-digital converter.
Optionally, the processor 110 is further configured to generate a first prompt message in a case that it is determined that the signal amplitude is enhanced, where the first prompt message is used to prompt a user to move the NFC card continuously in an original direction; and under the condition that the amplitude of the signal is determined to be weakened, generating second prompt information, wherein the second prompt information is used for prompting a user to move the NFC card along the direction opposite to the original direction.
Alternatively, the audio output unit 103 may play audio information, the display unit 106 may display graphic information, and the vibration information may be output through a vibration motor.
In this embodiment of the application, when a user simulates a card on an electronic device, as an NFC card moves relative to an NFC antenna, the signal amplitude of the NFC antenna changes. The signal amplitude detection circuit in the electronic equipment can detect the signal amplitude received by the NFC antenna, the comparator can compare the signal amplitudes at different successive moments, so that the variation trend of the signal amplitude of the NFC antenna is known, the processor can control the information prompt device to remind a user to move the NFC card to the correct direction according to specific different variation trends, time waste caused by random blind movement is avoided, and the reliability of data exchange is improved. In addition, different types of prompt messages can be sent to the user through different hardware, the using requirements of different user groups can be met, for example, for people with vision disorder, audio prompt messages can be played, and for people with audio-visual disorder, vibration information can be provided, so that the using convenience of the electronic equipment can be greatly improved.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the control method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the above control method embodiment, and can achieve the same technical effect, and for avoiding repetition, the details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatuses in the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions recited, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (11)

1. An electronic device, comprising an NFC antenna, a signal amplitude detection circuit, an analog-to-digital converter, a comparator, a processor, and an information prompt device;
the NFC antenna is electrically connected with the signal amplitude detection circuit, the signal amplitude detection circuit is simultaneously electrically connected with the comparator and the analog-to-digital converter, the analog-to-digital converter is simultaneously electrically connected with the comparator and the processor, the comparator is electrically connected with the processor, and the processor is electrically connected with the information prompt device;
the signal amplitude detection circuit is used for sequentially acquiring the signal amplitude of the NFC antenna according to a preset time interval when the NFC card moves relative to the NFC antenna, and the processor is used for determining the change trend of the signal amplitude and generating prompt information according to the change trend so as to prompt a user to enable the NFC card to approach the NFC antenna.
2. The electronic device of claim 1,
the comparator comprises a first input end, a second input end and an output end, the output end of the signal amplitude detection circuit is electrically connected with the first input end, the output end of the analog-to-digital converter is electrically connected with the second input end, and the output end of the comparator is electrically connected with the processor.
3. The electronic device of claim 1,
the analog-to-digital converter is in bidirectional electrical connection with the processor, and the analog-to-digital converter is used for inputting digital signals to the processor and receiving the digital signals from the processor.
4. The electronic device of claim 1,
the information prompting device comprises at least one of a display screen, a loudspeaker and a vibration motor.
5. A control method of an electronic device, characterized in that the control method is used for the electronic device of any one of claims 1 to 4, the method comprising:
when the NFC card moves relative to the NFC antenna, the signal amplitudes of the NFC antenna at different moments are acquired successively according to a preset time interval;
determining a variation trend of the signal amplitude;
and generating prompt information to prompt a user to enable the NFC card to be close to the NFC antenna according to the change trend.
6. The control method of claim 5, wherein the determining the trend of the signal amplitude comprises:
inputting a first signal amplitude at a first time into one input end of the comparator and the processor respectively;
the comparator compares the amplitudes of the signals received by the two input ends and outputs a comparison result to the processor;
transmitting the first signal amplitude in the processor to the other input end of the comparator, and respectively inputting a second signal amplitude at a second moment to one input end of the comparator and the processor, wherein the second moment is separated from the first moment by the preset time and is later than the first moment;
iteratively updating input signals of two input ends of the comparator, and continuously outputting a plurality of comparison results;
and determining the variation trend of the signal amplitude according to a plurality of comparison results at different moments.
7. The control method according to claim 6, wherein the determining the trend of the signal amplitude according to the plurality of comparison results at different time instants comprises:
determining the signal amplitude enhancement in the case where a plurality of the comparison results are successively high level;
determining that the signal amplitude is weakened in a case where a plurality of the comparison results are continuously low level;
the comparison result is the difference between the signal amplitude of the end of the comparator connected with the signal amplitude detection circuit and the signal amplitude of the end of the comparator connected with the analog-to-digital converter.
8. The control method according to claim 7, wherein the generating a prompt message to prompt a user to approach the NFC card to the NFC antenna according to the change trend includes:
under the condition that the signal amplitude is determined to be enhanced, generating first prompt information, wherein the first prompt information is used for prompting a user to continuously move the NFC card along the original direction;
and under the condition that the amplitude of the signal is determined to be weakened, generating second prompt information, wherein the second prompt information is used for prompting a user to move the NFC card in the direction opposite to the original direction.
9. The control method according to claim 5,
the prompt message comprises at least one of image-text information, audio information and vibration information.
10. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the control method according to any one of claims 5 to 9.
11. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the control method according to any one of claims 5 to 9.
CN202010464426.8A 2020-05-27 2020-05-27 Electronic device, control method of electronic device, and readable storage medium Active CN111711942B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010464426.8A CN111711942B (en) 2020-05-27 2020-05-27 Electronic device, control method of electronic device, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010464426.8A CN111711942B (en) 2020-05-27 2020-05-27 Electronic device, control method of electronic device, and readable storage medium

Publications (2)

Publication Number Publication Date
CN111711942A CN111711942A (en) 2020-09-25
CN111711942B true CN111711942B (en) 2023-04-11

Family

ID=72537969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010464426.8A Active CN111711942B (en) 2020-05-27 2020-05-27 Electronic device, control method of electronic device, and readable storage medium

Country Status (1)

Country Link
CN (1) CN111711942B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487838B (en) * 2020-12-10 2023-10-03 深圳市与飞科技有限公司 Information prompting method, device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018066756A (en) * 2017-12-26 2018-04-26 カシオ計算機株式会社 Electronic apparatus and communication system
CN108601004A (en) * 2018-04-26 2018-09-28 努比亚技术有限公司 NFC uses bootstrap technique, mobile terminal and computer readable storage medium
CN108769377A (en) * 2018-04-26 2018-11-06 Oppo广东移动通信有限公司 Method of controlling antenna and Related product
CN208850074U (en) * 2018-11-02 2019-05-10 深圳市立誉信科技有限公司 Intelligent vehicle-tracing system
CN110915144A (en) * 2018-05-02 2020-03-24 华为技术有限公司 NFC card swiping control method and terminal equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016106271A1 (en) * 2014-12-22 2016-06-30 Capital One Services, LLC. A system, method, and apparatus for locating a bluetooth enabled transaction card

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018066756A (en) * 2017-12-26 2018-04-26 カシオ計算機株式会社 Electronic apparatus and communication system
CN108601004A (en) * 2018-04-26 2018-09-28 努比亚技术有限公司 NFC uses bootstrap technique, mobile terminal and computer readable storage medium
CN108769377A (en) * 2018-04-26 2018-11-06 Oppo广东移动通信有限公司 Method of controlling antenna and Related product
CN110915144A (en) * 2018-05-02 2020-03-24 华为技术有限公司 NFC card swiping control method and terminal equipment
CN208850074U (en) * 2018-11-02 2019-05-10 深圳市立誉信科技有限公司 Intelligent vehicle-tracing system

Also Published As

Publication number Publication date
CN111711942A (en) 2020-09-25

Similar Documents

Publication Publication Date Title
CN108470571B (en) Audio detection method and device and storage medium
CN106203235B (en) Living body identification method and apparatus
CN105071473B (en) USB charging methods and device
CN105099879A (en) Instant communication method and instant communication device
CN104123093A (en) Information processing method and device
CN104184731A (en) Information display method, device and system
CN104917612A (en) Identity verification method and device
CN104866226A (en) Terminal device and method for controlling same
CN109451130B (en) Mobile terminal testing method and device, mobile terminal and storage medium
US20190197263A1 (en) Method, device and electronic apparatus for testing capability of analyzing a two-dimensional code
CN105263126A (en) Method, device and system for short message verification
CN103885712A (en) Method and device for adjusting webpage and electronic device
CN112925426A (en) Processing method and device of stylus and electronic equipment
CN111711942B (en) Electronic device, control method of electronic device, and readable storage medium
CN113902436A (en) Analog card switching method, terminal device, card reader and storage medium
CN111476209A (en) Method and device for recognizing handwriting input and computer storage medium
CN106873937A (en) Pronunciation inputting method and device
CN105511777A (en) Session display method and device of touch display screen
CN110335629B (en) Pitch recognition method and device of audio file and storage medium
CN103714028B (en) The method of information processing and electronic equipment
CN105915700A (en) Verification code prompting method and equipment
CN106598391A (en) Blind operation realization method and device of mobile terminal
CN105511780A (en) Test method and device
CN110958352B (en) Network signal display method, device, storage medium and mobile terminal
CN112259076A (en) Voice interaction method and device, electronic equipment and computer readable storage medium

Legal Events

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