CN108111671B - Anti-jamming method, electronic device, and computer-readable storage medium - Google Patents

Anti-jamming method, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN108111671B
CN108111671B CN201711222650.0A CN201711222650A CN108111671B CN 108111671 B CN108111671 B CN 108111671B CN 201711222650 A CN201711222650 A CN 201711222650A CN 108111671 B CN108111671 B CN 108111671B
Authority
CN
China
Prior art keywords
proximity sensor
signals
induction signals
preset
induction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711222650.0A
Other languages
Chinese (zh)
Other versions
CN108111671A (en
Inventor
武小勇
李枝佩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711222650.0A priority Critical patent/CN108111671B/en
Publication of CN108111671A publication Critical patent/CN108111671A/en
Application granted granted Critical
Publication of CN108111671B publication Critical patent/CN108111671B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72451User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to schedules, e.g. using calendar applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion

Abstract

The invention discloses an anti-interference method, an electronic device and a computer readable storage medium. The anti-interference method comprises the following steps: acquiring a plurality of induction signals continuously acquired by a proximity sensor according to a preset acquisition cycle, wherein the preset acquisition cycle is smaller than the transmission cycle of transmitting radio frequency signals by an antenna and is greater than or equal to the transmission time period in the transmission cycle, and the acquisition time period in the preset acquisition cycle is smaller than the non-transmission time period in the transmission cycle; selecting qualified induction signals from the plurality of induction signals, wherein the qualified induction signals are acquired by the proximity sensor when the proximity sensor is not interfered by an antenna; and controlling the display screen to be lightened or extinguished according to the qualified induction signal. According to the anti-interference method and the electronic device, the acquisition period for the proximity sensor to acquire the induction signals is set, so that one or more induction signals are acquired without being interfered by the antenna, the interference of the antenna on the proximity sensor can be reduced, and the processor can conveniently and accurately control the on or off of the display screen.

Description

Anti-jamming method, electronic device, and computer-readable storage medium
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to an anti-interference method, an electronic device, and a computer-readable storage medium.
Background
At present, mobile phones develop towards narrow frames and large screen ratio. With the increasing screen occupation ratio, many devices can enter the antenna clearance area. The devices entering the antenna clearance area are susceptible to interference of antenna radio frequency signals when working.
Disclosure of Invention
The embodiment of the invention provides an anti-interference method, an electronic device and a computer readable storage medium.
The anti-interference method is used for the electronic device. The electronic device comprises a proximity sensor and a display screen, and the anti-interference method comprises the following steps: acquiring a plurality of induction signals continuously acquired by the proximity sensor according to a preset acquisition cycle, wherein the preset acquisition cycle is smaller than the transmission cycle of the antenna for transmitting radio frequency signals and is greater than or equal to the transmission time period in the transmission cycle, and the acquisition time period in the preset acquisition cycle is smaller than the non-transmission time period in the transmission cycle; selecting qualified induction signals from the induction signals, wherein the qualified induction signals are acquired by the proximity sensor when the proximity sensor is not interfered by an antenna; and controlling the display screen to be lightened or extinguished according to the qualified sensing signal.
An electronic device of an embodiment of the invention includes a proximity sensor, a processor, and a display screen. The processor is used for acquiring a plurality of induction signals which are continuously acquired by the proximity sensor according to a preset acquisition cycle, the preset acquisition cycle is smaller than the transmission cycle of the antenna for transmitting radio frequency signals and is larger than or equal to the transmission time period in the transmission cycle, the acquisition time period in the preset acquisition cycle is smaller than the non-transmission time period in the transmission cycle, qualified induction signals are selected from the induction signals, the qualified induction signals are acquired when the proximity sensor is not interfered by the antenna, and the display screen is controlled to be turned on or turned off according to the qualified induction signals.
An electronic device of an embodiment of the invention includes a proximity sensor, an antenna, a display screen, one or more processors, memory, and one or more programs. The proximity sensor is used for continuously acquiring a plurality of induction signals according to a preset acquisition cycle; the one or more programs are stored in the memory and configured to be executed by the one or more processors. The program includes instructions for performing the tamper-resistant method described above.
The computer-readable storage medium of an embodiment of the present invention includes a computer program for use in conjunction with an electronic device, the computer program being executable by a processor to perform the above-described interference rejection method.
The anti-interference method, the electronic device and the computer readable storage medium of the embodiment of the invention set the acquisition cycle of the proximity sensor for acquiring the induction signals, so that one or more induction signals are acquired without being interfered by the antenna, and after a plurality of induction signals are acquired, the induction signals are screened to eliminate signals overlapped by the proximity sensor in the acquisition time period and the antenna radio frequency signal transmission time period, so that the interference of the antenna on the proximity sensor is reduced. Therefore, the proximity sensor collects accurate induction signals so as to accurately control the on or off of the display screen by using the induction signals.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flow chart of an interference rejection method according to some embodiments of the present invention.
Fig. 2 is a schematic structural diagram of an electronic device according to some embodiments of the invention.
Fig. 3 is a schematic diagram of the interference rejection method of some embodiments of the present invention.
Fig. 4 is a TDMA frame structure diagram of some embodiments of the present invention.
Fig. 5 is a schematic diagram of the interference rejection method of some embodiments of the present invention.
Fig. 6 is a flow chart illustrating an interference avoidance method according to some embodiments of the invention.
Fig. 7 is a flow chart illustrating an interference avoidance method according to some embodiments of the invention.
Fig. 8 is a flow chart illustrating an interference avoidance method according to some embodiments of the invention.
Fig. 9 is a schematic diagram of the interference rejection method of some embodiments of the invention.
Fig. 10 is a schematic structural diagram of an electronic device according to some embodiments of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
Referring to fig. 1 to fig. 2, an anti-interference method according to an embodiment of the invention is applied to an electronic device 100. The electronic device 100 includes a proximity sensor 10 and a display screen 40. The anti-interference method comprises the following steps:
s12: acquiring a plurality of induction signals continuously acquired by the proximity sensor 10 according to a preset acquisition cycle, wherein the preset acquisition cycle is smaller than an emission cycle of the antenna 20 for emitting radio frequency signals and is greater than or equal to an emission time period in the emission cycle, and the acquisition time period in the preset acquisition cycle is smaller than a non-emission time period in the emission cycle;
s14: selecting qualified induction signals from the plurality of induction signals, wherein the qualified induction signals are acquired by the proximity sensor 10 when the proximity sensor is not interfered by the antenna 20; and
s16: and controlling the display screen 40 to be lightened or extinguished according to the qualified sensing signal.
Referring to fig. 2 again, the anti-interference method according to the embodiment of the present invention can be implemented by the electronic device 100 according to the embodiment of the present invention. The electronic device 100 of the present embodiment includes a proximity sensor 10, a processor 30, and a display screen 40. Step S12, step S14, and step S16 may all be implemented by the processor 30.
That is, the processor 30 may be configured to obtain a plurality of sensing signals that are continuously acquired by the proximity sensor 10 according to a preset acquisition cycle, where the preset acquisition cycle is smaller than a transmission cycle of the antenna 20 for transmitting the radio frequency signal and is greater than or equal to a transmission period in the transmission cycle, and an acquisition period in the preset acquisition cycle is smaller than a non-transmission period in the transmission cycle, select a qualified sensing signal from the plurality of sensing signals, where the qualified sensing signal is acquired by the proximity sensor 10 when the proximity sensor 10 is not interfered by the antenna 20, and control the display screen 40 to be turned on or turned off according to the qualified sensing signal.
In some embodiments, the electronic device 100 may be a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart bracelet, smart glasses, a smart helmet, or the like.
In some embodiments, the proximity sensor 10 is an infrared proximity sensor.
It will be appreciated that many existing electronic devices 100 are moving towards a large screen ratio, and the increase in screen ratio may result in many electronic components having to be disposed within the clearance area of the antenna 20, such as a camera, a proximity sensor 10 for sensing the distance of the user's ear from the display screen 40 while the user is talking, and the like. If the electronic device entering the clearance area of the antenna 20 works in the time period when the antenna 20 transmits the radio frequency signal, the electronic device may not work normally due to strong electromagnetic interference. Taking an infrared proximity sensor of a mobile phone as an example, if the infrared proximity sensor emits and receives infrared light during the period of emitting radio frequency signals by the antenna 20, components in the infrared proximity sensor will be affected by electromagnetic interference, thereby causing data collected by the infrared proximity sensor to be abnormal, and thus, the distance between the ear of the user and the display screen 40 is detected wrongly, and the function of controlling the display screen 40 to be turned off when the ear of the user is close to the display screen 40 and controlling the display screen 40 to be turned on when the ear of the user is far away from the display screen 40 in the conversation process cannot be realized.
The anti-interference method and the electronic device 100 of the embodiment of the invention set the acquisition cycle of the proximity sensor 10 for acquiring the sensing signals, so that one or more sensing signals are acquired without being interfered by the antenna 20, and after a plurality of sensing signals are acquired, the sensing signals are screened to eliminate signals overlapped by the acquisition time interval of the proximity sensor 10 and the radio frequency signal transmission time interval of the antenna 20, so that the interference of the antenna 20 to the proximity sensor 10 is reduced. In this way, the proximity sensor 10 collects a relatively accurate sensing signal so as to use the sensing signal to accurately control the turning on or off of the display screen 40.
Specifically, taking a Mobile phone as an example, the Mobile phone and the base station may implement communication by using different communication technologies, for example, gsm (global System for Mobile communication) of the second generation Mobile System, Wideband Code Division Multiple Access (WCDMA) of the third generation Mobile communication System, Long Term Evolution (LTE) of the fourth generation Mobile communication System, and the like may be used. Because the GSM has higher transmission power compared with WCDMA, LTE, etc., the transmission power of GSM can reach 33dB, which has a large influence on the proximity sensor 10, while the maximum transmission power of WCDMA, LTE, etc. can only reach 23 dB-24 dB, which also has a certain influence on the proximity sensor 10.
Referring to fig. 3 and 5, the signal structure of Time Division Multiple Access (TDMA) technology in GSM is a TDMA frame. Eight time slots, numbered 0-7, are included in each TDMA frame, with each user occupying one time slot. The antenna 20 generates a burst sequence over a time slot for communication signal transmission. The transmission period of the radio frequency signal is T3, the duration of each burst is T1 (i.e., the transmission period is T1), the duration of no burst is T2 (i.e., the non-transmission period is T2), where T1, T2, and T3 are all values agreed upon in the communication protocol, for example, T1 may have a value of 0.577ms, T2 may have a value of 4.039ms, T3 may have a value of 4.616ms, and T1 may be 1/8 of T3, that is, each user only occupies one time slot in TDMA. Therefore, if the acquisition period T4 of the proximity sensor 10 and the transmission period T1 of the rf signal are continuously overlapped, the acquisition period T3 and the transmission period T1 can be prevented from being continuously overlapped by setting the preset acquisition period T5 of the proximity sensor 10. Specifically, the preset acquisition period T5 is less than the transmission period T3 in which the antenna 20 transmits the radio frequency signal, and is greater than or equal to the transmission period T1 in the transmission period T3, and the acquisition period T4 in the preset acquisition period T5 is less than the non-transmission period T2 in the transmission period T3.
For example, as shown in fig. 5, it is assumed that the start time of the preset acquisition period T5 for acquiring the first sensing signal by the proximity sensor 10 is the same as the start time of the emission period, the acquisition period T4 is 1.5ms, and the preset acquisition period T5 is 2.5ms, so that the preset acquisition period T5 is greater than the emission period T1 and less than the emission period T3, and the acquisition period is less than the non-emission period T2. It can be seen from fig. 5 that the acquisition period in the 1 st acquisition cycle overlaps with the transmission period of the 1 st transmission cycle. While the end time of the emission period of the 1 st emission cycle is 0.577ms, the start time of the acquisition period of the 2 nd acquisition cycle is 2.5ms, the end time of the acquisition period of the 2 nd acquisition cycle is 4ms, the start time of the emission period of the 2 nd emission cycle is 4.616ms, therefore, the difference between the start time of the acquisition period of the 2 nd acquisition cycle and the end time of the transmission period of the 1 st transmission cycle is 1.923ms, the difference between the end time of the acquisition period of the 2 nd acquisition cycle and the start time of the transmission period of the 2 nd transmission cycle is 0.616ms, therefore, the acquisition period of the 2 nd acquisition cycle is not overlapped with the transmission period of the 1 st transmission cycle and the transmission period of the 2 nd transmission cycle, that is, the induction signal acquired in the 2 nd acquisition cycle is acquired under the condition that the induction signal is not interfered by the antenna 20.
Therefore, the proximity sensor 10 can acquire the sensing signal which is not interfered by the antenna 20 by presetting the acquisition period for the proximity sensor 10, so that the problem that distance detection is wrong due to the abnormal acquired sensing signal is avoided.
It should be noted that the periods in the transmission period, the non-transmission period, and the acquisition period all refer to the difference between two time endpoints.
Referring to fig. 6, in some embodiments, the number of the sensing signals is greater than or equal to three, and the step S14 of selecting the qualified sensing signal from the sensing signals includes:
s141: comparing the plurality of continuously acquired induction signals pairwise;
s142: and when the absolute value of the difference value of any two induction signals is smaller than the preset difference value, all the induction signals are determined to be qualified induction signals.
Referring back to fig. 2, in some embodiments, step S141 and step S142 can be implemented by the processor 30. That is, the processor 30 may be further configured to compare every two of the plurality of continuously collected sensing signals, and determine that all of the sensing signals are qualified sensing signals when the absolute value of the difference between any two of the sensing signals is smaller than the preset difference.
In a particular embodiment of the present invention, the proximity sensor 10 is an infrared proximity sensor that includes an infrared transmitter (not shown) and an infrared receiver (not shown). When the infrared proximity sensor works, the infrared emitter emits infrared light, and the infrared receiver receives the reflected infrared light. When the proximity sensor 10 collects the sensing signal in the transmission period of the antenna 20, an abnormality may occur in the collected sensing signal, wherein the abnormality refers to that the value of the sensing signal is too high or too low. Specifically, for example, the proximity sensor 10 continuously collects three sensing signals, i.e., a first sensing signal, a second sensing signal, and a third sensing signal. If the absolute value of the difference value between the first induction signal and the second induction signal, the absolute value of the difference value between the second induction signal and the third induction signal, and the absolute value of the difference value between the first induction signal and the third induction signal are all smaller than the preset difference value, the first induction signal, the second induction signal, and the third induction signal are all qualified induction signals. It can be understood that if the difference between any two induction signals is smaller than the preset difference, it indicates that the acquisition time period of each induction signal is not overlapped with the transmission time period of the radio frequency signal, and therefore, the induction signal is not abnormal. Therefore, qualified induction signals can be obtained through a selection mode of pairwise comparison of the collected induction signals.
Referring to fig. 7, in some embodiments, the number of the sensing signals is greater than or equal to two, and the step S14 of selecting the qualified sensing signal from the plurality of sensing signals includes:
s143: comparing the magnitude of the plurality of induction signals with a preset lower limit value, and comparing the magnitude of the plurality of induction signals with a preset upper limit value; and
s144: and merging the induction signals which are greater than the preset lower limit value and less than the preset upper limit value into qualified induction signals.
Referring back to fig. 2, in some embodiments, step S143 and step S144 can be implemented by the processor 30. That is, the processor 30 may be further configured to compare the plurality of sensing signals with a preset lower limit, compare the plurality of sensing signals with a preset upper limit, and merge the sensing signals greater than the preset lower limit and less than the preset upper limit into qualified sensing signals.
In a particular embodiment of the present invention, the proximity sensor 10 is an infrared proximity sensor that includes an infrared transmitter (not shown) and an infrared receiver (not shown). When the infrared proximity sensor works, the infrared emitter emits infrared light, and the infrared receiver receives the reflected infrared light. When the user's ear is closer to the display screen 40, more infrared light is reflected back and more infrared light is received by the infrared receiver. Less infrared light is reflected back when the user's ear is farther from the display screen 40. Therefore, a preset lower limit value and a preset upper limit value may be set to detect whether a collection period during which the infrared proximity sensor collects the sensing signal (the sensing signal is an electrical signal generated by the infrared receiver after receiving the infrared light) overlaps with a transmission period during which the antenna 20 transmits the radio frequency signal, where the preset lower limit value is smaller than the preset upper limit value. When the acquisition time interval of the induction signal is overlapped with the emission time interval of the radio frequency signal, the value of the induction signal is abnormal, wherein the abnormality refers to that the value of the induction signal is too high or too low. Specifically, if the sensing signal is smaller than the preset lower limit value or greater than the preset upper limit value, it indicates that the sensing signal is abnormal, and the acquisition time period of the sensing signal overlaps with the transmission time period of the radio frequency signal. If the sensing signal is between the preset lower limit and the preset upper limit, the acquisition period of the sensing signal does not overlap with the transmission period of the radio frequency signal, that is, the sensing signal is acquired when the proximity sensor 10 is not interfered by the antenna 20. In this way, processor 30 may screen out acceptable sensing signals by performing anomaly detection on the collected sensing signals.
Further, in some embodiments, the number of the preset lower limit values may be multiple, and the number of the preset upper limit values may be multiple. For example, the number of the preset lower limit values is two, and the two preset lower limit values are respectively a first preset lower limit value and a second preset lower limit value; the number of the preset upper limit values is two, and the two preset upper limit values are respectively a first preset upper limit value and a second preset upper limit value. The first preset lower limit value, the second preset lower limit value, the first preset upper limit value and the second preset upper limit value have the following size relationship: the first preset lower limit value < the first preset upper limit value < the second preset lower limit value < the second preset upper limit value. Specifically, when the ear of the user is far away from the screen, the infrared light received by the infrared receiver is less, and at the moment, the corresponding sensing signal is less, so that when the value of the sensing signal is smaller, the acquired sensing signal is compared with the first preset lower limit value and the first preset upper limit value, and when the sensing signal is greater than the first preset lower limit value and smaller than the first preset upper limit value, the sensing signal is determined to be a qualified sensing signal. When the ears of the user are close to the screen, more infrared light is received by the infrared receiver, and at the moment, the corresponding sensing signal is larger, so that when the value of the sensing signal is larger, the acquired sensing signal is compared with the second preset lower limit value and the second preset upper limit value, and when the sensing signal is larger than the second preset lower limit value and smaller than the second preset upper limit value, the sensing signal is determined to be a qualified signal. The determination of the preset upper limit and the preset lower limit corresponding to each sensing signal may be implemented by setting a partition threshold, that is, the processor 30 first compares the sensing signal with the partition threshold, compares the sensing signal with the second preset lower limit and the second preset upper limit when the sensing signal is greater than or equal to the partition threshold, and compares the sensing signal with the first preset lower limit and the first preset upper limit when the sensing signal is less than the partition threshold. So, adopt the difference to predetermine the upper limit value and predetermine the lower limit value and filter sensing signal, can distinguish that user's ear is close to display screen 40 and user's ear keeps away from the scene of display screen 40 for sensing signal's screening is more accurate, promotes proximity sensor 10 apart from the reliability that detects.
In some embodiments, the selection of the qualified sensing signals may also be performed by first adopting the selection methods described in steps S141 and S142 to select the qualified sensing signals, and after the selection method described in step S142 is completed and all the sensing signals are not confirmed to be the qualified sensing signals, then adopting the selection methods described in steps S143 and S144 to select the qualified sensing signals. Thus, when all of the plurality of sensing signals are qualified sensing signals, the steps S143 and S144 do not need to be executed, thereby saving energy consumption and increasing processing speed.
Referring to fig. 2 and 8 together, in some embodiments, the proximity sensor 10 is communicatively coupled to the processor 30 via an I2C serial bus, and the proximity sensor 10 operates in a polling mode. The anti-interference method of the embodiment of the invention also comprises the following steps:
s11: when the induction signals are to be read, the proximity sensor 10 is turned on, so that the proximity sensor 10 executes an action of acquiring a plurality of induction signals according to a preset acquisition cycle;
the step S12 of acquiring the plurality of sensing signals continuously collected by the proximity sensor 10 according to the preset collection period includes:
s122: after the proximity sensor 10 collects a plurality of sensing signals, the processor 10 actively reads the plurality of sensing signals collected by the proximity sensor 10 according to a preset collection period.
Referring to fig. 2, in some embodiments, step S11 and step S122 may be implemented by the processor 30, that is, the processor 30 may be configured to, when the sensing signal is to be read, turn on the proximity sensor 10 to enable the proximity sensor 10 to perform an operation of acquiring a plurality of sensing signals according to a preset acquisition cycle, and actively read the plurality of sensing signals acquired according to the preset acquisition cycle by the proximity sensor 10 after the proximity sensor 10 acquires the plurality of sensing signals.
Referring to fig. 9, the proximity sensor 10 operating in the polling mode is actively accessed by the processor 30 to read the sensing signal collected by the proximity sensor 10. Specifically, when the processor 30 is to read the sensing signals, the proximity sensor 10 is controlled to be turned on to collect a predetermined number (e.g., 3 sensing signals shown in fig. 9), the processor 30 reads the sensing signals immediately after the proximity sensor 30 collects the sensing signals, and the proximity sensor 10 is turned off after the predetermined number of sensing signals are collected. The processor 30 turns on the proximity sensor 10 again after a time interval T6 to allow the proximity sensor 10 to perform a predetermined number of sensing signal acquisitions, and the processor 30 reads the signals acquired by the proximity sensor 30. In this way, the proximity sensor 10 operates only when the processor 30 is to read the sensing signal, which can save power consumption of the electronic device 100.
Referring to fig. 10, an electronic device 100 according to an embodiment of the present invention includes a proximity sensor 10, an antenna 20, a display 40, one or more processors 30, a memory 50, and one or more programs 51. Wherein the proximity sensor 10 is configured to continuously acquire a plurality of sensing signals according to a preset acquisition period, one or more programs 51 are stored in the memory 50 and configured to be executed by the one or more processors 30. The program 51 includes instructions for the tamper-resistant method according to any of the above embodiments.
For example, program 51 includes instructions for performing the tamper-resistant method described in the following steps:
s12: acquiring a plurality of induction signals continuously acquired by the proximity sensor 10 according to a preset acquisition cycle, wherein the preset acquisition cycle is smaller than the transmission cycle of the antenna 20 for transmitting the radio frequency signal and is greater than or equal to the transmission time period in the transmission cycle, and the acquisition time period in the preset acquisition cycle is smaller than the non-transmission time period in the transmission cycle;
s14: selecting qualified induction signals from the plurality of induction signals, wherein the qualified induction signals are acquired by the proximity sensor 10 when the proximity sensor is not interfered by the antenna 20; and
s16: and controlling the display screen 40 to be lightened or extinguished according to the qualified sensing signal.
For another example, program 51 may also include instructions for performing the tamper-resistant method described in the following steps:
s141: comparing the plurality of continuously acquired induction signals pairwise;
s142: and when the absolute value of the difference value of any two induction signals is smaller than the preset difference value, all the induction signals are determined to be qualified induction signals.
The computer readable storage medium of an embodiment of the present invention includes a computer program for use in conjunction with the electronic device 100. The computer program may be executed by the processor 30 to perform the interference rejection method according to any one of the above embodiments.
For example, the computer program may be executed by the processor 30 to perform the tamper-resistant method as described in the following steps:
s12: acquiring a plurality of induction signals continuously acquired by the proximity sensor 10 according to a preset acquisition cycle, wherein the preset acquisition cycle is smaller than the transmission cycle of the antenna 20 for transmitting the radio frequency signal and is greater than or equal to the transmission time period in the transmission cycle, and the acquisition time period in the preset acquisition cycle is smaller than the non-transmission time period in the transmission cycle;
s14: selecting qualified induction signals from the plurality of induction signals, wherein the qualified induction signals are acquired by the proximity sensor 10 when the proximity sensor is not interfered by the antenna 20; and
s16: and controlling the display screen 40 to be lightened or extinguished according to the qualified sensing signal.
As another example, the computer program may also be executable by the processor 30 to perform an immunity method as described by the following steps:
s141: comparing the plurality of continuously acquired induction signals pairwise;
s142: and when the absolute value of the difference value of any two induction signals is smaller than the preset difference value, all the induction signals are determined to be qualified induction signals.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (6)

1. An anti-jamming method for an electronic device, the electronic device comprising a proximity sensor and a display screen, the anti-jamming method comprising:
acquiring a plurality of induction signals which are continuously acquired by the proximity sensor according to a preset acquisition cycle, wherein the preset acquisition cycle is smaller than an emission cycle of an antenna for emitting radio frequency signals and is greater than or equal to an emission time period in the emission cycle, the acquisition time period in the preset acquisition cycle is smaller than a non-emission time period in the emission cycle, the preset acquisition cycle comprises the acquisition time period and the non-acquisition time period, and the emission cycle comprises the emission time period and the non-emission time period;
selecting qualified induction signals from the induction signals to eliminate signals with the acquisition time interval overlapped with the transmission time interval, wherein the qualified induction signals are acquired by the proximity sensor when the proximity sensor is not interfered by an antenna; and
controlling the display screen to be lightened or extinguished according to the qualified induction signal;
wherein the number of the induction signals is greater than or equal to three, and the step of selecting a qualified induction signal from the plurality of induction signals comprises:
comparing the plurality of continuously acquired induction signals pairwise;
when the absolute value of the difference value of any two induction signals is smaller than a preset difference value, all the induction signals are determined to be qualified induction signals; or
The number of the induction signals is greater than or equal to two, and the step of selecting qualified induction signals from the plurality of induction signals comprises:
comparing the magnitude of the plurality of induction signals with a preset lower limit value, and comparing the magnitude of the plurality of induction signals with a preset upper limit value; and
and merging the induction signals which are greater than the preset lower limit value and less than the preset upper limit value into the qualified induction signals.
2. The tamper resistant method of claim 1, wherein said electronic device further comprises a processor, said proximity sensor is communicatively coupled to said processor via an I2C serial bus, said proximity sensor operates in a polling mode, said tamper resistant method further comprising:
when the induction signals are to be read, the proximity sensor is started to enable the proximity sensor to execute the action of acquiring a plurality of induction signals according to a preset acquisition cycle;
the processor is used for actively acquiring a plurality of induction signals which are continuously acquired by the proximity sensor according to a preset acquisition period.
3. An electronic device, comprising a proximity sensor, a processor, and a display screen, the processor configured to:
acquiring a plurality of induction signals which are continuously acquired by the proximity sensor according to a preset acquisition cycle, wherein the preset acquisition cycle is smaller than an emission cycle of an antenna for emitting radio frequency signals and is greater than or equal to an emission time period in the emission cycle, the acquisition time period in the preset acquisition cycle is smaller than a non-emission time period in the emission cycle, the preset acquisition cycle comprises the acquisition time period and the non-acquisition time period, and the emission cycle comprises the emission time period and the non-emission time period;
selecting qualified induction signals from the induction signals to eliminate signals with the acquisition time interval overlapped with the transmission time interval, wherein the qualified induction signals are acquired by the proximity sensor when the proximity sensor is not interfered by an antenna; and
controlling the display screen to be lightened or extinguished according to the qualified induction signal;
wherein the number of the sensing signals is greater than or equal to three, and the processor is further configured to:
comparing the plurality of continuously acquired induction signals pairwise;
when the absolute value of the difference value of any two induction signals is smaller than a preset difference value, all the induction signals are determined to be qualified induction signals; or
The number of the induction signals is greater than or equal to two, and the processor is further configured to:
comparing the magnitude of the plurality of induction signals with a preset lower limit value, and comparing the magnitude of the plurality of induction signals with a preset upper limit value; and
and merging the induction signals which are greater than the preset lower limit value and less than the preset upper limit value into the qualified induction signals.
4. The electronic device of claim 3, wherein the proximity sensor is communicatively connected to the processor via an I2C serial bus, the proximity sensor operates in a polling mode, and the processor is further configured to turn on the proximity sensor to enable the proximity sensor to perform the action of acquiring the plurality of sensing signals according to a preset acquisition cycle when the sensing signals are to be read, wherein the processor actively acquires the plurality of sensing signals continuously acquired by the proximity sensor according to the preset acquisition cycle.
5. An electronic device, comprising:
the proximity sensor is used for continuously acquiring a plurality of induction signals according to a preset acquisition cycle;
an antenna;
a display screen;
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs comprising instructions for performing the tamper resistant method of any of claims 1-2.
6. A computer-readable storage medium comprising a computer program for use in conjunction with an electronic device, the computer program being executable by a processor to perform the tamper-resistant method of any one of claims 1-2.
CN201711222650.0A 2017-11-29 2017-11-29 Anti-jamming method, electronic device, and computer-readable storage medium Active CN108111671B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711222650.0A CN108111671B (en) 2017-11-29 2017-11-29 Anti-jamming method, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711222650.0A CN108111671B (en) 2017-11-29 2017-11-29 Anti-jamming method, electronic device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN108111671A CN108111671A (en) 2018-06-01
CN108111671B true CN108111671B (en) 2021-03-23

Family

ID=62207860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711222650.0A Active CN108111671B (en) 2017-11-29 2017-11-29 Anti-jamming method, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN108111671B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102521933B1 (en) 2018-10-04 2023-04-14 삼성전자주식회사 Display apparatus and the control method thereof
CN109714484B (en) * 2018-12-29 2021-06-15 联想(北京)有限公司 Data processing method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523348A (en) * 2011-12-19 2012-06-27 广东步步高电子工业有限公司 Device and method for unlocking mobile terminal
CN102916242A (en) * 2011-08-02 2013-02-06 晶钛国际电子股份有限公司 Antenna device and signal processing device
CN106249311A (en) * 2015-06-12 2016-12-21 力智电子股份有限公司 Proximity sensor and detection method for proximity sensor
CN106791120A (en) * 2016-12-27 2017-05-31 广东欧珀移动通信有限公司 Mobile terminal puts out the control method and device of screen
CN107111747A (en) * 2014-11-18 2017-08-29 三星电子株式会社 Method and electronic equipment for driving fingerprint sensor

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011135719A1 (en) * 2010-04-30 2011-11-03 富士通株式会社 Base station, communication system, mobile station and communication method
US20140078094A1 (en) * 2012-09-14 2014-03-20 Songnan Yang Co-existence of touch sensor and nfc antenna

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102916242A (en) * 2011-08-02 2013-02-06 晶钛国际电子股份有限公司 Antenna device and signal processing device
CN102523348A (en) * 2011-12-19 2012-06-27 广东步步高电子工业有限公司 Device and method for unlocking mobile terminal
CN107111747A (en) * 2014-11-18 2017-08-29 三星电子株式会社 Method and electronic equipment for driving fingerprint sensor
CN106249311A (en) * 2015-06-12 2016-12-21 力智电子股份有限公司 Proximity sensor and detection method for proximity sensor
CN106791120A (en) * 2016-12-27 2017-05-31 广东欧珀移动通信有限公司 Mobile terminal puts out the control method and device of screen

Also Published As

Publication number Publication date
CN108111671A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
CN108111672B (en) Anti-jamming method, electronic device, and computer-readable storage medium
CN108958490B (en) Electronic device, gesture recognition method thereof and computer-readable storage medium
CN105959461B (en) Screen induction control method and device and terminal equipment
KR101952798B1 (en) Detection distance calibration method, apparatus, and device
US11581915B2 (en) Device control method and apparatus, storage medium, processor, and terminal
CN108111671B (en) Anti-jamming method, electronic device, and computer-readable storage medium
CN106791120B (en) Control method and device for screen-off of mobile terminal
WO2019212786A1 (en) Time of flight ranging with varying fields of emission
CN110366100B (en) Terminal positioning method, positioning device, readable storage medium and terminal equipment
CN106131334B (en) Method and device for controlling screen state of mobile terminal
CN105814518A (en) Information processing method and smart bracelet
CN108093127B (en) Anti-jamming method, electronic device, and computer-readable storage medium
CN108076220B (en) Anti-jamming method, electronic device, and computer-readable storage medium
US11916616B2 (en) Near field communication device having an event detector
EP2986080B1 (en) Method and apparatus for setting pa blanking working mode
KR101875301B1 (en) Hotknot based proximity detection method, apparatus and touch screen terminal
CN109032354B (en) Electronic device, gesture recognition method thereof and computer-readable storage medium
CN108012028B (en) Anti-jamming method, electronic device, and computer-readable storage medium
CN107623526B (en) A kind of method and communication terminal adjusting antenna receiving sensitivity
CN113329072B (en) Data processing method and device, electronic equipment and computer readable medium
CN116483224A (en) Control method of infrared touch device and infrared touch system
CN114900854A (en) Output power determination method, wireless module, device, and storage medium
CN115883037A (en) Method, device and terminal for detecting beam failure
KR101614941B1 (en) Method for pairing a first terminal with at lesat one terminal selected among second terminals by using rssi information, terminal and computer-readable recording media using the same
CN106776092A (en) A kind of condition detection method of proximity transducer, device and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant