Electronic device, near field communication control method and apparatus
By introducing an object proximity detection sensor and an audio power amplifier into electronic devices and dynamically switching the operating parameters of the near-field communication module, the problem of NFC antennas being susceptible to magnetic interference from speakers is solved, thereby reducing the probability of false wake-ups and power consumption while improving sensing sensitivity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- VIVO MOBILE COMM CO LTD
- Filing Date
- 2026-04-21
- Publication Date
- 2026-07-10
AI Technical Summary
NFC antennas in electronic devices are susceptible to magnetic interference from speakers, leading to frequent false wake-ups, increased power consumption, and reduced sensing sensitivity. Existing technologies struggle to balance anti-interference capabilities with card reading performance.
By introducing an object proximity detection sensor and an audio power amplifier, the operating parameters of the near-field communication module are dynamically switched by detecting the proximity status of the near-field communication device and the operating status of the speaker, thereby reducing magnetic interference and improving sensing sensitivity.
It effectively reduces the probability of NFC false wake-up, reduces power consumption, and improves the wake-up response capability to external near-field communication devices, while taking into account both anti-interference capability and card reading performance.
Smart Images

Figure CN122372965A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of near-field communication technology, specifically relating to an electronic device, a near-field communication control method and apparatus. Background Technology
[0002] NFC (Near Field Communication) is a short-range wireless communication technology widely used in access control, payment, and data transmission. In electronic devices, NFC typically operates in LPCD (Low Power Card Detection) mode. In LPCD mode, NFC determines the presence of an external card or device by detecting changes in radio frequency signals that exceed a set threshold range. Upon detecting an external card or device approaching, NFC exits LPCD mode and initiates near-field communication.
[0003] Due to certain functional requirements, NFC antennas need to be stacked on top of electronic devices. However, with the increasing size of camera modules and the introduction of cooling fans in electronic devices, NFC antennas often need to be stacked or placed close to components such as speakers. When a speaker is operating, changes in the current in its internal coil generate a changing magnetic field. This changing magnetic field can cause magnetic interference to the NFC antenna, leading to NFC misinterpreting the presence of external cards or devices, causing it to frequently exit LPCD mode and enter polling mode, increasing power consumption.
[0004] In related technologies, the probability of false NFC wake-ups is typically reduced by increasing the wake-up threshold for NFC to exit LPCD mode. However, this reduces the NFC's sensitivity to real cards. Therefore, the NFC control methods in these technologies struggle to balance NFC's anti-interference capabilities with its card reading performance. Summary of the Invention
[0005] The purpose of this application is to provide an electronic device, a near-field communication control method and apparatus that can balance the anti-interference capability and card reading performance of NFC.
[0006] In a first aspect, embodiments of this application provide an electronic device, including: an audio power amplifier; a near-field communication module for interacting with an external near-field communication device; an object proximity detection sensor connected to the near-field communication module, the object proximity detection sensor being used to detect the proximity status of the near-field communication device and report a moving-away status or a moving-close status; and a main control module connected to the audio power amplifier, the near-field communication module, and the object proximity detection sensor, the main control module being used to control the operating parameters of the near-field communication module according to the operating status of the audio power amplifier and the proximity status reported by the object proximity detection sensor.
[0007] Secondly, embodiments of this application provide a near-field communication control method for an electronic device of the first aspect. The near-field communication control method includes: acquiring the operating state of an audio power amplifier; acquiring the proximity state reported by an object proximity detection sensor, the proximity state including a moving-away state and a moving-close state; and controlling the operating parameters of a near-field communication module based on the operating state of the audio power amplifier and the proximity state reported by the object proximity detection sensor.
[0008] Thirdly, embodiments of this application provide a near-field communication control device for the electronic device of the first aspect. The near-field communication control device includes: an acquisition unit for acquiring the operating state of an audio power amplifier; the acquisition unit is further configured to acquire the proximity state reported by an object proximity detection sensor, the proximity state including a moving-away state and a moving-close state; and a control unit for controlling the operating parameters of the near-field communication module according to the operating state of the audio power amplifier and the proximity state reported by the object proximity detection sensor.
[0009] Fourthly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and when the program or instructions are executed by the processor, they implement the steps of the near-field communication control method as described in the second aspect.
[0010] Fifthly, embodiments of this application provide a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the near-field communication control method as described in the second aspect.
[0011] In a sixth aspect, embodiments of this application provide a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps of the near-field communication control method as described in the second aspect.
[0012] In a seventh aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the steps of the near-field communication control method as described in the second aspect.
[0013] The electronic device provided in this application includes an audio power amplifier, a near-field communication module, an object proximity detection sensor, and a main control module. The object proximity detection sensor is connected to the near-field communication module, and the main control module is connected to the audio power amplifier, the near-field communication module, and the object proximity detection sensor. During operation, the near-field communication module interacts with external near-field communication devices, the object proximity detection sensor detects the proximity status of the near-field communication device and reports a moving-away or moving-close state, and the main control module controls the operating parameters of the near-field communication module based on the operating status of the audio power amplifier and the proximity status reported by the object proximity detection sensor. This electronic device, by simultaneously determining the proximity status of the near-field communication device and the operating status of the audio power amplifier, dynamically switches the operating parameters of the near-field communication module according to different usage scenarios. In this way, on the one hand, the operating state of the audio power amplifier reflects the operating state of the speaker. Switching the operating parameters of the near-field communication module based on the operating state of the audio power amplifier helps reduce magnetic interference from the speaker to the near-field communication module, thereby reducing the probability of false wake-up and lowering power consumption. On the other hand, switching the operating parameters of the near-field communication module based on the proximity status of the near-field communication device facilitates the improvement of the near-field communication module's wake-up response capability to external near-field communication devices, enhancing sensing sensitivity. Therefore, the above-mentioned electronic device can balance the anti-interference capability of NFC with card reading performance. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0015] Figure 2 This is one of the schematic diagrams of device layout in an electronic device provided in the embodiments of this application;
[0016] Figure 3 This is one of the structural schematic diagrams of the near-field communication module provided in the embodiments of this application;
[0017] Figure 4 This is the second schematic diagram of the device layout in the electronic device provided in the embodiments of this application;
[0018] Figure 5 This is the second schematic diagram of the near-field communication module provided in the embodiments of this application;
[0019] Figure 6 This is one of the structural block diagrams of the electronic device provided in the embodiments of this application;
[0020] Figure 7 One of the flowcharts of the near-field communication control method provided in the embodiments of this application;
[0021] Figure 8A second schematic flowchart of the near-field communication control method provided in the embodiments of this application;
[0022] Figure 9 A structural block diagram of the near-field communication control device provided in the embodiments of this application;
[0023] Figure 10 This is a second structural block diagram of the electronic device provided in the embodiments of this application;
[0024] Figure 11 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application.
[0025] Figure label:
[0026] 100 Electronic device, 102 Near-field communication module, 104 Object proximity detection sensor, 106 Main control module, 108 Near-field communication chip, 110 First antenna path, 112 First matching network, 114 First path control switch, 116 First near-field communication antenna, 118 Second antenna path, 120 Second matching network, 122 Second near-field communication antenna, 124 Reference channel, 126 Detection channel, 128 Main RF antenna, 130 First inductor, 132 Second inductor, 134 Speaker, 136 Audio power amplifier, 138 Second path control switch, 200 Near-field communication device. Detailed Implementation
[0027] The embodiments of this application will now be described in detail. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0028] The terms "first" and "second" in the specification and claims of this application may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0029] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0030] The following is combined Figures 1-11 The electronic device, near-field communication control method, and apparatus according to embodiments of this application will be described in detail.
[0031] like Figure 1 As shown in the figure, this application embodiment provides an electronic device 100. The electronic device 100 includes an audio power amplifier 136.
[0032] Optionally, such as Figure 6 As shown, the electronic device 100 also includes a speaker 134, and an audio power amplifier 136 is connected to the speaker 134. The audio power amplifier 136 is used to drive the speaker 134 to work.
[0033] Specifically, such as Figure 1 As shown, the electronic device 100 also includes a near-field communication module 102, an object proximity detection sensor 104, and a main control module 106.
[0034] Among them, the near field communication module 102, also known as the NFC module, is used to interact with the external near field communication device 200.
[0035] Optionally, the near-field communication device 200 is a device with NFC functionality. In practical applications, the near-field communication device 200 may include, but is not limited to, NFC cards, mobile phones, NFC tags, access control cards, and payment terminals, etc., without specific limitations.
[0036] Optionally, the electronic device 100 is a device with NFC functionality. In practical applications, the electronic device 100 can be a smartphone, tablet computer, PDA, laptop computer, smartwatch, or other smart device, without any specific limitations.
[0037] Optionally, the object proximity detection sensor 104 is connected to the near-field communication module 102.
[0038] Optionally, the object proximity detection sensor 104 is used to detect the proximity status of the near-field communication device 200 and report a moving-away or moving-close status. The moving-close status corresponds to the user's intention to read, swipe, or touch the device.
[0039] In practical applications, the object proximity detection sensor 104 includes, but is not limited to: SAR (Specific Absorption Rate) sensor, capacitive proximity sensor, or other detection devices that can reflect the change in distance between the near field communication device 200 and the NFC sensing area, without specific limitations.
[0040] Optionally, the main control module 106 is connected to the audio power amplifier 136, the near-field communication module 102, and the object proximity detection sensor 104.
[0041] Optionally, the main control module 106 is used to control the operating parameters of the near-field communication module 102 based on the operating status of the audio power amplifier 136 and the proximity status reported by the object proximity detection sensor 104.
[0042] Among them, the operating parameters of the near-field communication module 102 are the parameters that affect the wake-up sensitivity or anti-interference capability of the near-field communication module 102. In actual application, the operating parameters of the near-field communication module 102 include, but are not limited to: wake-up threshold for exiting LPCD mode, card search parameters, polling parameters, antenna path enable parameters, and transmission channel selection parameters, etc., which are not specifically limited here.
[0043] It is understandable that in practical applications, such as Figure 2 As shown, in electronic device 100, based on certain functional requirements, the NFC antenna needs to be spatially stacked or arranged adjacent to devices such as speaker 134. When speaker 134 is working, it will generate magnetic interference to the NFC antenna, causing frequent false NFC wake-ups and increasing power consumption.
[0044] In related technologies, the probability of false NFC wake-ups is typically reduced by increasing the NFC wake-up threshold. However, this reduces the NFC's sensitivity to real cards. Therefore, the NFC control methods in these technologies struggle to balance NFC's anti-interference capabilities with its card reading performance.
[0045] Based on this, in the electronic device 100 of this application embodiment, an object proximity detection sensor 104 is added to detect the proximity status of the external near-field communication device 200 and report the state of being far away or close. Then, combined with the judgment of the operating state of the audio power amplifier 136, i.e., the judgment of the operating state of the speaker 134, the operating parameters of the near-field communication module 102 are dynamically switched according to different usage scenarios. In this way, on the one hand, switching the operating parameters of the near-field communication module 102 based on the operating state of the audio power amplifier 136 reduces the magnetic interference of the speaker 134 to the near-field communication module 102, lowers the probability of false wake-up of the near-field communication module 102, and reduces power consumption; on the other hand, switching the operating parameters of the near-field communication module 102 based on the proximity status of the near-field communication device 200 improves the wake-up response capability of the near-field communication module 102 to the external near-field communication device 200 and enhances sensing sensitivity.
[0046] Specifically, the operating parameters of the near-field communication module 102 include a first operating parameter and a second operating parameter. The first operating parameter corresponds to a higher near-field communication wake-up response capability, and the second operating parameter corresponds to a lower probability of false wake-up due to speaker 134 interference. Based on this, the main control module 106 is configured to: control the near-field communication module 102 to use the first operating parameter when the proximity state is a near state; control the near-field communication module 102 to use the second operating parameter when the proximity state is a far state and the audio power amplifier 136 is in an active state; and control the near-field communication module 102 to use the first operating parameter when the proximity state is a far state and the audio power amplifier 136 is in an inactive state.
[0047] An electronic device 100 according to an embodiment of this application includes an audio power amplifier 136, a near-field communication module 102, an object proximity detection sensor 104, and a main control module 106. The object proximity detection sensor 104 is connected to the near-field communication module 102, and the main control module 106 is connected to the audio power amplifier 136, the near-field communication module 102, and the object proximity detection sensor 104. During operation of the electronic device 100, the near-field communication module 102 interacts with an external near-field communication device 200, the object proximity detection sensor 104 detects the proximity status of the near-field communication device 200 and reports a moving-away or moving-close state, and the main control module 106 controls the operating parameters of the near-field communication module 102 based on the operating status of the audio power amplifier 136 and the proximity status reported by the object proximity detection sensor 104. The electronic device 100 dynamically switches the operating parameters of the near-field communication module 102 according to different usage scenarios by simultaneously introducing the determination of the proximity status of the near-field communication device 200 and the operating status of the audio power amplifier 136. Thus, on the one hand, the operating state of the audio power amplifier 136 reflects the operating state of the speaker 134. Switching the operating parameters of the near-field communication module 102 based on the operating state of the audio power amplifier 136 helps reduce the magnetic interference of the speaker 134 to the near-field communication module 102, thereby reducing the probability of false wake-up of the near-field communication module 102 and reducing power consumption. On the other hand, switching the operating parameters of the near-field communication module 102 based on the proximity state of the near-field communication device 200 facilitates the improvement of the near-field communication module 102's wake-up response capability to the external near-field communication device 200, and improves sensing sensitivity. Therefore, the above-mentioned electronic device 100 can balance the anti-interference capability of NFC and card reading performance.
[0048] According to some embodiments of this application, optionally, such as Figure 1 As shown, the object proximity detection sensor 104 includes a reference channel 124 and a detection channel 126.
[0049] Reference channel 124 is used to obtain the first detection value, and detection channel 126 is used to obtain the second detection value.
[0050] Optionally, the object proximity detection sensor 104 is used to determine the proximity status of the near-field communication device 200 based on the first detection value and the second detection value, and to report the proximity status or the distance status.
[0051] Specifically, the object proximity detection sensor 104 calculates the detection difference between the first detection value and the second detection value in real time according to a preset sampling frequency, and then determines the proximity status of the near-field communication device 200 based on the change of the detection difference.
[0052] The specific value of the preset sampling frequency can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here.
[0053] Specifically, the object proximity detection sensor 104 calculates the change in the detection difference within each preset period. Based on this, if the change in the detection difference within the preset period is greater than a first value, the object proximity detection sensor 104 determines that the near-field communication device 200 is close to the electronic device 100 and reports the proximity status. Conversely, if the detection difference is greater than a second value and persists for a first duration (e.g., in scenarios where the electronic device 100 is continuously placed on a table or an NFC card is placed inside the protective case of the electronic device 100), or if the detection difference is less than a third value and persists for a second duration, the object proximity detection sensor 104 determines that the near-field communication device 200 is moving away from the electronic device 100 and reports the moving-away status.
[0054] The specific duration of the preset period can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here.
[0055] Optionally, the first value is less than the second value, or the first value is greater than the third value.
[0056] In practical applications, the specific values of the first, second, and third values can be set by those skilled in the art based on actual conditions such as device stacking, magnetic interference strength of speaker 134, NFC antenna position, and SAR sensitivity requirements. For example, the first value can be 8000, the second value can be 15000, and the third value can be 200. No specific restrictions are imposed here.
[0057] Optionally, both the first duration and the second duration are greater than or equal to the preset period.
[0058] In practical applications, those skilled in the art can set the specific values of the first duration and the second duration according to the actual situation. For example, the first duration and the second duration are both 1 minute, and no specific restrictions are made here.
[0059] In practical applications, the change in the detection difference within each preset period can be determined by the difference between the most recently calculated detection difference within each preset period and the minimum value among the multiple historically calculated detection differences within each preset period. For example, if each preset period includes 11 detection differences, the difference between the 11th detection difference and the minimum value among the previous 10 detection differences is determined as the change in the detection difference within the preset period.
[0060] In practical applications, the change in the detection difference within each preset period can also be determined by the difference between the average of multiple detection differences calculated in the first half of each preset period and the average of multiple detection differences calculated in the second half of each preset period.
[0061] In practical applications, the specific calculation method for the change in the detection difference within each preset period can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here.
[0062] According to an embodiment of this application, the electronic device 100 includes an object proximity detection sensor 104 comprising: a reference channel 124 for acquiring a first detection value; and a detection channel 126 for acquiring a second detection value. Specifically, the object proximity detection sensor 104 is used to: calculate the detection difference between the first and second detection values according to a preset sampling frequency; calculate the change in the detection difference within each preset period according to a preset cycle; report a proximity state when the change in the detection difference within the preset period is greater than a first value; and report a distance state when the detection difference is greater than a second value for a first duration, or when the detection difference is less than a third value for a second duration, wherein the first value is less than the second value, the first value is greater than the third value, and both the first and second durations are greater than or equal to the preset cycle. Thus, by combining differential detection with the judgment of the periodic changes in the differential detection results, the proximity state of the near-field communication device 200 relative to the electronic device 100 is detected, improving the accuracy of proximity state determination.
[0063] According to some embodiments of this application, optionally, such as Figure 1 As shown, the electronic device 100 also includes a main radio frequency antenna 128, a first inductor 130, and a second inductor 132.
[0064] The main radio frequency antenna 128 is at least partially formed by the metal frame of the electronic device 100.
[0065] Optionally, the first end of the first inductor 130 is connected to the main radio frequency antenna 128, and the second end of the first inductor 130 is connected to the detection channel 126. In this way, the main radio frequency antenna 128 is reused as a SAR antenna.
[0066] Optionally, the first end of the second inductor 132 is connected to the main radio frequency antenna 128, and the second end of the second inductor 132 is connected to the near-field communication module 102.
[0067] In this way, the mid-frame of the electronic device 100 is reused as part of the NFC antenna, and the existing antenna or mid-frame conductor near the NFC area is reused for object proximity detection.
[0068] Optionally, the main radio frequency antenna 128 may be a radio frequency antenna near the NFC antenna field strength region.
[0069] That is, the object proximity detection sensor 104 can be set on the hardware path of the radio frequency antenna near the NFC antenna, or on the hardware path of the mid-frame antenna of the near-field communication module 102, without any specific restrictions.
[0070] For example, such as Figure 2 As shown, the SAR antenna is located near the NFC antenna. When the NFC module operates, the detection results of the SAR antenna will also change, so as to accurately switch and control the operating parameters of the NFC module.
[0071] According to the embodiment of this application, the electronic device 100 further includes a main radio frequency antenna 128, a first inductor 130, and a second inductor 132. The first end of the first inductor 130 is connected to the main radio frequency antenna 128, and the second end of the first inductor 130 is connected to the detection channel 126. The first end of the second inductor 132 is connected to the main radio frequency antenna 128, and the second end of the second inductor 132 is connected to the near-field communication module 102. Thus, the near-field communication module 102 is positioned near the SAR antenna, and the detection result of the object proximity detection sensor 104 can accurately reflect the proximity status of the near-field communication device 200, improving the accuracy of subsequent near-field communication control.
[0072] According to some embodiments of this application, optionally, the operating parameters of the near-field communication module 102 may include the wake-up threshold of the near-field communication module 102, which is the threshold for the near-field communication module 102 to exit LPCD mode.
[0073] The wake-up threshold includes a first threshold and a second threshold, the first working parameter includes the first wake-up threshold, and the second working parameter includes the second wake-up threshold.
[0074] Optionally, the second threshold is greater than the first threshold.
[0075] In practical applications, the specific values of the first threshold and the second threshold can be set by those skilled in the art based on actual conditions such as the stacking of models, the magnetic interference intensity of the speaker 134, the position of the NFC antenna, and the SAR sensitivity requirements. For example, the first threshold can be set to 1500 and the second threshold to 5000. No specific restrictions are imposed here.
[0076] Based on this, the main control module 106 can be used to control the wake-up threshold of the near-field communication module 102 to switch between a first threshold and a second threshold according to the working state of the audio power amplifier 136 and the proximity status reported by the object proximity detection sensor 104.
[0077] Specifically, when the object proximity detection sensor 104 reports a proximity status, that is, when the electronic device 100 is close to the external near-field communication device 200, it indicates that the electronic device 100 intends to conduct near-field communication. At this time, the main control module 106 sets the wake-up threshold of the near-field communication module 102 to a lower first threshold to improve the wake-up response capability of the near-field communication module 102 to the external near-field communication device 200.
[0078] Optionally, when the object proximity detection sensor 104 reports a distance status and the audio power amplifier 136 is not working, that is, when the electronic device 100 is far away from the external near-field communication device 200 and the speaker 134 is not working, it indicates that the electronic device 100 has no intention of performing near-field communication, and the speaker 134 will not cause magnetic interference to the near-field communication module 102. At this time, the wake-up threshold of the near-field communication module 102 remains at the first threshold.
[0079] Optionally, when the object proximity detection sensor 104 reports a distance away status and the audio power amplifier 136 is working, that is, when the electronic device 100 is far away from the external near-field communication device 200, but the speaker 134 is working, it indicates that the electronic device 100 has no intention of performing near-field communication. However, the speaker 134 will cause magnetic interference to the near-field communication module 102. At this time, the main control module 106 sets the wake-up threshold of the near-field communication module 102 to a higher second threshold, so that the amount of magnetic interference from the speaker 134 to the near-field communication module 102 is insufficient to wake up the near-field communication module 102, thereby reducing the impact of the magnetic interference from the speaker 134 on the near-field communication module 102 and reducing the probability that the near-field communication module 102 is falsely woken up due to magnetic interference.
[0080] In practical applications, after confirming that the speaker 134 is working, the working status of the speaker 134 can be checked again after a third delay to avoid the influence of short-duration prompts.
[0081] In practical applications, the specific value of the third duration can be set by those skilled in the art according to the actual situation. For example, the third duration is 2 seconds, and no specific restrictions are made here.
[0082] In practical applications, the switching interval between different working parameters can also be set to be greater than the third duration to avoid frequent switching of working parameters.
[0083] Furthermore, in practical applications, the above detection process can be performed when the electronic device 100 is in a screen-on state. When the electronic device 100 switches from a screen-off state to a screen-on state, the wake-up threshold of the near-field communication module 102 is set to the first threshold by default. The detection process can also begin when the electronic device is powered on; this application does not specifically limit this.
[0084] Optionally, the control priority order for the above three usage scenarios is as follows: object proximity detection sensor 104 reports proximity status > object proximity detection sensor 104 reports distance status but audio power amplifier 136 is working > object proximity detection sensor 104 reports distance status and audio power amplifier 136 is not working. The control priority can be adaptively adjusted according to actual needs.
[0085] That is, when the object proximity detection sensor 104 reports a proximity status, the control of the wake-up threshold of the near field communication module 102 is not limited by the working state of the audio power amplifier 136.
[0086] According to the embodiments of this application, the electronic device 100 has operating parameters including a wake-up threshold for the near-field communication module 102. The main control module 106 is specifically configured to: set the wake-up threshold of the near-field communication module 102 to a first threshold when the object proximity detection sensor 104 reports a proximity state; set the wake-up threshold of the near-field communication module 102 to the first threshold when the object proximity detection sensor 104 reports a distance state and the audio power amplifier 136 is not working; and set the wake-up threshold of the near-field communication module 102 to a second threshold when the object proximity detection sensor 104 reports a distance state and the audio power amplifier 136 is working, wherein the second threshold is greater than the first threshold. Thus, by simultaneously introducing proximity state determination of the near-field communication device 200 and working state determination of the audio power amplifier 136, and dynamically switching the wake-up threshold of the near-field communication module 102 according to different usage scenarios, it is possible to reduce magnetic interference from the speaker 134 to the near-field communication module 102 while improving the wake-up response capability of the near-field communication module 102 to external near-field communication devices 200, thus balancing the anti-interference capability and card reading performance of NFC.
[0087] According to some embodiments of this application, optionally, such as Figure 2 , Figure 4and Figure 6 As shown, the electronic device 100 also includes a speaker 134.
[0088] Among them, such as Figure 6 As shown, the speaker 134 is connected to the audio power amplifier 136, which is used to drive the speaker 134 to work.
[0089] Based on this, such as Figure 3 As shown, the near-field communication module 102 includes a near-field communication chip 108, a first antenna path 110, and a second antenna path 118.
[0090] The near-field communication chip 108 is connected to the main control module 106.
[0091] Optionally, both the first antenna path 110 and the second antenna path 118 are connected to the near-field communication chip 108.
[0092] Optionally, the first antenna path 110 includes a first matching network 112, a first path control switch 114, and a first near-field communication antenna 116.
[0093] The first end of the first matching network 112 is connected to the near-field communication chip 108, the second end of the first matching network 112 is connected to the first end of the first channel control switch 114, the second end of the first channel control switch 114 is connected to the first near-field communication antenna 116, and the control end of the first channel control switch 114 is connected to the near-field communication chip 108.
[0094] Optionally, the first path control switch 114 is used to control the opening and closing of the first antenna path 110, that is, to control the working state of the first near-field communication antenna 116.
[0095] Optionally, the first path control switch 114 may be a MOS (Metal-Oxide-Semiconductor) switch, an analog switch, or other switching devices used to control the conduction state of the antenna path, without any specific limitations.
[0096] In practical applications, the control terminal of the first path control switch 114 can be connected to the GPIO (General Purpose Input Output) port of the near-field communication chip 108, and the on / off state of the first path control switch 114 can be controlled through the GPIO port.
[0097] In practical applications, the first path control switch 114 can also be integrated into the near-field communication chip 108, without any specific restrictions.
[0098] In addition, in practical applications, the first channel control switch 114 can also be directly controlled by the main control module 106, without any specific restrictions.
[0099] Optionally, the second antenna path 118 includes a second matching network 120 and a second near-field communication antenna 122.
[0100] The first end of the second matching network 120 is connected to the near-field communication chip 108, and the second end of the second matching network 120 is connected to the second near-field communication antenna 122.
[0101] Optionally, such as Figure 4 As shown, the first near-field communication antenna 116 is positioned close to the speaker 134 and the SAR antenna, while the second near-field communication antenna 122 is positioned away from the speaker 134.
[0102] According to an embodiment of this application, the electronic device 100 further includes a speaker 134, and a near-field communication module 102 includes a near-field communication chip 108, a first antenna path 110, and a second antenna path 118. The speaker 134 is connected to an audio power amplifier 136, the near-field communication chip 108 is connected to a main control module 106, and both the first antenna path 110 and the second antenna path 118 are connected to the near-field communication chip 108. The first antenna path 110 includes a first matching network 112, a first path control switch 114, and a first near-field communication antenna 116 connected in sequence. The control terminal of the first path control switch 114 is connected to the near-field communication chip 108, and the first near-field communication antenna 116 is positioned close to the speaker 134. The second antenna path 118 includes a second matching network 120 and a second near-field communication antenna 122 connected in sequence, with the second near-field antenna 122 positioned away from the speaker 134. In this way, the transmission link of the near-field communication chip 108 is designed as two independent antenna paths at positions close to and far from the speaker 134, respectively. The first path control switch 114 controls the on / off state of the antenna path closer to the speaker 134, which facilitates the dynamic switching of the antenna path used by the near-field communication module 102 according to different usage scenarios. This adapts to the magnetic interference of the speaker 134 and the wake-up response capability of the near-field communication device 200, achieving a balance between NFC's anti-interference capability and card reading performance.
[0103] According to some embodiments of this application, optionally, the operating parameters of the near-field communication module 102 may specifically include the on / off state of the first path control switch 114, which includes two states: closed and open.
[0104] Based on this, the main control module 106 can be used to control the first path control switch 114 in the near field communication module 102 to switch between closed and open states according to the working state of the audio power amplifier 136 and the proximity state reported by the object proximity detection sensor 104.
[0105] Specifically, when the object proximity detection sensor 104 reports a proximity status, that is, when the electronic device 100 is close to the external near-field communication device 200, it indicates that the electronic device 100 intends to conduct near-field communication. At this time, the main control module 106 controls the first path control switch 114 in the near-field communication module 102 to close, so as to simultaneously sense the near-field communication device 200 through the first antenna path 110 and the second antenna path 118, thereby improving the wake-up response capability of the external near-field communication device 200.
[0106] Optionally, when the object proximity detection sensor 104 reports a distance away status and the audio power amplifier 136 is not working, that is, when the electronic device 100 is far away from the external near-field communication device 200 and the speaker 134 is not working, it indicates that the electronic device 100 has no intention of performing near-field communication, and the speaker 134 will not cause magnetic interference to the first antenna path 110. At this time, the first path control switch 114 in the near-field communication module 102 remains closed.
[0107] Optionally, when the object proximity detection sensor 104 reports a distance away status and the audio power amplifier 136 is operating—that is, when the electronic device 100 is far from the external near-field communication device 200, but the speaker 134 is operating—it indicates that the electronic device 100 does not intend to perform near-field communication. However, the speaker 134 will cause magnetic interference to the first antenna path 110. In this case, the main control module 106 controls the first path control switch 114 in the near-field communication module 102 to disconnect, enabling only the second antenna path 118. The second antenna path 118 is located far from the speaker 134, and is less affected by the magnetic interference of the speaker 134, resulting in a low probability of false wake-up. When the electronic device 100 does not intend to perform near-field communication, the second antenna path 118 can also be disconnected to save energy.
[0108] When the object proximity detection sensor 104 reports an approach status, the on / off state of the first path control switch 114 is not limited by the operating state of the audio power amplifier 136.
[0109] That is, when there is a conflict between "proximity state" and "speaker 134 working", the operation of lowering the wake-up threshold or closing the first path control switch 114 is performed first to ensure the card reading success rate.
[0110] In practical applications, multiplexing circuits or other selection circuits can be used to select between different antenna paths, without making specific restrictions here.
[0111] In addition, in practical applications, such as Figure 5 As shown, in the second antenna path 118, a second path control switch 138 can also be set between the second matching network 120 and the second near-field communication antenna 122. The second path control switch 138 controls the opening and closing of the second antenna path 118, that is, controls the working state of the second near-field communication antenna 122.
[0112] Based on this, the main control module 106 can control the on / off state of the first antenna path 110 and the second antenna path 118 through the first path control switch 114 and the second path control switch 138, respectively. For example, the main control module 106 controls the first antenna path 110 to be turned on through the first path control switch 114, and controls the second antenna path 118 to be turned off through the second path control switch 138, thereby achieving energy saving.
[0113] According to the embodiments of this application, the electronic device 100 has operating parameters including the on / off state of the first path control switch 114. The main control module 106 is specifically used to: control the first path control switch 114 to close when the object proximity detection sensor 104 reports an approach state; control the first path control switch 114 to close when the object proximity detection sensor 104 reports a distance state and the audio power amplifier 136 is not working; and control the first path control switch 114 to open when the object proximity detection sensor 104 reports a distance state and the audio power amplifier 136 is working. In this way, by simultaneously introducing the proximity state determination of the near-field communication device 200 and the working state determination of the audio power amplifier 136, the antenna path used by the near-field communication module 102 is dynamically switched according to different usage scenarios. This can reduce the magnetic interference of the speaker 134 to the near-field communication module 102 while improving the wake-up response capability of the near-field communication module 102 to the external near-field communication device 200, thus taking into account both the anti-interference capability and card reading performance of NFC.
[0114] Optionally, embodiments of this application also provide a near-field communication control method for the electronic device described above. For example... Figure 7 As shown, the near-field communication control method may specifically include the following S302 to S306:
[0115] S302: Obtain the operating status of the audio power amplifier.
[0116] The operating status of the audio power amplifier reflects the operating status of the speaker.
[0117] S304: Obtain the proximity status reported by the object proximity detection sensor.
[0118] The proximity state indicates whether an external near-field communication device is near or far from an electronic device; that is, the proximity state includes both the far-away state and the near-away state.
[0119] Optionally, the object proximity detection sensor includes a reference channel and a detection channel. The reference channel is used to acquire a first detection value, and the detection channel is used to acquire a second detection value. The reporting logic of the object proximity detection sensor is as follows: according to a preset sampling frequency, the detection difference between the first and second detection values is calculated in real time; according to a preset period, the change in the detection difference within each preset period is calculated; if the change in the detection difference within the preset period is greater than a first value, a proximity state is reported; if the detection difference is greater than a second value and lasts for a first duration, or if the detection difference is less than a third value and lasts for a second duration, a distance state is reported.
[0120] S306: Control the operating parameters of the near-field communication module based on the operating status of the audio power amplifier and the proximity status reported by the object proximity detection sensor.
[0121] Specifically, in the near-field communication control method provided in this application embodiment, for electronic devices including speakers, during the near-field communication control process, the operating state of the audio power amplifier is acquired, and the proximity status reported by the object proximity detection sensor in the electronic device is acquired. Then, based on the acquired operating state and proximity status, that is, based on different usage scenarios, the operating parameters of the near-field communication module are controlled. In this way, on the one hand, switching the operating parameters of the near-field communication module based on the operating state of the audio power amplifier can reduce the magnetic interference of the speaker to the near-field communication module, reduce the probability of false wake-up of the near-field communication module, and reduce power consumption; on the other hand, switching the operating parameters of the near-field communication module based on the proximity status of the near-field communication device improves the wake-up response capability of the near-field communication module to external near-field communication devices and improves sensing sensitivity.
[0122] Specifically, the operating parameters of the near-field communication module include a first operating parameter and a second operating parameter. The first operating parameter corresponds to a higher near-field communication wake-up response capability, and the second operating parameter corresponds to a lower probability of false wake-up due to speaker interference. Based on this, when the proximity state is "close," the near-field communication module is controlled to use the first operating parameter; when the proximity state is "far away" and the audio power amplifier is in a working state, the near-field communication module is controlled to use the second operating parameter; and when the proximity state is "far away" and the audio power amplifier is in a non-working state, the near-field communication module is controlled to use the first operating parameter.
[0123] The near-field communication (NFC) control method provided in this application embodiment is used in the electronic device described above. During NFC control, it acquires the operating state of an audio power amplifier; acquires the proximity state reported by an object proximity detection sensor, including a moving-away state and a moving-close state; and controls the operating parameters of the NFC module based on the operating state of the audio power amplifier and the proximity state reported by the object proximity detection sensor. This NFC control method, by simultaneously introducing proximity state determination of the NFC device and operating state determination of the audio power amplifier, dynamically switches the operating parameters of the NFC module according to different usage scenarios. Thus, on the one hand, the operating state of the audio power amplifier reflects the operating state of the speaker; switching the NFC module's operating parameters based on the audio power amplifier's operating state helps reduce magnetic interference from the speaker to the NFC module, thereby reducing the probability of false wake-up and lowering power consumption. On the other hand, switching the NFC module's operating parameters based on the proximity state of the NFC device improves the NFC module's wake-up response capability to external NFC devices and enhances sensing sensitivity. Therefore, the above electronic device can balance NFC's anti-interference capability and card reading performance.
[0124] In this embodiment of the application, the operating parameters include the wake-up threshold of the near-field communication module, and the above-mentioned S306 may specifically include the following S306a to S306c:
[0125] S306a: When the object proximity detection sensor reports a proximity status, the wake-up threshold of the near-field communication module is set to the first threshold.
[0126] The specific operating parameters of the near-field communication module may include the wake-up threshold of the near-field communication module, which is the threshold for the near-field communication module to exit LPCD mode.
[0127] Optionally, the wake-up threshold includes a first threshold and a second threshold, the first operating parameter includes the first wake-up threshold, and the second operating parameter includes the second wake-up threshold.
[0128] Optionally, the second threshold is greater than the first threshold.
[0129] Specifically, in the near-field communication control method provided in the embodiments of this application, when the object proximity detection sensor reports a proximity state, that is, when the electronic device is close to an external near-field communication device, it indicates that the electronic device intends to perform near-field communication. At this time, the wake-up threshold of the near-field communication module is set to a lower first threshold to improve the wake-up response capability of the near-field communication module to the external near-field communication device.
[0130] S306b: When the object proximity detection sensor reports a distance status and the audio power amplifier is not working, the wake-up threshold of the near-field communication module is set to the first threshold.
[0131] Specifically, in the near-field communication control method provided in the embodiments of this application, when the object proximity detection sensor reports a distance state and the audio power amplifier is not working, that is, when the electronic device is far away from the external near-field communication device and the speaker is not working, it indicates that the electronic device has no intention to perform near-field communication, and the speaker will not cause magnetic interference to the near-field communication module. At this time, the wake-up threshold of the near-field communication module remains at the first threshold.
[0132] S306c: When the object proximity detection sensor reports a moving-away state and the audio power amplifier is working, the wake-up threshold of the near-field communication module is set to the second threshold.
[0133] Specifically, in the near-field communication control method provided in this application embodiment, when the object proximity detection sensor reports a moving-away state and the audio power amplifier is working, that is, when the electronic device is far away from the external near-field communication device but the speaker is working, it indicates that the electronic device does not intend to perform near-field communication, but the speaker will cause magnetic interference to the near-field communication module. At this time, the wake-up threshold of the near-field communication module is set to a higher second threshold, so that the amount of magnetic interference from the speaker to the near-field communication module is insufficient to wake up the near-field communication module, thereby reducing the impact of the speaker's magnetic interference on the near-field communication module and reducing the probability that the near-field communication module is falsely woken up due to magnetic interference.
[0134] In practical applications, after confirming that the speaker is working, the speaker's working status can be checked again after a third delay to avoid the influence of short-duration prompts.
[0135] In practical applications, the switching interval between different working parameters can also be set to be greater than the third duration to avoid frequent switching of working parameters.
[0136] In addition, in practical applications, the above detection process can be performed when the electronic device is in a screen-on state. When the electronic device switches from a screen-off state to a screen-on state, the wake-up threshold of the near-field communication module is the first threshold by default.
[0137] Optionally, the control priority order for the above three usage scenarios is as follows: object proximity detection sensor reports proximity status > object proximity detection sensor reports distance status but audio power amplifier is working > object proximity detection sensor reports distance status and audio power amplifier is not working.
[0138] The embodiments provided in this application include operating parameters such as the wake-up threshold of the near-field communication module. When the object proximity detection sensor reports a proximity state, the wake-up threshold of the near-field communication module is set to a first threshold; when the object proximity detection sensor reports a distance state and the audio power amplifier is not operating, the wake-up threshold of the near-field communication module is set to the first threshold; when the object proximity detection sensor reports a distance state and the audio power amplifier is operating, the wake-up threshold of the near-field communication module is set to a second threshold, where the second threshold is greater than the first threshold. Thus, by simultaneously introducing proximity state determination of the near-field communication device and operating state determination of the audio power amplifier, and dynamically switching the wake-up threshold of the near-field communication module according to different usage scenarios, it is possible to reduce magnetic interference from the speaker to the near-field communication module while improving the wake-up response capability of the near-field communication module to external near-field communication devices, thus balancing the anti-interference capability of NFC and card reading performance.
[0139] In this embodiment, the electronic device includes a speaker, and the near-field communication module includes a first antenna path and a second antenna path. The first near-field communication antenna is disposed close to the speaker, and the second near-field communication antenna is disposed away from the speaker. The first antenna path includes a first path control switch and a first near-field communication antenna. The operating parameters include the on / off state of the first path control switch. Specifically, S306 may include the following S306d to S306f:
[0140] S306d: When the object proximity detection sensor reports a proximity status, the first path control switch is closed.
[0141] The electronic device includes a speaker, and the near-field communication module includes a first antenna path and a second antenna path. The first antenna path includes a first path control switch and a first near-field communication antenna, and the second antenna path includes a second near-field communication antenna. The first path control switch is used to control the on / off state of the first antenna path, that is, to control the working state of the first near-field communication antenna. The first near-field communication antenna is set close to the speaker, and the second near-field communication antenna is set away from the speaker.
[0142] Based on this, the operating parameters of the near-field communication module may specifically include the on / off state of the first path control switch, which includes two states: closed and open.
[0143] Specifically, in the near-field communication control method provided in the embodiments of this application, when the object proximity detection sensor reports a proximity state, that is, when the electronic device is close to an external near-field communication device, it indicates that the electronic device intends to perform near-field communication. At this time, the first path control switch in the near-field communication module is closed to simultaneously sense the near-field communication device through the first antenna path and the second antenna path, thereby improving the wake-up response capability to the external near-field communication device.
[0144] S306e: When the object proximity detection sensor reports a distance status and the audio power amplifier is not working, the first path control switch is closed.
[0145] Specifically, in the near-field communication control method provided in this application embodiment, when the object proximity detection sensor reports a distance status and the audio power amplifier is not working, that is, when the electronic device is far away from the external near-field communication device and the speaker is not working, it indicates that the electronic device does not intend to perform near-field communication, and the speaker will not cause magnetic interference to the first antenna path. At this time, the first path control switch in the near-field communication module remains closed.
[0146] S306f: When the object proximity detection sensor reports a distance away status and the audio power amplifier is working, the first path control switch is turned off.
[0147] Specifically, in the near-field communication control method provided in this application embodiment, when the object proximity detection sensor reports a distance status and the audio power amplifier is working, that is, when the electronic device is far away from the external near-field communication device, but the speaker is working, it indicates that the electronic device does not intend to perform near-field communication, but the speaker will cause magnetic interference to the first antenna path. At this time, the first path control switch in the near-field communication module is disconnected, and only the second antenna path is enabled. The second antenna path is set far away from the speaker, and is less affected by the magnetic interference of the speaker, resulting in a low probability of false wake-up.
[0148] The embodiments provided in this application include an electronic device comprising a speaker and a near-field communication module comprising a first antenna path and a second antenna path. The first near-field communication antenna is positioned close to the speaker, and the second near-field communication antenna is positioned away from the speaker. The first antenna path includes a first path control switch and the first near-field communication antenna. Operating parameters include the on / off state of the first path control switch. When an object proximity detection sensor reports an approach state, the first path control switch is closed; when the object proximity detection sensor reports a distance state and the audio power amplifier is not operating, the first path control switch is closed; when the object proximity detection sensor reports a distance state and the audio power amplifier is operating, the first path control switch is opened. Thus, by simultaneously introducing proximity state determination of the near-field communication device and operating state determination of the audio power amplifier, the antenna path used by the near-field communication module is dynamically switched according to different usage scenarios. This reduces magnetic interference from the speaker to the near-field communication module while improving the near-field communication module's wake-up response capability to external near-field communication devices, thus balancing NFC's anti-interference capability and card reading performance.
[0149] In summary, taking an example with a first threshold of 1500, a second threshold of 5000, a first value of 8000, a second value of 15000, a third value of 200, a first duration of 1 minute, a second duration of 1 minute, and a third duration of 2 seconds, as follows: Figure 8 As shown, the near-field communication control method provided in this application embodiment may specifically include the following S402 to S422:
[0150] S402: Listened for the "Audio PA Started Working" event.
[0151] S404: A "screen on" event was detected.
[0152] S406: Received an event that "the change in the detection difference within the preset period is greater than 8000".
[0153] S408: Set the wake-up threshold to 1500.
[0154] S410: Determine if the audio PA is working. If yes, execute S412; otherwise, end the process.
[0155] S412: Delay 2 seconds.
[0156] S414: Determine if the audio PA is working. If yes, proceed to S416; otherwise, end the process.
[0157] S416: Set the wake-up threshold to 5000.
[0158] S418: Determine if the wake-up threshold is 5000 and the last parameter switch occurred more than 2 seconds ago. If yes, execute S420; otherwise, end the process.
[0159] S420: Set the wake-up threshold to 1500.
[0160] S422: Determine if the detection difference is greater than 15000 for 1 minute or less than 200 for 1 minute. If yes, proceed to S410; otherwise, end the process.
[0161] Among them, S402, S404 and S406 can be three parallel events, and there is no specific restriction on the execution order. S402 is executed after S412.
[0162] The near-field communication control method provided in this application can be executed by a near-field communication control device. This application uses the near-field communication control device executing the above-described near-field communication control method as an example to illustrate the near-field communication control device provided in this application.
[0163] like Figure 9As shown, this application embodiment provides a near-field communication control device 500 for the electronic device in the above embodiment. The near-field communication control device 500 may specifically include the acquisition unit 502 and the control unit 504 described below.
[0164] Acquisition unit 502 is used to acquire the operating status of the audio power amplifier;
[0165] The acquisition unit 502 is also used to acquire the proximity status reported by the object proximity detection sensor, which includes a moving away state and a moving closer state.
[0166] The control unit 504 is used to control the operating parameters of the near-field communication module based on the operating status of the audio power amplifier and the proximity status reported by the object proximity detection sensor.
[0167] The near-field communication control device 500 provided in this application embodiment is used in the electronic device described above. During near-field communication control, it acquires the operating state of the audio power amplifier; acquires the proximity state reported by the object proximity detection sensor, including a moving-away state and a moving-close state; and controls the operating parameters of the near-field communication module based on the operating state of the audio power amplifier and the proximity state reported by the object proximity detection sensor. The near-field communication control device 500 dynamically switches the operating parameters of the near-field communication module according to different usage scenarios by simultaneously introducing proximity state determination of the near-field communication device and operating state determination of the audio power amplifier. Thus, on the one hand, the operating state of the audio power amplifier reflects the operating state of the speaker; switching the operating parameters of the near-field communication module based on the operating state of the audio power amplifier helps reduce magnetic interference from the speaker to the near-field communication module, thereby reducing the probability of false wake-up of the near-field communication module and reducing power consumption. On the other hand, switching the operating parameters of the near-field communication module based on the proximity state of the near-field communication device facilitates improved wake-up response capability of the near-field communication module to external near-field communication devices, improving sensing sensitivity. Therefore, the above-mentioned electronic device can balance the anti-interference capability of NFC with card reading performance.
[0168] In this embodiment, the operating parameters include the wake-up threshold of the near-field communication module. The control unit 504 is specifically configured to: set the wake-up threshold of the near-field communication module to a first threshold when the object proximity detection sensor reports a proximity state; set the wake-up threshold of the near-field communication module to the first threshold when the object proximity detection sensor reports a distance state and the audio power amplifier is not working; and set the wake-up threshold of the near-field communication module to a second threshold when the object proximity detection sensor reports a distance state and the audio power amplifier is working, wherein the second threshold is greater than the first threshold.
[0169] The embodiments provided in this application include operating parameters such as the wake-up threshold of the near-field communication module. When the object proximity detection sensor reports a proximity state, the wake-up threshold of the near-field communication module is set to a first threshold; when the object proximity detection sensor reports a distance state and the audio power amplifier is not operating, the wake-up threshold of the near-field communication module is set to the first threshold; when the object proximity detection sensor reports a distance state and the audio power amplifier is operating, the wake-up threshold of the near-field communication module is set to a second threshold, where the second threshold is greater than the first threshold. Thus, by simultaneously introducing proximity state determination of the near-field communication device and operating state determination of the audio power amplifier, and dynamically switching the wake-up threshold of the near-field communication module according to different usage scenarios, it is possible to reduce magnetic interference from the speaker to the near-field communication module while improving the wake-up response capability of the near-field communication module to external near-field communication devices, thus balancing the anti-interference capability of NFC and card reading performance.
[0170] In this embodiment, the electronic device includes a speaker, and the near-field communication module includes a first antenna path and a second antenna path. The first near-field communication antenna is positioned close to the speaker, and the second near-field communication antenna is positioned away from the speaker. The first antenna path includes a first path control switch and the first near-field communication antenna. The operating parameters include the on / off state of the first path control switch. The control unit 504 is specifically used to: control the first path control switch to close when the object proximity detection sensor reports an approaching state; control the first path control switch to close when the object proximity detection sensor reports a moving away state and the audio power amplifier is not working; and control the first path control switch to open when the object proximity detection sensor reports a moving away state and the audio power amplifier is working.
[0171] The embodiments provided in this application include an electronic device comprising a speaker and a near-field communication module comprising a first antenna path and a second antenna path. The first near-field communication antenna is positioned close to the speaker, and the second near-field communication antenna is positioned away from the speaker. The first antenna path includes a first path control switch and the first near-field communication antenna. Operating parameters include the on / off state of the first path control switch. When an object proximity detection sensor reports an approach state, the first path control switch is closed; when the object proximity detection sensor reports a distance state and the audio power amplifier is not operating, the first path control switch is closed; when the object proximity detection sensor reports a distance state and the audio power amplifier is operating, the first path control switch is opened. Thus, by simultaneously introducing proximity state determination of the near-field communication device and operating state determination of the audio power amplifier, the antenna path used by the near-field communication module is dynamically switched according to different usage scenarios. This reduces magnetic interference from the speaker to the near-field communication module while improving the near-field communication module's wake-up response capability to external near-field communication devices, thus balancing NFC's anti-interference capability and card reading performance.
[0172] The near-field communication control device 500 in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific type of device.
[0173] The near-field communication control device 500 in this embodiment can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems; this embodiment does not specifically limit the specific operating system.
[0174] The near-field communication control device 500 provided in this application embodiment can achieve... Figure 6 and Figure 7 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0175] Optionally, such as Figure 10 As shown, this application embodiment also provides an electronic device 600, including a processor 602 and a memory 604. The memory 604 stores a program or instructions that can run on the processor 602. When the program or instructions are executed by the processor 602, they implement the various steps of the above near-field communication control method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0176] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.
[0177] Figure 11 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0178] Electronic device 700 includes, but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, and processor 710, etc.
[0179] Those skilled in the art will understand that the electronic device 700 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 710 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 11 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0180] The processor 710 is used to obtain the operating status of the audio power amplifier.
[0181] The processor 710 is also used to acquire the proximity status reported by the object proximity detection sensor, which includes a moving away state and a moving closer state.
[0182] The processor 710 is also used to control the operating parameters of the near-field communication module based on the operating status of the audio power amplifier and the proximity status reported by the object proximity detection sensor.
[0183] In this embodiment, during near-field communication (NFC) control, the operating state of the audio power amplifier is acquired; the proximity state reported by the object proximity detection sensor is acquired, including a moving-away state and a moving-close state; and the operating parameters of the NFC module are controlled based on the operating state of the audio power amplifier and the proximity state reported by the object proximity detection sensor. In this embodiment, by simultaneously introducing proximity state determination of the NFC device and operating state determination of the audio power amplifier, the operating parameters of the NFC module are dynamically switched according to different usage scenarios. Thus, on the one hand, the operating state of the audio power amplifier reflects the operating state of the speaker; switching the NFC module's operating parameters based on the audio power amplifier's operating state helps reduce magnetic interference from the speaker to the NFC module, thereby reducing the probability of false wake-up and lowering power consumption. On the other hand, switching the NFC module's operating parameters based on the proximity state of the NFC device facilitates improved wake-up response capability of the NFC module to external NFC devices, enhancing sensing sensitivity. Therefore, the above-mentioned electronic device can balance NFC's anti-interference capability and card reading performance.
[0184] Optionally, the operating parameters include the wake-up threshold of the near-field communication module. The processor 710 is specifically configured to: set the wake-up threshold of the near-field communication module to a first threshold when the object proximity detection sensor reports a proximity state; set the wake-up threshold of the near-field communication module to the first threshold when the object proximity detection sensor reports a distance state and the audio power amplifier is not working; and set the wake-up threshold of the near-field communication module to a second threshold when the object proximity detection sensor reports a distance state and the audio power amplifier is working, wherein the second threshold is greater than the first threshold.
[0185] The embodiments provided in this application include operating parameters such as the wake-up threshold of the near-field communication module. When the object proximity detection sensor reports a proximity state, the wake-up threshold of the near-field communication module is set to a first threshold; when the object proximity detection sensor reports a distance state and the audio power amplifier is not operating, the wake-up threshold of the near-field communication module is set to the first threshold; when the object proximity detection sensor reports a distance state and the audio power amplifier is operating, the wake-up threshold of the near-field communication module is set to a second threshold, where the second threshold is greater than the first threshold. Thus, by simultaneously introducing proximity state determination of the near-field communication device and operating state determination of the audio power amplifier, and dynamically switching the wake-up threshold of the near-field communication module according to different usage scenarios, it is possible to reduce magnetic interference from the speaker to the near-field communication module while improving the wake-up response capability of the near-field communication module to external near-field communication devices, thus balancing the anti-interference capability of NFC and card reading performance.
[0186] Optionally, the electronic device 700 includes a speaker, and the near-field communication module includes a first antenna path and a second antenna path. The first near-field communication antenna is positioned close to the speaker, and the second near-field communication antenna is positioned away from the speaker. The first antenna path includes a first path control switch and a first near-field communication antenna. The operating parameters include the on / off state of the first path control switch. The processor 710 is specifically used to: control the first path control switch to close when the object proximity detection sensor reports an approach state; control the first path control switch to close when the object proximity detection sensor reports a away state and the audio power amplifier is not working; and control the first path control switch to open when the object proximity detection sensor reports a away state and the audio power amplifier is working.
[0187] The embodiments provided in this application include an electronic device comprising a speaker and a near-field communication module comprising a first antenna path and a second antenna path. The first near-field communication antenna is positioned close to the speaker, and the second near-field communication antenna is positioned away from the speaker. The first antenna path includes a first path control switch and the first near-field communication antenna. Operating parameters include the on / off state of the first path control switch. When an object proximity detection sensor reports an approach state, the first path control switch is closed; when the object proximity detection sensor reports a distance state and the audio power amplifier is not operating, the first path control switch is closed; when the object proximity detection sensor reports a distance state and the audio power amplifier is operating, the first path control switch is opened. Thus, by simultaneously introducing proximity state determination of the near-field communication device and operating state determination of the audio power amplifier, the antenna path used by the near-field communication module is dynamically switched according to different usage scenarios. This reduces magnetic interference from the speaker to the near-field communication module while improving the near-field communication module's wake-up response capability to external near-field communication devices, thus balancing NFC's anti-interference capability and card reading performance.
[0188] It should be understood that, in this embodiment, the input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042. The GPU 7041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 707 includes at least one of a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.
[0189] The memory 709 can be used to store software programs and various data. The memory 709 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 709 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 709 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0190] Processor 710 may include one or more processing units; optionally, processor 710 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 710.
[0191] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described near-field communication control method embodiments and achieve the same technical effects. To avoid repetition, these will not be described again here.
[0192] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0193] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above near-field communication control method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0194] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0195] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the near-field communication control method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0196] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0197] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
Claims
1. An electronic device, characterized in that, include: Audio power amplifier; Near-field communication module, used to interact with external near-field communication devices; An object proximity detection sensor is connected to the near-field communication module. The object proximity detection sensor is used to detect the proximity status of the near-field communication device and report the status of moving away or moving closer. The main control module is connected to the audio power amplifier, the near-field communication module, and the object proximity detection sensor. The main control module is used to control the operating parameters of the near-field communication module according to the operating status of the audio power amplifier and the proximity status reported by the object proximity detection sensor.
2. The electronic device according to claim 1, characterized in that, The object proximity detection sensor includes: The reference channel is used to obtain the first detection value; The detection channel is used to acquire the second detection value; The object proximity detection sensor is specifically used for: Calculate the detection difference between the first detection value and the second detection value according to the preset sampling frequency; Calculate the change in the detection difference within each preset period according to the preset period; If the change in the detection difference within the preset period is greater than a first value, a proximity status is reported. If the detection difference is greater than the second value and lasts for a first duration, or if the detection difference is less than the third value and lasts for a second duration, a distance status is reported, wherein the first value is less than the second value, the first value is greater than the third value, and both the first duration and the second duration are greater than or equal to the preset period.
3. The electronic device according to claim 2, characterized in that, Also includes: Main radio frequency antenna; A first inductor, with its first end connected to the main radio frequency antenna and its second end connected to the detection channel; The second inductor has its first end connected to the main radio frequency antenna and its second end connected to the near-field communication module.
4. The electronic device according to any one of claims 1 to 3, characterized in that, The operating parameters include the wake-up threshold of the near-field communication module, and the main control module is specifically used for: When the object proximity detection sensor reports a proximity status, the wake-up threshold of the near-field communication module is set to a first threshold. When the object proximity detection sensor reports a moving-away state and the audio power amplifier is not working, the wake-up threshold of the near-field communication module is set to the first threshold. When the object proximity detection sensor reports a moving-away state and the audio power amplifier is operating, the wake-up threshold of the near-field communication module is set to a second threshold, which is greater than the first threshold.
5. The electronic device according to claim 1, characterized in that, Also includes: The speaker is connected to the audio power amplifier; The near-field communication module includes: The near-field communication chip is connected to the main control module; A first antenna path is connected to the near-field communication chip. The first antenna path includes a first matching network, a first path control switch, and a first near-field communication antenna connected in sequence. The control terminal of the first path control switch is connected to the near-field communication chip. The first near-field communication antenna is positioned close to the speaker. The second antenna path is connected to the near-field communication chip. The second antenna path includes a second matching network and a second near-field communication antenna connected in sequence. The second near-field communication antenna is positioned away from the speaker.
6. The electronic device according to claim 5, characterized in that, The operating parameters include the on / off state of the first channel control switch, and the main control module is specifically used for: When the object proximity detection sensor reports a proximity status, the first path control switch is closed. When the object proximity detection sensor reports a moving-away status and the audio power amplifier is not working, the first path control switch is closed. When the object proximity detection sensor reports a distance away and the audio power amplifier is operating, the first path control switch is turned off.
7. A near-field communication control method, characterized in that, The near-field communication control method for an electronic device as described in any one of claims 1 to 6 includes: Obtain the operating status of the audio power amplifier; The proximity status reported by the object proximity detection sensor is obtained, and the proximity status includes a moving away state and a moving closer state; The operating parameters of the near-field communication module are controlled based on the operating state of the audio power amplifier and the proximity status reported by the object proximity detection sensor.
8. The near-field communication control method according to claim 7, characterized in that, The operating parameters include the wake-up threshold of the near-field communication module. Controlling the operating parameters of the near-field communication module based on the operating state of the audio power amplifier and the proximity status reported by the object proximity detection sensor includes: When the object proximity detection sensor reports a proximity status, the wake-up threshold of the near-field communication module is set to a first threshold. When the object proximity detection sensor reports a moving-away state and the audio power amplifier is not working, the wake-up threshold of the near-field communication module is set to the first threshold. When the object proximity detection sensor reports a moving-away state and the audio power amplifier is operating, the wake-up threshold of the near-field communication module is set to a second threshold, which is greater than the first threshold.
9. The near-field communication control method according to claim 7, characterized in that, The electronic device includes a speaker, and the near-field communication module includes a first antenna path and a second antenna path. The first near-field communication antenna is positioned close to the speaker, and the second near-field communication antenna is positioned away from the speaker. The first antenna path includes a first path control switch and a first near-field communication antenna. The operating parameters include the on / off state of the first path control switch. Controlling the operating parameters of the near-field communication module based on the operating state of the audio power amplifier and the proximity state reported by the object proximity detection sensor includes: When the object proximity detection sensor reports a proximity status, the first path control switch is closed. When the object proximity detection sensor reports a moving-away status and the audio power amplifier is not working, the first path control switch is closed. When the object proximity detection sensor reports a distance away and the audio power amplifier is operating, the first path control switch is turned off.
10. A near-field communication control device, characterized in that, For an electronic device as described in any one of claims 1 to 6, the near-field communication control device comprises: The acquisition unit is used to acquire the operating status of the audio power amplifier; The acquisition unit is further configured to acquire the proximity status reported by the object proximity detection sensor, the proximity status including a moving away state and a moving closer state; The control unit is used to control the operating parameters of the near-field communication module based on the operating state of the audio power amplifier and the proximity status reported by the object proximity detection sensor.