CN107294566B - NFC device, control method thereof and computer readable storage medium - Google Patents
NFC device, control method thereof and computer readable storage medium Download PDFInfo
- Publication number
- CN107294566B CN107294566B CN201710385569.8A CN201710385569A CN107294566B CN 107294566 B CN107294566 B CN 107294566B CN 201710385569 A CN201710385569 A CN 201710385569A CN 107294566 B CN107294566 B CN 107294566B
- Authority
- CN
- China
- Prior art keywords
- nfc
- signal
- duration
- control
- equipment
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 230000008878 coupling Effects 0.000 claims abstract description 29
- 238000010168 coupling process Methods 0.000 claims abstract description 29
- 238000005859 coupling reaction Methods 0.000 claims abstract description 29
- 230000006854 communication Effects 0.000 claims description 47
- 238000004891 communication Methods 0.000 claims description 46
- 238000005516 engineering process Methods 0.000 abstract description 9
- 230000006870 function Effects 0.000 description 35
- 230000005540 biological transmission Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 239000003999 initiator Substances 0.000 description 3
- 238000005259 measurement Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B5/00—Near-field transmission systems, e.g. inductive or capacitive transmission systems
- H04B5/20—Near-field transmission systems, e.g. inductive or capacitive transmission systems characterised by the transmission technique; characterised by the transmission medium
- H04B5/24—Inductive coupling
-
- G—PHYSICS
- G08—SIGNALLING
- G08C—TRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
- G08C17/00—Arrangements for transmitting signals characterised by the use of a wireless electrical link
- G08C17/02—Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
-
- G—PHYSICS
- G08—SIGNALLING
- G08C—TRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
- G08C23/00—Non-electrical signal transmission systems, e.g. optical systems
- G08C23/04—Non-electrical signal transmission systems, e.g. optical systems using light waves, e.g. infrared
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B17/00—Monitoring; Testing
- H04B17/30—Monitoring; Testing of propagation channels
- H04B17/309—Measuring or estimating channel quality parameters
- H04B17/318—Received signal strength
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B5/00—Near-field transmission systems, e.g. inductive or capacitive transmission systems
- H04B5/70—Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72409—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
- H04M1/72412—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- General Physics & Mathematics (AREA)
- Environmental & Geological Engineering (AREA)
- Quality & Reliability (AREA)
- Electromagnetism (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses an NFC device, a control method thereof and a computer readable storage medium, wherein the method comprises the following steps: the method comprises the steps that an NFC device detects the signal intensity and duration of an NFC signal, and the NFC signal is generated through electromagnetic coupling between the NFC device and an NFC control device; judging whether the duration is greater than or equal to a preset first duration threshold; when the duration is greater than or equal to the first duration threshold, the NFC device judges that the NFC signal is valid; and the NFC equipment converts the signal intensity of the NFC signal into a control signal grade, and controls a predefined controlled item according to the control signal grade. The invention utilizes the characteristic that the NFC technology can quickly and automatically establish connection, judges whether the NFC signal is effective or not according to the duration time of the NFC signal, controls the predefined controlled item according to the signal intensity of the NFC signal, and can improve the operation efficiency of the electronic product.
Description
Technical Field
The present invention relates to the Field of Near Field Communication (NFC) technologies, and in particular, to an NFC device, a control method thereof, and a computer-readable storage medium.
Background
With the rapid development of the electronic information industry, people's lives also change day by day, and electronic products play more and more important roles in our production and life and become an indispensable part in modern life.
However, the existing electronic product control method is not highly automated, for example, when a user performs common control (including volume, temperature, brightness, etc.) on the electronic product, the user generally needs to unlock the electronic product first and then enter a corresponding control interface to select a corresponding controlled item for control, and the control method is time-consuming and labor-consuming.
Disclosure of Invention
In order to solve the above technical problem, the present invention provides an NFC device, a control method thereof, and a computer-readable storage medium, which can improve the operation efficiency of an electronic product.
In order to achieve the purpose of the invention, the technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a control method of NFC equipment, which comprises the following steps:
the method comprises the steps that an NFC device detects the signal intensity and duration of an NFC signal, and the NFC signal is generated through electromagnetic coupling between the NFC device and an NFC control device;
judging whether the duration is greater than or equal to a preset first duration threshold;
when the duration is greater than or equal to the first duration threshold, the NFC device judges that the NFC signal is valid;
and the NFC equipment converts the signal intensity of the NFC signal into a control signal grade, and controls a predefined controlled item according to the control signal grade.
Further, the method also comprises the following steps:
the NFC equipment presets a corresponding relation between the signal intensity of the NFC signal and the control signal grade under different communication modes;
the NFC device converts the signal strength of the NFC signal into a control signal level, and specifically includes:
and the NFC equipment detects the communication mode of the NFC equipment, and converts the signal intensity of the NFC signal into the control signal grade according to the communication mode of the NFC equipment and the preset corresponding relation.
Further, the communication mode includes an active mode and a passive mode.
Further, after the step of determining whether the duration is greater than or equal to a preset first duration threshold, the method further includes:
judging whether the duration is less than or equal to a preset second duration threshold;
the step of determining, by the NFC device, that the NFC signal is valid when the duration is greater than or equal to the first duration threshold specifically includes:
when the duration is greater than or equal to the first duration threshold and less than or equal to the second duration threshold, the NFC device determines that the NFC signal is valid.
Further, the method also comprises the following steps:
the NFC equipment defines a plurality of state variables and a plurality of controlled items in advance, and the corresponding relation between the state variables and the controlled items.
Further, the method also comprises the following steps:
the NFC equipment defines a plurality of controlled items in advance;
prior to the step of the NFC device converting the signal strength of the NFC signal to a control signal level, the method further comprises:
and informing the user of selecting the controlled items.
The embodiment of the invention also provides NFC equipment, which comprises a processor, a memory and a communication bus; wherein,
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute a control program stored in the memory to implement the steps of:
detecting the signal intensity and duration of an NFC signal, wherein the NFC signal is generated by the NFC equipment through electromagnetic coupling with NFC control equipment;
judging whether the duration is greater than or equal to a preset first duration threshold;
when the duration is greater than or equal to the first duration threshold, judging that the NFC signal is valid;
and converting the signal intensity of the NFC signal into a control signal grade, and controlling a predefined controlled item according to the control signal grade.
Further, the step of converting the signal strength of the NFC signal into a control signal level specifically includes:
presetting a corresponding relation between the signal intensity of the NFC signal and the control signal grade under different communication modes;
and detecting the communication mode of the NFC equipment, and converting the signal intensity of the NFC signal into the control signal grade according to the communication mode of the NFC equipment and the preset corresponding relation.
Embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of:
detecting the signal intensity and duration of an NFC signal, wherein the NFC signal is generated by the NFC equipment through electromagnetic coupling with NFC control equipment;
judging whether the duration is greater than or equal to a preset first duration threshold;
when the duration is greater than or equal to the first duration threshold, judging that the NFC signal is valid;
and converting the signal intensity of the NFC signal into a control signal grade, and controlling a predefined controlled item according to the control signal grade.
Further, the step of converting the signal strength of the NFC signal into a control signal level specifically includes:
presetting a corresponding relation between the signal intensity of the NFC signal and the control signal grade under different communication modes;
and detecting the communication mode of the NFC equipment, and converting the signal intensity of the NFC signal into the control signal grade according to the communication mode of the NFC equipment and the preset corresponding relation.
According to the NFC equipment, the control method and the computer readable storage medium, the characteristic that connection can be established quickly and automatically by utilizing the NFC technology is utilized, whether the NFC signal is effective or not is judged according to the duration time of the NFC signal generated by electromagnetic coupling of the NFC equipment and the NFC control equipment, the predefined controlled item is controlled according to the signal strength of the NFC signal, the function of controlling the NFC equipment can be completed without unlocking, selecting and the like of a user, the operation efficiency of an electronic product is improved, and the operation experience of the user is further improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
fig. 2 is a flowchart illustrating a method for controlling an NFC device according to an embodiment of the present invention;
fig. 3 is a schematic view of an application scenario of a control method of an NFC device according to a first embodiment of the present invention;
fig. 4 is a schematic view of an application scenario of a control method of an NFC device according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of an NFC device according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention will be described in more detail with reference to the accompanying drawings and examples.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the Radio Frequency unit 101 may be configured to receive and transmit signals during a message transmission or call, specifically, receive downlink information of a base station and then process the received downlink information to the processor 110, and transmit uplink data to the base station, in General, the Radio Frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like, and in addition, the Radio Frequency unit 101 may further communicate with a network and other devices through wireless communication, and the wireless communication may use any communication standard or protocol, including, but not limited to, GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Synchronous Time Division Multiple Access, Code Division Multiple Access, Time Division Multiple Access, etc., TDD — Time Division Multiple Access, L Time Division Multiple Access, etc.
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a liquid Crystal Display (L acquired Crystal Display, L CD), an Organic light-Emitting Diode (O L ED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
Based on the hardware structure of the mobile terminal, the invention provides various embodiments of the method.
Referring to fig. 2, a method for controlling an NFC device according to the present invention includes the steps of:
step 201: the method comprises the steps that an NFC device detects the signal intensity and duration of an NFC signal, and the NFC signal is generated through electromagnetic coupling between the NFC device and an NFC control device;
it should be noted that Near Field Communication (NFC) is a short-range high-frequency radio technology, and the transmission speed is 106 Kbit/s, 212 Kbit/s or 424 Kbit/s when operating within a distance of 10 cm at a frequency of 13.56 MHz. At present, NFC has passed through to be ISO/IEC IS 18092 international standard, EMCA-340 standard and ETSITS 102190 standard, and IS widely used. NFC evolved from contactless Radio Frequency Identification (RFID) and is downward compatible with RFID. The NFC technology does not need to set, discover or pair the two connected devices in advance, and the two devices can be quickly and automatically connected only by being close to a certain distance, so that the processes of searching, pairing and the like of the existing wireless communication technologies such as WiFi and Bluetooth are omitted.
When the NFC target device works in the passive mode, the NFC initiator device needs to provide a radio frequency field (RF-field) in the whole communication process, the NFC target device does not generate the RF field, data are transmitted back to the NFC initiator device at the same speed by using a load Modulation (L load Modulation) technology, and when the NFC target device works in the active mode, the NFC initiator device and the NFC target device both generate own RF fields so as to carry out communication.
In this embodiment, the types of the NFC device and the NFC control device may be any electronic product with an NFC function, for example, the NFC control device may be a mobile terminal with an NFC function, a watch with an NFC function, or the like, and the NFC device may be a mobile terminal with an NFC function, a sound, an air conditioner, a remote controller, or the like.
Specifically, the Signal Strength refers to the Strength of the radio frequency Signal, and is generally characterized by the transmission power of the radio frequency Signal (or by parameters such as field Strength and voltage), and the measurement units include milliwatt (mW), decibel milliwatt (dBm), rssi (received Signal Strength indicator), percentage, and the like, wherein the dBm unit represents decibel number relative to 1 milliwatt; RSSI is a mechanism defined by IEEE for measuring the strength of the radio frequency signal received by the wireless network card, and has a value of 0-255, but for different manufacturers, the RSSI is not set to be 256 levels, but the RSSI _ MAX is provided; the percentage represents the ratio of the RSSI value of the particular signal to the reference signal.
Step 202: judging whether the duration is greater than or equal to a preset first duration threshold;
when the duration is greater than or equal to the first duration threshold, the NFC device judges that the NFC signal is valid;
the first duration threshold is used to avoid the occurrence of false determination, and specifically, the first duration threshold may be set to 1 second or any other size.
Further, the step 202 further includes:
the NFC equipment judges whether the duration is less than or equal to a preset second duration threshold value;
when the duration is greater than or equal to the first duration threshold and less than or equal to the second duration threshold, the NFC device determines that the NFC signal is valid.
For example, the first duration threshold may be set to 1s, the second duration threshold may be set to 3s, and when the duration is between [1s, 3s ], the NFC device determines that the NFC signal is valid. By judging whether the duration is between the first duration threshold and the second duration threshold, the situation of misjudgment caused by the fact that two NFC devices are close to each other for a long time can be avoided.
Step 203: and the NFC equipment converts the signal intensity of the NFC signal into a control signal grade, and controls a predefined controlled item according to the control signal grade.
In an embodiment of the present invention, the predefined controlled item may be any one of parameters of brightness, volume, temperature, and the like of the NFC device.
In another embodiment of the present invention, before the step 201, the method further comprises the steps of:
the NFC equipment defines a plurality of state variables and a plurality of controlled items in advance, and the corresponding relation between the state variables and the controlled items.
For example, the NFC device is a mobile phone with an NFC function, and it is predefined that when the mobile phone is in a screen-off state, the controlled item is a ringtone volume, and when the mobile phone is in a screen-on state, the controlled item is a screen brightness.
In another embodiment of the present invention, before the step 201, the method further comprises the steps of:
the NFC equipment defines a plurality of controlled items in advance;
before the step 203, the method further comprises the steps of:
the user is notified of the selection of the number of controlled items.
For example, the NFC device is a mobile phone with an NFC function, the controlled items include parameters such as brightness and volume, and when the mobile phone determines that an NFC signal generated by electromagnetic coupling between the mobile phone and the NFC control device is valid, a notification message is displayed on a mobile phone screen or in a notification bar, and a plurality of controlled items for a user to select are listed, and one of the controlled items is selected by the user for control.
Further, in step 203, the step of converting the signal strength of the NFC signal into a control signal level by the NFC device specifically includes:
the NFC equipment predefines the corresponding relation between the signal intensity of the NFC signal and the grade of the control signal in different communication modes;
and the NFC equipment detects the communication mode of the NFC equipment, and converts the signal intensity of the NFC signal into the control signal grade according to the communication mode of the NFC equipment and the preset corresponding relation.
It should be noted that, when the NFC device operates in the active mode, the NFC device and the NFC control device both need to provide a radio frequency field to generate a coupling magnetic field, and when the NFC device operates in the passive mode, the NFC device does not generate the radio frequency field, so that when the NFC device operates in the active mode, the signal strength of the NFC signal generated by coupling the NFC device and the NFC control device is greater than the signal strength of the NFC signal generated by coupling the NFC device and the NFC control device when the NFC device operates in the passive mode. By presetting different corresponding relations between the signal intensity of the NFC signal and the control signal grade under the active mode and the passive mode, the signal intensity of the NFC signal can be more accurately converted into the corresponding control signal grade.
For example, assuming that the control signal levels include ten levels of one to ten, the NFC device predefines two NFC signals that differ by one control signal level per phase, with signal strengths differing by 3dBm and 1dBm in the active mode and in the passive mode; the signal strength of the NFC signal corresponding to each level of the control signal in the active mode and the passive mode may also be predefined.
Further, the signal strength of the NFC signal generated by the NFC device and the NFC control device coupled varies with the distance and angle between the NFC device and the NFC control device. Therefore, the controlled item can be controlled by adjusting the signal strength of the NFC signal generated by coupling the NFC device and the NFC control device by controlling the distance or angle between the NFC device and the NFC control device.
In an embodiment of the present invention, when the NFC device is a remote controller, the step of controlling the predefined controlled item according to the level of the control signal specifically includes:
and the NFC equipment sends a control signal to the control equipment of the NFC equipment according to the control signal grade and controls the predefined controlled item.
The control signal can be signals such as WiFi, Bluetooth and infrared, and the control equipment can be equipment such as a television and an air conditioner.
Fig. 3 and 4 are schematic diagrams of two application scenarios of the present invention, respectively. As shown in fig. 3, a mobile terminal with an NFC function is used to approach an air conditioner with an NFC function, assuming that a predefined controlled item is an adjustment temperature of the air conditioner, the air conditioner sets a control level of its own adjustment temperature according to a signal intensity of an NFC signal generated by electromagnetic coupling between the mobile terminal and the air conditioner, and can adjust the signal intensity of the NFC signal generated by both coupling by adjusting a distance or an angle between the mobile terminal and the air conditioner;
as shown in fig. 4, a mobile terminal with an NFC function is used to be close to a remote controller with an NFC function, a predefined controlled item is assumed to be the volume of a television, the remote controller sends a corresponding infrared remote control signal to adjust the control level of the volume of the television according to the signal intensity of an NFC signal generated by electromagnetic coupling between the mobile terminal and the remote controller, so as to adjust the volume of the television, and the signal intensity of the NFC signal generated by coupling between the mobile terminal and the remote controller can be adjusted by adjusting the distance or angle between the mobile terminal and the remote controller.
Referring to fig. 5, an embodiment of the present invention further provides an NFC device 500, where the NFC device 500 includes a processor 501, a memory 502, and a communication bus 503;
the communication bus 503 is used for realizing connection communication between the processor 501 and the memory 502;
the processor 501 is configured to execute a control program stored in the memory 502 to implement the following steps:
detecting the signal intensity and duration of an NFC signal, wherein the NFC signal is generated by the NFC equipment through electromagnetic coupling with NFC control equipment;
judging whether the duration is greater than or equal to a preset first duration threshold;
when the duration is greater than or equal to the first duration threshold, judging that the NFC signal is valid;
and converting the signal intensity of the NFC signal into a control signal grade, and controlling a predefined controlled item according to the control signal grade.
In this embodiment, the types of the NFC device and the NFC control device may be any electronic product with an NFC function, for example, the NFC control device may be a mobile terminal with an NFC function, a watch with an NFC function, or the like, and the NFC device may be a mobile terminal with an NFC function, a sound, an air conditioner, a remote controller, or the like.
Specifically, the Signal Strength refers to the Strength of the radio frequency Signal, and is generally characterized by the transmission power of the radio frequency Signal (or by parameters such as field Strength and voltage), and the measurement units include milliwatt (mW), decibel milliwatt (dBm), rssi (received Signal Strength indicator), percentage, and the like.
The first duration threshold is used to avoid the occurrence of false determination, and specifically, the first duration threshold may be set to 1 second or any other size.
Further, after the step of determining whether the duration is greater than or equal to a preset duration threshold, the processor 501 is further configured to execute the control program to implement the following steps:
judging whether the duration is less than or equal to a preset second duration threshold;
and when the duration is greater than or equal to the first duration threshold and less than or equal to the second duration threshold, judging that the NFC signal is effective.
For example, the first duration threshold may be set to 1s, the second duration threshold may be set to 3s, and when the duration is between [1s, 3s ], the NFC device determines that the NFC signal is valid. By judging whether the duration is between the first duration threshold and the second duration threshold, the situation of misjudgment caused by the fact that two NFC devices are close to each other for a long time can be avoided.
In an embodiment of the present invention, before the step of detecting the signal strength and the duration of the NFC signal, the processor 501 is further configured to execute the control program to implement the following steps:
the predefined controlled item is any one of the parameters of brightness, volume, temperature and the like of the NFC equipment.
In another embodiment of the present invention, before the step of detecting the signal strength and duration of the NFC signal, the processor 501 is further configured to execute the control program to implement the following steps:
a plurality of state variables and a plurality of controlled items are predefined, and the corresponding relation between the state variables and the controlled items is defined in advance.
For example, the NFC device is a mobile phone with an NFC function, and it is predefined that when the mobile phone is in a screen-off state, the controlled item is a ringtone volume, and when the mobile phone is in a screen-on state, the controlled item is a screen brightness.
In another embodiment of the present invention, before the step of detecting the signal strength and duration of the NFC signal, the processor 501 is further configured to execute the control program to implement the following steps:
a plurality of controlled items are predefined;
and before the step of controlling the predefined controlled item according to the control signal level, the processor 501 is further configured to execute the control program to implement the following steps:
the user is notified of the selection of the number of controlled items.
For example, the NFC device is a mobile phone with an NFC function, the controlled items include parameters such as brightness and volume, and when the mobile phone determines that an NFC signal generated by electromagnetic coupling between the mobile phone and the NFC control device is valid, a notification message is displayed on a mobile phone screen or in a notification bar, and a plurality of controlled items for a user to select are listed, and one of the controlled items is selected by the user for control.
Further, the step of converting the signal strength of the NFC signal into a control signal level specifically includes:
predefining a corresponding relation between the signal intensity of the NFC signal and the grade of the control signal in different communication modes;
and detecting the communication mode of the NFC signal, and converting the signal intensity of the NFC signal into the control signal grade according to the communication mode of the NFC signal and the preset corresponding relation.
It should be noted that, when the NFC device operates in the active mode, the signal strength of the NFC signal generated by coupling the NFC device and the NFC control device is, itself, greater than the signal strength of the NFC signal generated by coupling the NFC device and the NFC control device when the NFC device operates in the passive mode.
For example, assuming that the control signal levels include ten levels of one to ten, the NFC device predefines two NFC signals that differ by one control signal level per phase, with signal strengths differing by 3dBm and 1dBm in the active mode and in the passive mode; the signal strength of the NFC signal corresponding to each level of the control signal in the active mode and the passive mode may also be predefined.
Further, by controlling the distance or the angle between the NFC control device and the NFC device, the signal strength of an NFC signal generated by coupling the NFC control device and the NFC device is adjusted, and then the controlled item is controlled.
In an embodiment of the present invention, when the NFC device is a remote controller, the step of controlling the predefined controlled item according to the level of the control signal specifically includes:
and the NFC equipment sends a control signal to the control equipment of the NFC equipment according to the control signal grade and controls the predefined controlled item.
The control signal can be signals such as WiFi, Bluetooth and infrared, and the control equipment can be equipment such as a television and an air conditioner.
Embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of:
detecting the signal intensity and duration of an NFC signal, wherein the NFC signal is generated by the NFC equipment through electromagnetic coupling with NFC control equipment;
judging whether the duration is greater than or equal to a preset first duration threshold;
when the duration is greater than or equal to the first duration threshold, judging that the NFC signal is valid;
and converting the signal intensity of the NFC signal into a control signal grade, and controlling a predefined controlled item according to the control signal grade.
In this embodiment, the types of the NFC device and the NFC control device may be any electronic product with an NFC function, for example, the NFC control device may be a mobile terminal with an NFC function, a watch with an NFC function, or the like, and the NFC device may be a mobile terminal with an NFC function, a sound, an air conditioner, a remote controller, or the like.
Specifically, the Signal Strength refers to the Strength of the radio frequency Signal, and is generally characterized by the transmission power of the radio frequency Signal (or by parameters such as field Strength and voltage), and the measurement units include milliwatt (mW), decibel milliwatt (dBm), rssi (received Signal Strength indicator), percentage, and the like.
The first duration threshold is used to avoid the occurrence of false determination, and specifically, the first duration threshold may be set to 1 second or any other size.
Further, after the step of determining whether the duration is greater than or equal to a preset duration threshold, the one or more programs may be further executable by the one or more processors to implement the steps of:
judging whether the duration is less than or equal to a preset second duration threshold;
and when the duration is greater than or equal to the first duration threshold and less than or equal to the second duration threshold, judging that the NFC signal is effective.
For example, the first duration threshold may be set to 1s, the second duration threshold may be set to 3s, and when the duration is between [1s, 3s ], the NFC device determines that the NFC signal is valid. By judging whether the duration is between the first duration threshold and the second duration threshold, the situation of misjudgment caused by the fact that two NFC devices are close to each other for a long time can be avoided.
In an embodiment of the present invention, before the step of detecting the signal strength and the duration of the NFC signal, the one or more programs may be further executable by the one or more processors to implement the following steps:
the predefined controlled item is any one of the parameters of brightness, volume, temperature and the like of the NFC equipment.
In another embodiment of the present invention, before the step of detecting the signal strength and duration of the NFC signal, the one or more programs are further executable by the one or more processors to implement the steps of:
a plurality of state variables and a plurality of controlled items are predefined, and the corresponding relation between the state variables and the controlled items is defined in advance.
For example, the NFC device is a mobile phone with an NFC function, and it is predefined that when the mobile phone is in a screen-off state, the controlled item is a ringtone volume, and when the mobile phone is in a screen-on state, the controlled item is a screen brightness.
In another embodiment of the present invention, before the step of detecting the signal strength and duration of the NFC signal, the one or more programs are further executable by the one or more processors to implement the steps of:
a plurality of controlled items are predefined;
and prior to the step of controlling the predefined controlled items according to the control signal level, the one or more programs are further executable by the one or more processors to implement the steps of:
the user is notified of the selection of the number of controlled items.
For example, the NFC device is a mobile phone with an NFC function, the controlled items include parameters such as brightness and volume, and when the mobile phone determines that an NFC signal generated by electromagnetic coupling between the mobile phone and the NFC control device is valid, a notification message is displayed on a mobile phone screen or in a notification bar, and a plurality of controlled items for a user to select are listed, and one of the controlled items is selected by the user for control.
Further, the step of converting the signal strength of the NFC signal into a control signal level specifically includes:
predefining a corresponding relation between the signal intensity of the NFC signal and the grade of the control signal in different communication modes;
and detecting the communication mode of the NFC signal, and converting the signal intensity of the NFC signal into the control signal grade according to the communication mode of the NFC signal and the preset corresponding relation.
It should be noted that, when the NFC device operates in the active mode, the signal strength of the NFC signal generated by coupling the NFC device and the NFC control device is, itself, greater than the signal strength of the NFC signal generated by coupling the NFC device and the NFC control device when the NFC device operates in the passive mode.
For example, assuming that the control signal levels include ten levels of one to ten, the NFC device predefines two NFC signals that differ by one control signal level per phase, with signal strengths differing by 3dBm and 1dBm in the active mode and in the passive mode; the signal strength of the NFC signal corresponding to each level of the control signal in the active mode and the passive mode may also be predefined.
Further, the distance or the angle between the NFC equipment and the NFC control equipment is controlled, the signal strength of an NFC signal generated by coupling of the NFC equipment and the NFC control equipment is adjusted, and then the controlled item is controlled.
In an embodiment of the present invention, when the NFC device is a remote controller, the step of controlling the predefined controlled item according to the level of the control signal specifically includes:
and sending a control signal to the control equipment of the control equipment according to the control signal grade, and controlling a predefined controlled item.
The control signal can be signals such as WiFi, Bluetooth and infrared, and the control equipment can be equipment such as a television and an air conditioner.
According to the NFC equipment, the control method and the computer readable storage medium, the connection can be quickly and automatically established by utilizing the NFC technology, whether the NFC signal is effective or not is judged according to the duration of the NFC signal generated by the electromagnetic coupling of the NFC equipment and the NFC control equipment, the predefined controlled item is controlled according to the signal strength of the NFC signal, the function of controlling the NFC equipment can be completed without operations such as unlocking and selecting by a user, the operation efficiency of an electronic product can be improved, and the operation experience of the user is improved.
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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
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 invention 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 (such as 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 invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (9)
1. A method for controlling an NFC device, the method comprising:
the method comprises the steps that an NFC device detects the signal intensity and duration of an NFC signal, and the NFC signal is generated through electromagnetic coupling between the NFC device and an NFC control device;
judging whether the duration is greater than or equal to a preset first duration threshold;
when the duration is greater than or equal to the first duration threshold, the NFC device judges that the NFC signal is valid;
the NFC equipment converts the signal intensity of the NFC signal into a control signal grade, and controls a predefined controlled item corresponding to a state variable according to the control signal grade and the state variable of the NFC equipment;
the NFC equipment defines a plurality of state variables and a plurality of controlled items in advance, and the corresponding relation between the state variables and the controlled items.
2. The control method of claim 1, further comprising, prior to the method:
the NFC equipment presets a corresponding relation between the signal intensity of the NFC signal and the control signal grade under different communication modes;
the NFC device converts the signal strength of the NFC signal into a control signal level, and specifically includes:
and the NFC equipment detects the communication mode of the NFC equipment, and converts the signal intensity of the NFC signal into the control signal grade according to the communication mode of the NFC equipment and the preset corresponding relation.
3. The control method of claim 2, wherein the communication mode comprises an active mode and a passive mode.
4. The control method according to claim 1, characterized in that after the step of determining whether the duration is greater than or equal to a preset first duration threshold, the method further comprises:
judging whether the duration is less than or equal to a preset second duration threshold;
the step of determining, by the NFC device, that the NFC signal is valid when the duration is greater than or equal to the first duration threshold specifically includes:
when the duration is greater than or equal to the first duration threshold and less than or equal to the second duration threshold, the NFC device determines that the NFC signal is valid.
5. The control method of claim 1, further comprising, prior to the method:
the NFC equipment defines a plurality of controlled items in advance;
prior to the step of the NFC device converting the signal strength of the NFC signal to a control signal level, the method further comprises:
and informing the user of selecting the controlled items.
6. An NFC device, wherein the NFC device comprises a processor, a memory, and a communication bus; wherein,
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute a control program stored in the memory to implement the steps of:
detecting the signal intensity and duration of an NFC signal, wherein the NFC signal is generated by the NFC equipment through electromagnetic coupling with NFC control equipment;
judging whether the duration is greater than or equal to a preset first duration threshold;
when the duration is greater than or equal to the first duration threshold, judging that the NFC signal is valid;
converting the signal intensity of the NFC signal into a control signal grade, and controlling a predefined controlled item corresponding to a state variable according to the control signal grade and the state variable of the NFC equipment;
the NFC equipment defines a plurality of state variables and a plurality of controlled items in advance, and the corresponding relation between the state variables and the controlled items.
7. The NFC device according to claim 6, wherein the step of converting the signal strength of the NFC signal into a control signal level specifically includes:
presetting a corresponding relation between the signal intensity of the NFC signal and the control signal grade under different communication modes;
and detecting the communication mode of the NFC equipment, and converting the signal intensity of the NFC signal into the control signal grade according to the communication mode of the NFC equipment and the preset corresponding relation.
8. A computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors for performing the steps of:
detecting the signal intensity and duration of an NFC signal, wherein the NFC signal is generated by the NFC equipment through electromagnetic coupling with NFC control equipment;
judging whether the duration is greater than or equal to a preset first duration threshold;
when the duration is greater than or equal to the first duration threshold, judging that the NFC signal is valid;
converting the signal intensity of the NFC signal into a control signal grade, and controlling a predefined controlled item corresponding to a state variable according to the control signal grade and the state variable of the NFC equipment;
the NFC equipment defines a plurality of state variables and a plurality of controlled items in advance, and the corresponding relation between the state variables and the controlled items.
9. The computer-readable storage medium according to claim 8, wherein the step of converting the signal strength of the NFC signal into a control signal level specifically comprises:
presetting a corresponding relation between the signal intensity of the NFC signal and the control signal grade under different communication modes;
and detecting the communication mode of the NFC equipment, and converting the signal intensity of the NFC signal into the control signal grade according to the communication mode of the NFC equipment and the preset corresponding relation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710385569.8A CN107294566B (en) | 2017-05-26 | 2017-05-26 | NFC device, control method thereof and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710385569.8A CN107294566B (en) | 2017-05-26 | 2017-05-26 | NFC device, control method thereof and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107294566A CN107294566A (en) | 2017-10-24 |
CN107294566B true CN107294566B (en) | 2020-07-21 |
Family
ID=60095415
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710385569.8A Active CN107294566B (en) | 2017-05-26 | 2017-05-26 | NFC device, control method thereof and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107294566B (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160142862A1 (en) * | 2011-10-17 | 2016-05-19 | Google Inc. | Techniques for effectuating a near-field communication session |
CN104243662B (en) * | 2013-06-07 | 2020-09-01 | 中兴通讯股份有限公司 | Terminal prompt mode adjusting method and terminal |
CN104977910A (en) * | 2015-06-23 | 2015-10-14 | 努比亚技术有限公司 | NFC-based intelligent household control system and apparatus |
CN105120051B (en) * | 2015-06-24 | 2019-04-19 | 努比亚技术有限公司 | Contextual model configuration method and electronic equipment |
-
2017
- 2017-05-26 CN CN201710385569.8A patent/CN107294566B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107294566A (en) | 2017-10-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110149132B (en) | Transmitting antenna switching method and terminal equipment | |
CN109067418B (en) | Antenna control method and mobile terminal | |
CN108684029B (en) | Bluetooth pairing connection method and system, Bluetooth device and terminal | |
CN110266323B (en) | Signal control circuit, terminal equipment and signal control method | |
CN110399000B (en) | Mobile terminal and temperature control method thereof | |
CN109739394B (en) | SAR value processing method and mobile terminal | |
CN109379145B (en) | Signal processing circuit, terminal equipment and signal processing method | |
CN109195191B (en) | Cell reselection control method and terminal | |
CN107911777B (en) | Processing method and device for return-to-ear function and mobile terminal | |
CN108391277B (en) | Signal connection method, device, mobile terminal and computer readable storage medium | |
CN111131885A (en) | Play control method and electronic equipment | |
CN111246061B (en) | Mobile terminal, method for detecting shooting mode and storage medium | |
CN112286122A (en) | Intelligent household control method, device, terminal and storage medium | |
CN110099434B (en) | Power adjustment method, terminal equipment and computer readable storage medium | |
CN109041190B (en) | Power control method and terminal | |
CN109698711B (en) | Radio frequency module and terminal equipment | |
CN109639738B (en) | Voice data transmission method and terminal equipment | |
CN108512616B (en) | Signal intensity display method, mobile terminal and computer readable storage medium | |
CN108307075B (en) | Incoming call processing method and mobile terminal | |
CN108196663B (en) | Face recognition method and mobile terminal | |
CN112737609B (en) | Radio frequency system, signal power control method, communication device, and storage medium | |
CN109450508B (en) | Antenna determination method and device and mobile terminal | |
CN109521916B (en) | File processing method based on flexible screen, mobile terminal and storage medium | |
CN111443764A (en) | Separation state processing method and electronic equipment | |
CN108108608B (en) | Control method of mobile terminal and mobile terminal |
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 |