Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims, 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 terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or otherwise described herein, and that the objects identified by "first," "second," etc. are generally of a type not limited to the number of objects, for example, the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The near field communication method provided by the embodiment of the application is described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
The implementation main body of the near field communication method provided by the embodiment of the application may be an electronic device or a functional module or a functional entity capable of implementing the near field communication method in the electronic device, and the electronic device in the embodiment of the application includes, but is not limited to, a mobile phone, a tablet computer, a camera, a wearable device, etc., and the near field communication method provided by the embodiment of the application is described below by taking the electronic device as an implementation main body.
As shown in fig. 1, an embodiment of the present application provides a near field communication circuit, which is applied to a first electronic device, and may include a near field communication module 110, a switch 120, and a sampling processing module 130.
The near field communication module 110 may include a first coil 111.
Optionally, the near field communication module 110 may further include a functional module 112, where the functional module 112 is connected to the first coil 111.
The switch 120 may include a first sub-module SW1, a second sub-module SW2, and a third sub-module SW3.
The sampling processing module 130 may include a high frequency sampling module 131, an analog-to-digital conversion module 132, a digital signal processing module 133, and a central processor 134. The high-frequency sampling module 131 is connected with the analog-digital conversion module 132, the analog-digital conversion module 132 is connected with the digital signal processing module 133, the digital signal processing module 133 is connected with the central processing unit 134, and the central processing unit 134 is connected with the functional module 112.
Alternatively, the first coil may be connected to the switch 120 and the sampling processing module 130, respectively.
The near field communication circuit may further comprise a display screen 140 for supporting NFC functionality. Wherein the display 140 is connected to the cpu 134.
Alternatively, the switch 120 may be used to switch the coil connection mode of the first coil. The coil connection mode comprises a first connection mode and a second connection mode;
in a first connection mode, the first coil is used for transmitting waveform signals in a near field communication mode so as to perform communication interaction with the second electronic equipment;
in a second connection mode, the first coil is disconnected into a second coil and a third coil, the second coil is used for transmitting a second waveform signal in a near field communication mode so as to perform communication interaction with second electronic equipment, and the third coil is used for acquiring the first waveform signal; the first waveform signal is an interaction signal generated by near field communication between the first electronic device and the second electronic device.
Alternatively, the second coil may be an inner coil of the first coil, and the third coil may be an outer coil of the first coil; alternatively, the second coil may be an outer coil of the first coil and the third coil may be an inner coil of the first coil.
Illustratively, as shown in fig. 2, the second coil is taken as an outer coil of the first coil, and the third coil is taken as an inner coil of the first coil as an example. The second coil 31 may be used for transmitting the second waveform signal S1, the fourth coil 33 in the second electronic device may be used for transmitting the fourth waveform signal S2, and the third coil 32 may be used for acquiring an interaction signal of the second waveform signal and the fourth waveform signal, i.e. the first waveform signal S3.
The sampling processing module 130 may be configured to determine a signal update parameter according to the first waveform signal, and update the waveform parameter of the second waveform signal to the signal update parameter, where the signal update parameter is used to increase the amplitude value of the first waveform signal.
In the embodiment of the application, on one hand, the monitoring of the interactive signal generated by the near field communication can be realized by acquiring the first waveform signal, and because the signal updating parameter is determined according to the interactive signal generated by the near field communication, the targeted adjustment of the waveform parameter of the second waveform signal can be realized, thereby solving the compatibility problem of the electronic equipment; on the other hand, the amplitude value of the first waveform signal can be improved by updating the waveform parameter of the second waveform signal to the signal updating parameter, and the higher the amplitude value of the first waveform signal is, the higher the probability of successful communication is, so that the success rate of communication with other external devices can be improved.
Alternatively, the changeover switch 120 may be specifically configured to: if the first coil transmits the waveform signal in the near field communication mode and can not realize communication interaction with the second electronic equipment, the control circuit is switched from the first connection mode to the second connection mode; if the waveform parameter of the second waveform signal is updated to the signal updating parameter, the control circuit switches from the second connection mode to the first connection mode.
Specifically, if the user wants to perform near field communication with the second electronic device through the first electronic device, the first electronic device may perform communication interaction with the second electronic device through the first coil first when the coil connection mode of the first coil is the first connection mode. If the communication fails, the first electronic device may switch the coil connection mode of the first coil through the switch 120, that is, switch the coil connection mode of the first coil from the first connection mode to the second connection mode, and use the third coil to obtain the first waveform signal, and transmit the second waveform signal through the second coil. Then, the first electronic device may determine the signal update parameter through the sampling processing module 130, and update the waveform parameter of the second waveform signal to the signal update parameter to increase the amplitude value of the first waveform signal. After the waveform parameters are updated, the first electronic device may switch the coil connection mode of the first coil through the switch 120 again, that is, switch the coil connection mode of the first coil from the second connection mode to the first connection mode, and perform communication interaction with the second electronic device through the first coil again.
In the embodiment of the application, the control circuit can be switched from the first connection mode to the second connection mode under the condition that the communication interaction with the second electronic equipment cannot be realized, so that the waveform parameters of the second waveform signal can be updated, the amplitude value of the first waveform signal is improved, and the success rate of the communication interaction is further improved. Because the control circuit can be switched from the second connection mode to the first connection mode under the condition that the waveform parameters of the second waveform signals are updated to the signal updating parameters, the communication interaction between the first coil and the second electronic equipment can be completed.
Optionally, a second coil, in particular for periodically transmitting a waveform signal in a near field communication mode; the third coil is also used for acquiring a third waveform signal, and the third waveform signal is an interaction signal of the first electronic equipment and the second electronic equipment; the change-over switch is also used for: when the third waveform signal includes target coding information, the control circuit switches from the second connection mode to the first connection mode, and the target coding information is identification information in the waveform signal transmitted by the second electronic device.
In general, in order to save power consumption, in a standby state, the first electronic device may set a timing polling function of the NFC coil, that is, periodically transmit a waveform signal through the first coil to implement communication information detection, and set a wake-up amplitude threshold, and when the signal strength of the waveform signal detected by the first coil is greater than the wake-up amplitude threshold, the first electronic device may start the NFC communication function. However, if the wake-up amplitude threshold is set to be larger, the problem that the second electronic device cannot be identified still is caused, and if the wake-up amplitude threshold is set to be smaller, the problem of frequent false touch is caused.
Based on the above-mentioned problems, the near field communication circuit provided by the present application may control the circuit to be in the second connection mode through the switch 120, and then the first electronic device may periodically transmit the waveform signal through the second coil, and obtain the third waveform signal through the third coil. The first electronic device may determine whether to be in proximity to the second electronic device by determining whether target encoding information is included in the third waveform signal.
Illustratively, as shown in FIG. 3, when the first electronic device approaches the foreign metal, the field strength amplitude of the third waveform signal may increase; when the first electronic device is close to the second electronic device, the third waveform signal may include target encoding information.
In the embodiment of the application, the third waveform signal can be obtained through the third coil, and the control circuit is switched from the second connection mode to the first connection mode under the condition that the third waveform signal comprises the target coding information, so that the accuracy of the first electronic device for identifying the second electronic device can be improved, and the problems of false touch and incapability of identifying the second electronic device can be avoided.
Alternatively, the first sub-module SW1 may include the first interface 11, the second interface 12, the third interface 13, the second sub-module SW2 may include the fourth interface 21, the fifth interface 22, the sixth interface 23, and the seventh interface 24, and the third sub-module SW3 may include the eighth interface 31, the ninth interface 32, and the tenth interface 33.
As shown in fig. 4, when the change-over switch 120 is of the first connection type, the seventh interface 24 is connected to the sixth interface 23, the sixth interface 23 is connected to the ninth interface 32, the ninth interface 32 is connected to the eighth interface 31, the eighth interface 31 is connected to the first interface 11, the first interface 11 is connected to the second interface 12, the second interface 12 is connected to the fourth interface 21, the fourth interface 21 is connected to the fifth interface 22, and the seventh interface 24 and the fifth interface 22 are coil ports of the first coil 111 and the change-over switch 120.
As shown in fig. 5, when the change-over switch 120 is of the second connection type, the seventh interface 24 is connected to the fifth interface 22, and the seventh interface 24 and the fifth interface 22 are coil ports of the change-over switch connected to the third coil 114. The tenth interface 33 is connected to the eighth interface 31, the eighth interface 31 is connected to the first interface 11, the first interface 11 is connected to the third interface 13, and the tenth interface 33 and the third interface 13 are coil ports of the second coil 113 and the switch 120.
Alternatively, the high-frequency sampling module 131 may be configured to detect the first waveform signal acquired by the third coil; the analog-to-digital conversion module 132 may be used to convert the first waveform signal from an analog signal to a digital signal; the digital signal processing module 133 may be configured to perform data operation processing on the digital signal, so as to obtain a signal parameter; the cpu 134 may be configured to perform logic determination and parameter selection on the signal parameters.
Optionally, the signal parameters may include: a first transmission amplitude, a first transmission phase, a second transmission amplitude, and a second transmission phase. The digital signal processing module 133 may be specifically configured to: determining a first transmission amplitude and a first transmission phase of the first waveform signal; the cpu 134 may be specifically configured to obtain the second transmission amplitude and the second transmission phase of the second waveform signal.
Specifically, since the first waveform signal is an interaction signal between the first electronic device and the second electronic device, and the second waveform signal is a waveform signal transmitted when the first electronic device performs near field communication, after determining the first transmission amplitude, the first transmission phase, the second transmission amplitude, and the second transmission phase, the central processor 134 may determine waveform parameters of the waveform signal transmitted when the second electronic device performs near field communication according to the first transmission amplitude, the first transmission phase, the second transmission amplitude, and the second transmission phase, and determine signal update parameters according to the waveform parameters of the waveform signal transmitted by the second electronic device.
Optionally, the signal update parameter may include: the phase update parameter. The central processing unit 134 is specifically configured to: determining a third transmitting phase of a fourth waveform signal according to the signal parameter, wherein the fourth waveform signal is a waveform signal transmitted by the second electronic equipment when the second electronic equipment performs near field communication with the first electronic equipment; determining the third transmit phase as the phase update parameter; updating the second transmit phase to the phase update parameter.
Optionally, the third transmission phase is a phase difference between the second transmission phase and the first transmission phase. I.e. the central processing unit 134, is specifically configured to: a phase difference of the second transmit phase and the first transmit phase is determined and the phase difference is determined as a third transmit phase of the fourth waveform signal.
In particular, the second coil is a communication primary coil, which emits a second waveform signal S1 that may be a modulated waveform at a specific frequency of 13.56MHz, wherein,the second transmission amplitude A1 and the second transmission phase of the waveform>Can be adjusted according to the data transmission requirement, thereby realizing the function of issuing data. The fourth coil is a secondary coil, and can couple and acquire waveform energy in space and adjust the load of the coil, so that the amplitude and phase of the voltage waveform in space are changed, and a fourth waveform signal S2 is obtained, wherein->Thus, the data return function can be achieved. As shown in fig. 6, the waveform vector of the second waveform signal S1 and the fourth waveform signal S2 after spatial superposition is the first waveform signal S3, wherein ∈>The first waveform signal S3 is an actual waveform voltage in the near field communication interaction process, the magnitude of the first transmission amplitude of the first waveform signal can directly determine the near field communication quality effect, and normally, the electronic device needs forward modulation, that is, the first transmission amplitude of the superimposed S3 is the largest, wherein the first transmission amplitude of the superimposed S3 is as follows:When |S 3 The larger the i, the larger the current field strength signal, and the better the communication effect.
A second transmission amplitude A1 and a second transmission phase of a second waveform signal which can be transmitted by the first electronic device due to the first transmission amplitude of S3Third transmission amplitude A2 and third transmission phase of the fourth waveform signal transmitted by the second electronic device>Determine, and third transmission amplitude A2 and third transmission phase->Is an external device parameter, cannot be adjusted, and thus, the central processor 134 can adjust the second transmission amplitude A1 and the second transmission phase +.>Increase |S 3 |。
Second emission phaseTo adjust the parameters mainly from the above-mentioned |S 3 The calculation formula of I indicates that when the second transmission phase is + ->And third transmission phase->When equal, the->Maximum, therefore, CPU 134 can determine the third transmit phase by calculation of the signal parameters>And according to the third transmission phase->Determining a phase update parameter->I.e. let phase update parameter->Determining a phase update parameter->After that, the electronic device can add the second transmission phase +.>Update to phase update parameter->
Optionally, the signal update parameter may further include: the amplitude updates the parameters. The central processing unit 134 is specifically configured to: determining an amplitude updating parameter according to the transmitting power and the power consumption of the circuit; the second transmission amplitude is updated to an amplitude update parameter.
Specifically, the second transmission amplitude A1 can be used as an auxiliary adjustment parameter, and the central processor 134 can determine the amplitude update parameter a according to the transmission power and the power consumption of the circuit 1 ' and updating the second transmission amplitude A1 of the second waveform signal to the transmission amplitude A 1 '。
The following describes the execution process of the near field communication circuit provided by the embodiment of the present application in a time sequence.
As shown in fig. 7, the implementation procedure of the near field communication circuit provided by the embodiment of the present application may include steps 201 to 209:
step 201, the change-over switch is controlled to be in a second connection mode through initialization processing.
Step 202, periodically transmitting a waveform signal through the second coil, and acquiring a third waveform signal through the third coil.
Step 203, determining whether the third waveform signal includes target coding information.
And 204, controlling the change-over switch to be in a first connection mode and performing near field communication through the first coil under the condition that the third waveform signal comprises target coding information.
Step 205, it is determined whether the communication is successful.
Step 206, under the condition that the communication is unsuccessful, controlling the change-over switch to be in the second connection mode, and acquiring the first waveform signal through the third coil.
Step 207, determining a target parameter according to the first waveform signal.
Step 208, updating the waveform parameter of the second waveform signal to the target parameter, and retrying communication.
Step 209, in case of successful communication, performing data interaction.
In the embodiment of the application, on one hand, the monitoring of the interactive signal generated by the near field communication can be realized by acquiring the first waveform signal, and because the signal updating parameter is determined according to the interactive signal generated by the near field communication, the targeted adjustment of the waveform parameter of the second waveform signal can be realized, thereby solving the compatibility problem of the electronic equipment; on the other hand, the amplitude value of the first waveform signal can be improved by updating the waveform parameter of the second waveform signal to the signal updating parameter, and the higher the amplitude value of the first waveform signal is, the higher the probability of successful communication is, so that the success rate of communication with other external devices can be improved.
The near field communication circuit in the embodiment of the application is a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, mobile internet appliance (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-mobile personal computer, UMPC, netbook or personal digital assistant (personal digital assistant, PDA), etc., but may also be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
Optionally, as shown in fig. 8, the embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, where the memory 802 stores a program or an instruction that can be executed on the processor 801, and the program or the instruction implements each step of the above-mentioned near field communication circuit embodiment when executed by the processor 801, and can achieve the same technical effect, so that repetition is avoided, and no further description is given here.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
Fig. 9 is a schematic hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 900 includes, but is not limited to: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.
Those skilled in the art will appreciate that the electronic device 900 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 910 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 9 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
It should be appreciated that in an embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes image data of still pictures or video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. Touch panel 9071, also referred to as a touch screen. The touch panel 9071 may include two parts, a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
The memory 909 may be used to store software programs as well as various data. The memory 909 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 909 may include a volatile memory or a nonvolatile memory, or the memory 909 may include both volatile and nonvolatile memories. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory 909 in embodiments of the application includes, but is not limited to, these and any other suitable types of memory.
Processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, etc., and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 910.
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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, 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.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the related art in the form of a computer software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.