NFC pulse detection method and device, equipment and medium
By dynamically determining the amplitude threshold and detecting the pulse position, the traditional NFC pulse detection method is solved inaccurate detection in noise and interference environments, and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202411779236.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-18
AI Technical Summary
The traditional NFC pulse detection method relies on fixed amplitude thresholds and cannot adapt to the environment of noise, interference and signal amplitude changes, resulting in errors in detection and poor results.
By buffering the sampled signal of a preset length, the current amplitude threshold is dynamically determined based on the interference and noise amplitude in the cached signal, and the falling edge and rising edge positions of the pulse are detected based on the threshold to perform effectiveness detection.
Adaptively determine the amplitude threshold of pulse detection is realized, improving the accuracy and applicability of the threshold, and enhancing the accuracy of pulse detection.
Smart Images

Figure CN119653414A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of wireless communication technology, and in particular to an NFC pulse detection method, device, equipment and medium. Background Art
[0002] Near Field Communication (NFC) is a short-range wireless communication technology with a central frequency of 13.56MHz. NFC protocols include ISO14443, ISO15693, JISX6319-4 and other standards; taking ISO15693 as an example, according to ISO15693, VCD (Vicinity coupling device) transmits information to VICC (Vicinity integrated circuit card) using the position of the pulse. The modulation depth (modulation index, MI) of the pulse is divided into 100% and 10%. For example, when MI=10% is used for transmission, the minimum modulation depth that VCD can use is 10% and the maximum modulation depth is 30%. Different modulation depths correspond to different pulse amplitudes, see Figure 1 As shown in FIG. 1 , the greater the modulation depth, the greater the corresponding pulse amplitude. Therefore, the NFC pulse detection method needs to achieve good results for pulse waveforms of different amplitudes.
[0003] The traditional NFC pulse detection method uses a fixed amplitude threshold to detect pulses. When the amplitude of the signal is less than the threshold, it is judged that a pulse is detected. This method relies on a fixed threshold set by prior information and cannot be applied to environments with noise, interference, and signal amplitude changes. Especially now, the NFC function is an important configuration item for electronic devices such as smartphones. In this application environment, due to the high integration of devices and manufacturing processes, the amplitude of interference and noise varies greatly. The traditional NFC pulse detection method is very prone to errors and the detection effect is poor. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides an NFC pulse detection method, device, equipment and medium.
[0005] According to one aspect of the present disclosure, there is provided an NFC pulse detection method, comprising:
[0006] When the signal of the radio frequency field is detected, a sample signal of a preset length is cached in a first-in-first-out manner;
[0007] Determining a current amplitude threshold for pulse detection based on the amplitude of interference and noise in the first sampled signal and its previous signals in the buffer;
[0008] Detecting the true falling edge position of the target pulse based on the current amplitude threshold;
[0009] Starting pulse width counting at the falling edge position of the target pulse, and in the process of pulse width counting, searching for the position of the signal whose signal amplitude is greater than the current amplitude threshold as the pulse rising edge position;
[0010] Based on a preset width threshold range, the validity of the pulse between the falling edge position of the target pulse and the rising edge position of the pulse is detected.
[0011] According to another aspect of the present disclosure, there is also provided an NFC pulse detection device, comprising:
[0012] A signal buffer module is used to buffer a sampled signal of a preset length in a first-in-first-out manner after a signal of a radio frequency field is detected;
[0013] A threshold determination module, used to determine a current amplitude threshold for pulse detection based on the amplitude of interference and noise in the first sampled signal and its previous signals in the cache;
[0014] A falling edge determination module, used for detecting the true falling edge position of the target pulse based on the current amplitude threshold;
[0015] A rising edge determination module, used to start pulse width counting at the falling edge position of the target pulse, and during the pulse width counting process, search for a position where the signal amplitude is greater than the current amplitude threshold as the pulse rising edge position;
[0016] The pulse detection module is used to perform validity detection on the pulse between the falling edge position of the target pulse and the rising edge position of the pulse based on a preset width threshold range.
[0017] According to another aspect of the present disclosure, an electronic device is provided, the electronic device comprising:
[0018] processor;
[0019] a memory for storing instructions executable by the processor;
[0020] The processor is used to read the executable instructions from the memory and execute the instructions to implement the above method.
[0021] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the above method.
[0022] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0023] The technical solution provided by the embodiment of the present disclosure includes: after the signal of the radio frequency field is detected, the sampling signal of the preset length is cached in a first-in-first-out manner, so that the dynamic continuity of the signal can be maintained, and then the current amplitude threshold for pulse detection is determined based on the amplitude of the interference and noise in the first cached sampling signal and the previous signal, so that the current amplitude threshold can be dynamically determined as the signal amplitude changes, and it is more suitable for the environment where the amplitude of interference and noise changes greatly, and the amplitude threshold for detecting pulses is adaptively determined, and the applicability of the amplitude threshold to the changing interference and noise in the actual environment is improved, and the accuracy of the current amplitude threshold is higher; then, the real target pulse falling edge position is detected based on the current amplitude threshold; the pulse width counting is started at the target pulse falling edge position, and in the pulse width counting process, the position of the signal whose signal amplitude is greater than the current amplitude threshold is searched as the pulse rising edge position; based on the preset width threshold range, the pulse between the target pulse falling edge position and the pulse rising edge position is detected for validity. On the basis of improving the current amplitude threshold, this scheme can improve the accuracy of the pulse falling edge position and the pulse rising edge position based on the current amplitude threshold, thereby improving the accuracy of pulse detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0026] Figure 1 A schematic diagram of pulses with different modulation depths provided by an embodiment of the present disclosure;
[0027] Figure 2 is a flow chart of an NFC pulse detection method provided by an embodiment of the present disclosure;
[0028] Figure 3 is a flow chart of another NFC pulse detection method provided by an embodiment of the present disclosure;
[0029] Figure 4 is a schematic diagram of pulse falling edge position detection provided by an embodiment of the present disclosure;
[0030] Figure 5 is a schematic diagram of updating the amplitude threshold at the pulse rising edge position provided by an embodiment of the present disclosure;
[0031] Figure 6is a structural schematic diagram of an NFC pulse detection device provided by an embodiment of the present disclosure;
[0032] Figure 7 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0034] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0035] The traditional NFC pulse detection method uses a fixed amplitude threshold to detect pulses, which is not applicable to environments with noise, interference and signal amplitude changes. The detection is prone to errors and the effect is poor. In response to the above problems, the embodiments of the present disclosure provide an NFC pulse detection method, device, equipment and medium. The scheme is used to demodulate NFC pulse signals of different modulation depths. It can adaptively determine the amplitude threshold for detecting pulses according to the amplitude of interference and noise, thereby improving the applicability of the amplitude threshold to the changing interference and noise in the actual environment; based on the amplitude threshold, the accuracy of the falling edge position and the rising edge position of the pulse can be improved, thereby improving the accuracy of pulse detection. For ease of understanding, the embodiments of the present disclosure are described below.
[0036] Figure 2 The present invention provides a flowchart of an NFC pulse detection method according to an embodiment of the present invention. The method can be performed by an NFC pulse detection device, which can be implemented by software and / or hardware. Figure 2 As shown, an NFC pulse detection method may include the following steps.
[0037] S102, when a signal of the radio frequency field is detected, a sampling signal of a preset length is cached in a first-in-first-out manner.
[0038] In this embodiment, after the signal of the radio frequency field is detected by VICC (Vicinity integrated circuit card, induction card), a sampling signal of a preset length is cached in a preset buffer in a first-in-first-out manner, and the amplitude of noise and interference is estimated based on this; wherein the preset length of the cached sampling signal is, for example, L, that is, L sampling signals are cached, and the positions of the sampling signals are 1 to L. The preset length L is a positive integer, for example, L=31, but is not limited thereto.
[0039] S104, determining a current amplitude threshold for pulse detection based on the amplitude of interference and noise in the first sampled signal in the buffer and its previous signals.
[0040] In this embodiment, the first sampling signal at cache position 1 and its previous signals can be used to estimate the amplitude of interference and noise. For example, the amplitude mean and amplitude maximum of the interference and noise signals can be determined, and the current amplitude threshold for pulse detection can be determined based on the amplitude mean and amplitude maximum; the current amplitude threshold is a positive value.
[0041] Different from the existing fixed amplitude threshold that relies on prior information to set, the current amplitude threshold in this embodiment is determined based on the amplitude of interference and noise. Interference and noise are signals of the radio frequency field, which are real signals that may change at any time. Therefore, the current amplitude threshold determined by the amplitude of interference and noise is more accurate and more adaptable to real pulse signals. Using it for pulse detection can improve detection accuracy.
[0042] S106, detecting the actual falling edge position of the target pulse based on the current amplitude threshold.
[0043] As mentioned in the above embodiments, the sampled signals of the preset length L are cached in a first-in-first-out manner, and there are always signals entering within the preset length L. This is a continuous and dynamic process. In this process, the current amplitude threshold is determined according to the signals at and before the cache position 1; then, based on the current amplitude threshold, it is detected whether the signal amplitude at the cache position L meets the falling edge position condition, and the falling edge position condition may include: the signal amplitude at the cache position L is less than the negative value of the current amplitude threshold; that is, it is determined whether the signal amplitude at the cache position L is less than the negative value of the current amplitude threshold.
[0044] If the signal amplitude at cache position L is less than the negative value of the current amplitude threshold, cache position L is used as a candidate pulse falling edge position, and it is detected whether the candidate pulse falling edge position is a false detection; if it is a false detection, the real target pulse falling edge position is searched again after the candidate pulse falling edge position; if it is not a false detection, the candidate pulse falling edge position is determined to be the real target pulse falling edge position.
[0045] In addition, if the signal amplitude at the cache position L is not less than the negative value of the current amplitude threshold, the sampled signal of the preset length L is cached in a first-in-first-out manner, and the current amplitude threshold is updated in the process, and it is determined whether the signal amplitude at the new cache position L is less than the negative value of the new current amplitude threshold. This process is repeated until the real falling edge position of the target pulse is detected.
[0046] S108, starting pulse width counting at the falling edge position of the target pulse, and in the process of pulse width counting, searching for the position of the signal whose signal amplitude is greater than the current amplitude threshold as the pulse rising edge position.
[0047] This embodiment starts pulse width counting at the falling edge of the target pulse, sets the initial value of the pulse width counting to 0, and then increases the count value by 1 for each subsequent search of a sampling point. During the pulse width counting process, the position of the signal whose amplitude is greater than the current amplitude threshold is searched as the pulse rising edge position.
[0048] S110, based on a preset width threshold range, performing validity detection on the pulse between the falling edge position of the target pulse and the rising edge position of the pulse.
[0049] As an example, it can be determined whether the pulse width between the falling edge position of the target pulse and the rising edge position of the pulse is within a preset width threshold range; if so, it is determined to be valid; if not, it is determined to be invalid.
[0050] For better understanding, refer to Figure 2 This embodiment describes the NFC pulse detection method in detail. Figure 3 As shown, the NFC pulse detection method may include the following steps.
[0051] S201, after detecting the signal of the radio frequency field, cache the sampled signal of a preset length in a first-in-first-out manner. Figure 4 As shown, the sampling signal of the preset length L is buffered in a first-in-first-out manner by the buffer.
[0052] Based on the amplitude of interference and noise in the first sampled signal in the buffer and its previous signals, the current amplitude threshold for pulse detection is determined, and the implementation process thereof may refer to steps S202-S204.
[0053] S202, using a preset filter to determine the amplitude mean of interference and noise in the first sampling signal and its previous signals; wherein the preset filter can be a series-connected low-pass IIR filter (Infinite Impulse Response, IIR digital filter, recursive filter), for example, including a first-stage IIR low-pass filter and a second-stage IIR low-pass filter connected in series.
[0054] Assuming the input signal is S(i), the output of the first-stage IIR low-pass filter is N1me(i) = (N-1) / N×N1me(i-1) + 1 / N×abs(S(i)); the output of the second-stage IIR low-pass filter is Nme(i) = (M-1) / M×Nme(i-1) + 1 / M×N1me(i). Among them, abs() is an absolute value operation. i = 1, 2, ..., representing the sampled signal count value. N and M are both positive integers, and N>M. As an example, N = 16, M = 4. N1me(0) = Nme(0) = abs(S(0)). Of course, N and M can also sample other values, which are not limited here.
[0055] S203, determine the maximum amplitude of interference and noise in the first sampled signal and its previous signals. Specifically, the maximum amplitude of noise and interference may be Nma(i)=max(abs(S(i))). Wherein, max() is a maximum value operation.
[0056] S204, determining a current amplitude threshold for pulse detection according to the amplitude mean and the amplitude maximum.
[0057] In a specific example, the current amplitude threshold can be determined according to the following formula:
[0058] Th(i)=max(α×Nme(i),β×Nma(i));
[0059] Wherein, Th(i) represents the current amplitude threshold, α and β are positive real numbers, for example, α=2, β=5 / 4.
[0060] After the current amplitude threshold is determined, the actual falling edge position of the target pulse is detected according to steps S205-S210.
[0061] S205, detecting whether the amplitude of the target sampling signal is less than the negative value of the current amplitude threshold (ie -Th(i)); wherein the target sampling signal is the sampling signal at the last position in the sampling signal of a preset length, that is, the sampling signal at the cache position L.
[0062] If not, the process returns to the step of caching the sampled signal of the preset length in a first-in-first-out manner in S201, that is, continuing to cache the sampled signal of the preset length L, and in this process updating the current amplitude threshold and determining whether the signal amplitude of the new cache position L is less than the negative value of the new current amplitude threshold. This process is repeated until it is detected that the signal amplitude of the new cache position L is less than the negative value of the new current amplitude threshold, and then the following step S206 is executed.
[0063] S206: If the amplitude of the target sampling signal is less than the negative value of the current amplitude threshold, the position of the target sampling signal is determined as the candidate pulse falling edge position.
[0064] like Figure 4 As shown, the position where the amplitude of the target sampling signal is less than the negative value -Th(i) of the current amplitude threshold is searched and taken as the candidate pulse falling edge position. The signal amplitude AmpD of the candidate pulse falling edge position is recorded.
[0065] After searching for the candidate pulse falling edge position, the calculation of the current amplitude threshold is completed, and the current amplitude threshold is expressed as Thini=Th(i).
[0066] S207, starting pulse width counting at the falling edge position of the candidate pulse, and during the pulse width counting process, determining whether a signal with a signal amplitude greater than a preset first amplitude threshold is detected.
[0067] The pulse width count starts with an initial value of 0 at the falling edge of the candidate pulse, and the count value increases by 1 for each subsequent search of a sampling point. During the pulse width counting process, it is determined whether a signal with a signal amplitude greater than the first amplitude threshold is detected. The first amplitude threshold (expressed as Th1) is the first multiple of the current amplitude threshold Thini, and the first multiple is less than 1; for example, Th1 = Thini / 4.
[0068] S208, if not detected, determine the candidate pulse falling edge position as the true target pulse falling edge position. No signal with a signal amplitude greater than the first amplitude threshold is detected after the candidate pulse falling edge position, indicating that the candidate pulse falling edge position is accurate, not a false detection, and thus, it is taken as the true target pulse falling edge position.
[0069] S209, if detected, search for the position of the signal whose signal amplitude is less than the preset second amplitude threshold as the true target pulse falling edge position; wherein the second amplitude threshold (expressed as Th2) is the second multiple of the signal amplitude AmpD of the candidate pulse falling edge position, and the second multiple is greater than 1; for example, Th2 = γ × AmpD, γ = 1.25.
[0070] A signal with an amplitude greater than the first amplitude threshold is detected after the candidate pulse falling edge position, indicating that the candidate pulse falling edge position is a false detection. Therefore, after the signal with an amplitude greater than the first amplitude threshold, the search continues for the position of the signal with an amplitude less than the second amplitude threshold Th2, and the searched position (represented as Dp1) is used as the true target pulse falling edge position.
[0071] S210, starting pulse width counting at the falling edge position of the target pulse, and in the process of pulse width counting, searching for the position of the signal whose signal amplitude is greater than the current amplitude threshold as the pulse rising edge position.
[0072] In this embodiment, the pulse width count is restarted from the initial value 0 at the falling edge position of the target pulse, and the count value is increased by 1 for each subsequent search of a sampling point. During the pulse width counting period, the position of the signal whose signal amplitude is greater than the current amplitude threshold Thini is searched as the pulse rising edge position. The pulse width counting stops after the pulse rising edge position is searched.
[0073] S211, recording the pulse width value from the falling edge position of the target pulse to the rising edge position of the pulse. In this embodiment, the pulse width counting starts at the falling edge position of the target pulse, stops after searching the rising edge position of the pulse, and records the pulse width value (expressed as IW).
[0074] S212, determining whether the pulse width value is within a preset width threshold range.
[0075] In one example, it can be determined whether the pulse width value IW is greater than a preset first width threshold Wth1 and less than a preset second width threshold Wth2, where the first width threshold Wth1 and the second width threshold Wth2 are positive integers. Taking a sampling rate of 13.56 MHz as an example, specifically Wth1=62, Wth2=156.
[0076] S213, if yes, determine whether the pulse between the target pulse falling edge position and the pulse rising edge position is valid.
[0077] S214, if not, it is determined that the pulse between the target pulse falling edge position and the pulse rising edge position is invalid.
[0078] At this point, the pulse validity detection between the current target pulse falling edge position and the pulse rising edge position can be completed, and then the current amplitude threshold used for pulse detection is updated, and then the pulse validity detection between the target pulse falling edge position and the pulse rising edge position is entered again. This cycle is repeated to continuously capture pulse signals and detect the validity of the pulse.
[0079] The above-mentioned embodiment of updating the current amplitude threshold for pulse detection may include: updating the current amplitude threshold for pulse detection at the pulse rising edge position and / or the pulse falling edge position.
[0080] In one embodiment, updating the current amplitude threshold for pulse detection at the pulse rising edge position may include the following step S215.
[0081] S215, recording the minimum signal amplitude between the falling edge position of the target pulse and the rising edge position of the pulse; at the rising edge position of the pulse, updating the current amplitude threshold for pulse detection according to the minimum signal amplitude.
[0082] In a specific embodiment, the pulse width counting starts at the falling edge of the target pulse and stops when the rising edge of the pulse is found. During this pulse width counting process, the minimum signal amplitude (expressed as AmpMin) is recorded. Figure 5 As shown, at the pulse rising edge position, the current amplitude threshold for pulse detection is updated according to the following formula and the minimum signal amplitude AmpMin:
[0083] Thup=(K-1) / K×Thini+1 / K×abs(AmpMin)
[0084] Wherein, abs(AmpMin) represents the absolute value of the minimum signal amplitude, Thini represents the current amplitude threshold before updating, and Thup represents the current amplitude threshold after updating; K is a preset positive integer, for example, K=4.
[0085] The above embodiment updates the current amplitude threshold according to the minimum signal amplitude, so that the amplitude threshold used for pulse detection can be dynamically updated as the signal amplitude changes, which is more adaptable to environments with large amplitude changes of interference and noise, improves the accuracy of the current amplitude threshold, and can more accurately detect pulses of different amplitudes.
[0086] In this embodiment, the amplitude threshold used for pulse detection is the updated current amplitude threshold Thup. Based on the new current amplitude threshold Thup, the step of caching the sampled signal of the preset length in a first-in-first-out manner is returned, and then the pulse detection process of steps S205-S214 is repeated using the current amplitude threshold Thup.
[0087] A specific example is that after the pulse rising edge position, a sampling signal of a preset length L is cached in a first-in-first-out manner; when it is detected that the amplitude of the target sampling signal at the cache position L is less than the negative value of the current amplitude threshold (i.e., -Thup), the position of the target sampling signal is determined as the candidate pulse falling edge position; pulse width counting is started at the candidate pulse falling edge position, and during the pulse width counting process, if a signal with an amplitude greater than the first amplitude threshold is detected, the position of the signal with an amplitude less than the second amplitude threshold is searched as the actual target pulse falling edge position; based on the preset width threshold range, the pulse between the target pulse falling edge position and the pulse rising edge position is checked for validity.
[0088] In another embodiment, updating the current amplitude threshold for pulse detection at the pulse falling edge position may include the following step S216.
[0089] S216, recording the maximum signal amplitude between the pulse rising edge position and the next target pulse falling edge position; at the next target pulse falling edge position, updating the current amplitude threshold for pulse detection according to the maximum signal amplitude.
[0090] In a specific embodiment, the maximum signal amplitude (expressed as AmpMax) is recorded between the rising edge position of the pulse and the falling edge position of the next target pulse. At the falling edge position of the next target pulse, the current amplitude threshold for pulse detection is updated according to the following formula and the maximum signal amplitude AmpMax:
[0091] Thup ′ =(K-1) / K×Thup+1 / K×AmpMax
[0092] Among them, Thup represents the current amplitude threshold before updating, Thup ′ Represents the updated current amplitude threshold; K is a preset positive integer.
[0093] In this embodiment, the amplitude threshold used for pulse detection is the updated current amplitude threshold Thup. ′ Based on the new current amplitude threshold Thup ′ , return to the step of caching the sampled signal of the preset length in a first-in-first-out manner, and then use the current amplitude threshold Thup ′ The pulse detection process of steps S205-S214 is repeated. Specific details can be referred to the above embodiment, which will not be described again.
[0094] Based on the above embodiment, the current amplitude threshold for pulse detection is updated, and the pulse validity detection between the target pulse falling edge position and the pulse rising edge position is entered again, and this cycle is repeated to continuously capture the pulse signal and detect the validity of the pulse.
[0095] In summary, the NFC pulse detection method provided by the embodiment of the present disclosure includes: after detecting the signal of the radio frequency field, caching the sampling signal of a preset length in a first-in-first-out manner; determining the current amplitude threshold for pulse detection based on the amplitude of interference and noise in the first cached sampling signal and its previous signals; detecting the real target pulse falling edge position based on the current amplitude threshold; starting pulse width counting at the target pulse falling edge position, and during the pulse width counting process, searching for the position of the signal whose signal amplitude is greater than the current amplitude threshold as the pulse rising edge position; based on the preset width threshold range, performing validity detection on the pulse between the target pulse falling edge position and the pulse rising edge position.
[0096] The technical solution caches sampling signals of preset length in a first-in-first-out manner, which can maintain the dynamic continuity of the signal, and then uses the amplitude of interference and noise in these signals to determine the current amplitude threshold for pulse detection, so that the current amplitude threshold can be dynamically determined as the signal amplitude changes, which is more adaptable to environments with large amplitude changes of interference and noise, and realizes adaptive determination of the amplitude threshold for detecting pulses, thereby improving the applicability of the amplitude threshold to changing interference and noise in the actual environment; based on the amplitude threshold, the accuracy of the pulse falling edge position and the pulse rising edge position can be improved, thereby improving the accuracy of pulse detection.
[0097] Figure 6 The following is a schematic diagram of the structure of an NFC pulse detection device provided in an embodiment of the present disclosure. The device can be used to implement the above-mentioned NFC pulse detection method. The device can be implemented by software and / or hardware. Figure 6 As shown, an NFC pulse detection device may include the following modules.
[0098] The signal buffer module 310 is used to buffer the sampled signal of a preset length in a first-in-first-out manner after the signal of the radio frequency field is detected;
[0099] A threshold determination module 320, for determining a current amplitude threshold for pulse detection based on the amplitude of interference and noise in the first sampled signal and its previous signals in the cache;
[0100] A falling edge determination module 330, configured to detect a true falling edge position of a target pulse based on the current amplitude threshold;
[0101] A rising edge determination module 340 is used to start pulse width counting at the falling edge position of the target pulse, and during the pulse width counting process, search for a position of a signal whose signal amplitude is greater than the current amplitude threshold as a pulse rising edge position;
[0102] The pulse detection module 350 is used to perform validity detection on the pulse between the falling edge position of the target pulse and the rising edge position of the pulse based on a preset width threshold range.
[0103] The implementation principle and technical effects of the device provided in this embodiment are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0104] Figure 7 The structure diagram of an electronic device provided by the embodiment of the present disclosure is shown in FIG. Figure 7 As shown, the electronic device 400 includes one or more processors 401 and a memory 402 .
[0105] The processor 401 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.
[0106] The memory 402 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 401 may run the program instructions to implement the NFC pulse detection method of the embodiment of the present disclosure described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0107] In one example, the electronic device 400 may further include: an input device 403 and an output device 404, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0108] In addition, the input device 403 may also include, for example, a keyboard, a mouse, and the like.
[0109] The output device 404 can output various information to the outside, including the determined distance information, direction information, etc. The output device 404 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0110] Of course, to simplify, Figure 7 Only some of the components related to the present disclosure in the electronic device 400 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 400 may also include any other appropriate components.
[0111] Furthermore, this embodiment also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the above NFC pulse detection method.
[0112] An NFC pulse detection method, device, electronic device, and computer program product of a medium provided in the embodiments of the present disclosure include a computer-readable storage medium storing a program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be referred to the method embodiment, which will not be repeated here.
[0113] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0114] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A NFC pulse detection method, characterized in that: include: When the signal of the radio frequency field is detected, a sample signal of a preset length is cached in a first-in-first-out manner; Determining a current amplitude threshold for pulse detection based on the amplitude of interference and noise in the first sampled signal and its previous signals in the buffer; Detecting the true falling edge position of the target pulse based on the current amplitude threshold; Starting pulse width counting at the falling edge position of the target pulse, and in the process of pulse width counting, searching for the position of the signal whose signal amplitude is greater than the current amplitude threshold as the pulse rising edge position; Based on a preset width threshold range, the validity of the pulse between the falling edge position of the target pulse and the rising edge position of the pulse is detected.
2. The method according to claim 1, characterized in that The determining of a current amplitude threshold for pulse detection based on the amplitude of interference and noise in the first sampled signal and its previous signals in the cache includes: Using a preset filter to determine the amplitude mean of interference and noise in the first sampled signal and its previous signals; wherein the preset filter includes a first-order IIR low-pass filter and a second-order IIR low-pass filter connected in series; Determine the maximum amplitude of interference and noise in the first sampled signal and its previous signals; A current amplitude threshold for pulse detection is determined according to the amplitude mean value and the amplitude maximum value.
3. The method according to claim 1, characterized in that The detecting the real falling edge position of the target pulse based on the current amplitude threshold comprises: Detecting whether the amplitude of the target sampling signal is less than the negative value of the current amplitude threshold; wherein the target sampling signal is the sampling signal at the last position in the sampling signal of the preset length; If it is not less than, returning to the step of caching the sampled signal of the preset length in a first-in-first-out manner; If it is less than, determining the position of the target sampling signal as the candidate pulse falling edge position; Starting pulse width counting at the falling edge position of the candidate pulse; During the pulse width counting process, determining whether a signal with a signal amplitude greater than a preset first amplitude threshold is detected; If not detected, determining the candidate pulse falling edge position as the true target pulse falling edge position; If detected, the position of the signal whose amplitude is less than a preset second amplitude threshold is searched as the actual target pulse falling edge position; wherein the first amplitude threshold is a first multiple of the current amplitude threshold, and the first multiple is less than 1; the second amplitude threshold is a second multiple of the signal amplitude at the candidate pulse falling edge position, and the second multiple is greater than 1.
4. The method according to claim 1, characterized in that: The validity detection of the pulse between the falling edge position of the target pulse and the rising edge position of the pulse based on the preset width threshold range includes: Recording the pulse width value between the falling edge position of the target pulse and the rising edge position of the pulse; Determining whether the pulse width value is within a preset width threshold range; If yes, determining that the pulse between the falling edge position of the target pulse and the rising edge position of the pulse is valid; If not, it is determined that the pulse between the target pulse falling edge position and the pulse rising edge position is invalid.
5. The method according to claim 1, characterized in that The method further comprises: Recording the minimum signal amplitude between the falling edge position of the target pulse and the rising edge position of the pulse; At the pulse rising edge position, the current amplitude threshold for pulse detection is updated according to the minimum signal amplitude.
6. The method according to claim 5, characterized in that The updating of the current amplitude threshold for pulse detection according to the minimum signal amplitude comprises: The current amplitude threshold for pulse detection is updated according to the following formula and the minimum signal amplitude: Thup=(K-1) / K×Thini+1 / K×abs(AmpMin) Wherein, abs(AmpMin) represents the absolute value of the minimum signal amplitude, Thini represents the current amplitude threshold before updating, Thup represents the current amplitude threshold after updating; and K is a preset positive integer.
7. The method according to claim 1 or 5, characterized in that: The method further comprises: Recording the maximum signal amplitude between the rising edge position of the pulse and the falling edge position of the next target pulse; At the falling edge position of the next target pulse, the current amplitude threshold for pulse detection is updated according to the maximum signal amplitude.
8. An NFC pulse detection device, characterized in that: include: A signal buffer module is used to buffer a sampled signal of a preset length in a first-in-first-out manner after a signal of a radio frequency field is detected; A threshold determination module, used to determine a current amplitude threshold for pulse detection based on the amplitude of interference and noise in the first sampled signal and its previous signals in the cache; A falling edge determination module, used for detecting the true falling edge position of the target pulse based on the current amplitude threshold; A rising edge determination module, used to start pulse width counting at the falling edge position of the target pulse, and during the pulse width counting process, search for a position where the signal amplitude is greater than the current amplitude threshold as the pulse rising edge position; The pulse detection module is used to perform validity detection on the pulse between the falling edge position of the target pulse and the rising edge position of the pulse based on a preset width threshold range.
9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 1 to 7.
Citation Information
Cited By
Near field communication methods and devices
US20260050755A1