Foreign matter cleaning method and device for interface and electronic equipment
By automatically cleaning foreign objects from the USB interface using ultrasonic devices in the mobile terminal, the problem of low artificial cleaning efficiency in the prior art is solved, efficient and unsensed foreign objects are achieved, and user experience and equipment security are improved.
Patent Information
- Application Number
- CN202411265366.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The USB interface of existing mobile terminals requires human intervention to clean up when foreign objects exist, which is low in efficiency and affects the safety of the device's use.
Ultrasonic devices, including motors and speakers, are adopted to detect foreign objects on the USB interface and output ultrasonic waves of specific frequency and phase differences when foreign objects are detected, so as to automatically clean foreign objects in the interface and use the cavitation effect of ultrasonic waves and the liquid flow effect to achieve Stripping of foreign matter.
It improves the efficiency of foreign object cleaning on the USB interface, realizes automatic cleaning without anyone perceived, and improves the user experience and the intelligence level of the device.
Smart Images

Figure CN119259589A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a method, device and electronic equipment for cleaning foreign matter from an interface. Background Art
[0002] With the development of various technologies related to mobile terminals, mobile terminals can provide users with more and more functions. Current mobile terminals usually use Universal Serial Bus (USB) interfaces for charging, data exchange with external devices, etc. Therefore, the USB interface of electronic devices will be exposed to the outside for a long time, and foreign objects such as liquids and dust will easily enter, affecting the normal operation of the USB interface, and even causing a short circuit in the USB interface, affecting the safety of the mobile terminal.
[0003] However, although current mobile terminals can provide a foreign object prompt when there is a foreign object in the USB interface, the foreign object cleaning process of the USB interface still needs to rely on manual execution, and the cleaning efficiency is low. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device and electronic device for cleaning foreign matter from an interface, which can solve the problem that the current cleaning process of foreign matter from an interface has low cleaning efficiency due to reliance on manual execution.
[0005] In a first aspect, an embodiment of the present application provides a method for cleaning foreign matter from an interface, which is applied to an electronic device, wherein the electronic device includes an ultrasonic device and a USB interface; the ultrasonic output device includes a motor and / or a speaker; and the method includes:
[0006] Performing foreign object detection on the USB interface;
[0007] When a foreign object is detected in the USB interface, obtaining working status information of the ultrasonic output device;
[0008] When the working state information indicates that the ultrasonic output device is in a non-working state, controlling the ultrasonic output device to output a first ultrasonic wave,
[0009] Among them, when the ultrasonic output device includes the motor and the speaker, the first ultrasonic wave includes a first sound wave output by the motor and a second sound wave output by the speaker, and a phase difference between the first sound wave and the second sound wave is not equal to kπ, and k is an odd number.
[0010] In a second aspect, an embodiment of the present application provides a device for cleaning foreign matter of an interface, which is applied to an electronic device, wherein the electronic device comprises an ultrasonic device and a universal serial bus (USB) interface; the ultrasonic output device comprises a motor and / or a speaker; the device comprises:
[0011] A detection module, used for performing foreign body detection on the USB interface;
[0012] An acquisition module, used for acquiring the working status information of the ultrasonic output device when a foreign object is detected in the USB interface;
[0013] a control module, configured to control the ultrasonic output device to output a first ultrasonic wave when the working state information indicates that the ultrasonic output device is in a non-working state;
[0014] Among them, when the ultrasonic output device includes the motor and the speaker, the first ultrasonic wave includes a first sound wave output by the motor and a second sound wave output by the speaker, and a phase difference between the first sound wave and the second sound wave is not equal to kπ, and k is an odd number.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0019] In an embodiment of the present application, an electronic device includes an ultrasonic device and a USB interface. The ultrasonic output device includes a motor and / or a speaker. The electronic device detects foreign objects on the USB interface, and obtains working status information of the ultrasonic output device when foreign objects are detected on the USB interface. Furthermore, when the working status information indicates that the ultrasonic output device is not working, the ultrasonic output device is controlled to output a first ultrasonic wave, so as to use the first ultrasonic wave to clean the foreign objects in the USB interface, thereby realizing automatic cleaning of the foreign objects in the USB interface. Compared with the related art, the efficiency of cleaning foreign objects in the USB interface is improved. Moreover, since the human body cannot perceive ultrasonic waves. Therefore, the technical solution of the present application can realize foreign object cleaning without the user's perception, improve the intelligence of foreign object cleaning, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0021] Figure 2 It is a flow chart of a method for cleaning foreign matter from an interface provided by an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a resonant superposition wave provided in an embodiment of the present application;
[0023] Figure 4 is a flow chart of a calibration process provided by an embodiment of the present application;
[0024] Figure 5 is a flowchart of another calibration process provided by an embodiment of the present application;
[0025] Figure 6 It is a flow chart of another method for cleaning foreign matter from an interface provided by an embodiment of the present application;
[0026] Figure 7 This is a flow chart of another method for cleaning foreign matter from an interface provided in an embodiment of the present application;
[0027] Figure 8 It is a block diagram of a foreign matter cleaning device for an interface provided in an embodiment of the present application;
[0028] Fig. 9 is a block diagram of an electronic device provided in an embodiment of the present application;
[0029] Fig.10 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0031] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0032] The foreign matter cleaning method, device and electronic device for the interface provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0033] In order to facilitate the understanding of the technical solution of the present application, the principle of the technical solution of the present application is explained below in priority.
[0034] Ultrasonic waves are a type of sound wave that is inaudible to human ears, with a frequency greater than 20 kilohertz (KHz), and can be generated by high-frequency vibration. As mentioned above, the USB interface of electronic devices is easily exposed to foreign objects because it is easily intruded. Foreign objects that have a greater impact on the normal operation of the USB interface usually have a certain amount of water content, which can easily cause a short circuit in the USB interface.
[0035] Ultrasonic waves have a cavitation effect, which specifically means that when ultrasonic waves propagate in liquids, their high-frequency vibrations can cause the molecules in the liquid to vibrate violently, thereby creating local conditions of high temperature and high pressure, so that a large number of dense small bubbles are formed inside the liquid. These small bubbles can continue to expand and then burst under the continuous action of ultrasonic waves. When the bubbles burst, a strong impact force is generated. Therefore, under the continuous cavitation effect, the continuous bursting of bubbles will continue to impact the inner surface of the USB interface, causing foreign matter on the inner surface and internal gaps of the USB interface to peel off, thereby cleaning the foreign matter inside the USB interface. In addition, the high-frequency vibration of ultrasonic waves in liquids will generate liquid flows, which can flow repeatedly on the inner surface of the USB interface to accelerate the peeling and cleaning of foreign matter.
[0036] Please refer to Figure 1 , which shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 1 As shown, the electronic device 10 includes an ultrasonic device and a USB interface 101. The ultrasonic output device may include a motor 102 and / or a speaker 103. The motor 102 may output ultrasonic waves by rotating. The speaker 103 may output ultrasonic waves by playing an ultrasonic sound source. The ultrasonic output device is used to output ultrasonic waves to the USB interface, so that the electronic device 10 can use ultrasonic waves to clean foreign objects in the USB interface. It should be noted that Figure 1 An example is given for illustrating that the ultrasonic wave output device includes a motor 102 and a speaker 103 .
[0037] Optionally, in Figure 1 On the basis of the above, the electronic device 10 may further include a vibration detection device 104 disposed near the USB interface 101. The vibration detection device 104 may be used to output detection data indicating the vibration magnitude of the USB interface 101.
[0038] As an example, the vibration detection device 104 may be an acceleration sensor. Accordingly, the detection data of the vibration detection device 104 may refer to acceleration data of the acceleration sensor.
[0039] Accelerometer is one of the most commonly used sensors for measuring the vibration of an object. According to Newton's second law: F=ma, F represents the resultant force on the object. m represents the mass of the object. a represents the acceleration of the object. It can be seen that acceleration a is proportional to the force F. Therefore, the acceleration data detected by the acceleration sensor is proportional to the vibration magnitude of the object. In this way, the acceleration data detected by the acceleration sensor on the USB interface can represent the vibration magnitude of the USB interface.
[0040] In another example, the vibration detection device 104 may be a vibration sensor. Accordingly, the detection data of the vibration detection device 104 may refer to vibration data of an acceleration sensor, which may directly represent the vibration magnitude of the USB interface.
[0041] Please refer to Figure 2 , which shows a flow chart of a method for cleaning foreign matter from an interface provided by an embodiment of the present application. The method for cleaning foreign matter from an interface can be applied to Figure 1 The electronic device shown. Optionally, the electronic device may further include a processor. The method for cleaning foreign matter from the interface may be executed by a processing device. Figure 2 As shown, the method for cleaning foreign matter from the interface includes:
[0042] Step 201: Perform foreign body detection on the USB interface.
[0043] Optionally, the processing device may perform foreign matter detection on the USB interface by using a foreign matter detection method such as an image detection method, a circuit detection method, a humidity detection method, etc., to detect whether there is a foreign matter inside the USB interface.
[0044] As an example, the processing device can collect an internal depth image of the USB interface, and determine whether there is a foreign object inside the USB interface based on the degree of matching between the collected internal depth image and the internal depth template image. The internal depth template image is an internal depth image when there is no foreign object in the USB interface. Specifically, when the collected internal depth image does not match the internal depth template image, it can be determined that there is a foreign object in the USB interface. When the collected internal depth image matches the internal depth template image, it is determined that there is no foreign object in the USB interface.
[0045] In another example, the processing device may collect the humidity value inside the USB interface and determine whether there is a foreign object inside the USB interface according to the magnitude relationship between the humidity value and the humidity threshold. Specifically, when the humidity value is greater than or equal to the humidity threshold, it is determined that there is a foreign object in the USB interface. When the humidity value is less than the humidity threshold, it is determined that there is no foreign object in the USB interface.
[0046] Step 202: When a foreign object is detected in the USB interface, obtain the working status information of the ultrasonic output device.
[0047] In the embodiment of the present application, the working state information of the ultrasonic output device can indicate whether the ultrasonic output device is in working state. It should be noted that, when the ultrasonic output device includes a motor and a speaker, the processing device obtains the working state information of the motor and the working state information of the speaker when a foreign object is detected in the USB interface.
[0048] Step 203: When the working state information indicates that the ultrasonic output device is in a non-working state, control the ultrasonic output device to output a first ultrasonic wave.
[0049] Optionally, the processing device may also control the ultrasonic output device to output a first ultrasonic wave when the working state information indicates that the ultrasonic output device is in a non-working state and the electronic device is in a target state. Wherein, the opening direction of the USB interface of the electronic device in the target state faces the ground. In this way, when cleaning foreign objects in the electronic device in the target state, it is easy to clean the foreign objects inside the USB interface out of the USB interface, thereby ensuring the foreign object cleaning effect. For example, if Figure 1 As shown, the USB interface is arranged at the lower end of the electronic device. The target state refers to the upright state of the electronic device. The processing device can control the ultrasonic output device to output the first ultrasonic wave when the ultrasonic output device is in an inoperative state and the electronic device is in an upright state.
[0050] In the embodiment of the present application, the ultrasonic output device may be a motor or a speaker.
[0051] In an optional case, the ultrasonic output device is a motor. The processing device can control the motor to start rotating at a second rotation frequency and a second amplitude to output a first ultrasonic wave when the working status information indicates that the motor is not in a working state. The frequency of the first ultrasonic wave is the second rotation frequency, and the amplitude is the second amplitude. Among them, the higher the rotation frequency of the motor, the stronger the resonance ability of the ultrasonic wave output by the motor at the USB interface, the greater the vibration in the USB interface, and the better the foreign matter cleaning effect. Similarly, the larger the amplitude of the motor, the stronger the resonance ability of the ultrasonic wave output by the motor at the USB interface, the greater the vibration in the USB interface, and the better the foreign matter cleaning effect. Therefore, the processing device can control the motor to start rotating at a higher rotation frequency and a larger amplitude.
[0052] In another optional case, the ultrasonic output device is a speaker. The processing device can control the speaker to play an ultrasonic sound source to output a first ultrasonic wave. The ultrasonic sound source is used to output the first ultrasonic wave. Similarly, the higher the frequency and the larger the amplitude of the ultrasonic wave output by the speaker, the stronger its resonance ability at the USB interface, the greater the vibration in the USB interface, and the better the foreign matter cleaning effect. Therefore, the processing device controls the speaker to play a high-quality ultrasonic sound source to output a first ultrasonic wave with a higher frequency and amplitude.
[0053] In the case where the ultrasonic output device includes a motor and a speaker, the first ultrasonic wave output by the ultrasonic output device includes: a first sound wave output by the motor and a second sound wave output by the speaker. In addition, the phase difference between the first sound wave output by the motor and the second sound wave output by the speaker is not equal to kπ, where k is an odd number. In this way, when the first sound wave output by the motor and the second sound wave output by the speaker have the same frequency and the phase difference is kπ, the two ultrasonic waves can be prevented from canceling each other.
[0054] In an optional implementation, the first sound wave output by the motor and the second sound wave output by the speaker have equal frequencies and phases. In this way, the energy of the resonant superposition wave of the first sound wave output by the motor and the second sound wave output by the speaker at the USB interface is the largest, thereby facilitating the maximum utilization of the resonant energy of the ultrasonic waves output by the motor and the speaker, achieving efficient cleaning of foreign objects on the USB interface and improving the foreign object cleaning effect.
[0055] In another optional implementation, the first sound wave output by the motor and the second sound wave output by the speaker have the same frequency and a phase difference of less than π. Alternatively, the first sound wave output by the motor and the second sound wave output by the speaker have different frequencies.
[0056] In some embodiments of the present application, when the ultrasonic device includes a motor and a speaker, if the motor and the speaker output ultrasonic waves of unequal frequencies, the ultrasonic waves output by the motor and the speaker may cancel each other out. In this way, the ultrasonic waves output by the motor and the speaker may have a resonant superposition wave with less energy at the USB interface, thereby causing the vibration of the USB interface to be smaller and the foreign matter cleaning effect to be poor.
[0057] In addition, even if the motor and the speaker are used to output ultrasonic waves of the same frequency, there will be a time difference between the moment when the motor receives the control signal and the moment when the speaker receives the control signal during the process of the processing device controlling the motor and the speaker to start working. That is, there will be a time difference between the moment when the processing device controls the motor to start rotating and the moment when the speaker is controlled to start playing the ultrasonic sound source.
[0058] Therefore, there will be a certain phase difference between the ultrasonic wave output by the motor and the ultrasonic wave output by the speaker. As mentioned above, due to the phase difference, there will be a cancellation between the ultrasonic wave output by the motor and the ultrasonic wave output by the speaker. In this way, the ultrasonic waves output by the motor and the speaker may also have a resonant superposition wave with less energy at the USB interface, which will cause the vibration of the USB interface to be smaller and the foreign matter cleaning effect to be poor.
[0059] Based on this, the processing device can use a vibration detection device arranged near the USB interface to calibrate the ultrasonic waves output by the motor and the speaker to ensure that the resonant superposition wave of the two at the USB interface has higher energy. Optionally, the electronic device includes a vibration detection device. The process of the processing device controlling the ultrasonic output device to output the first ultrasonic wave may include:
[0060] Step 2031, control the motor to output the first sound wave, and control the speaker to output the second sound wave.
[0061] Optionally, the processing device may store a first ultrasonic sound source, which is used for the speaker to output ultrasonic waves of a first frequency. The processing device may control the speaker to play the first ultrasonic sound source, and control the motor to start rotating at a third rotation frequency. The first frequency is equal to the third rotation frequency.
[0062] Step 2032: Acquire detection data of the vibration detection device.
[0063] In the embodiment of the present application, the processing device obtains the detection data currently output by the vibration detection device after controlling the motor to output the first sound wave and controlling the speaker to output the second sound wave. For example, the processing device obtains the detection data currently output by the vibration detection device after controlling the speaker to play the first ultrasonic sound source and controlling the motor to start rotating.
[0064] Step 2033: When the detection data is less than the target threshold, adjust the first sound wave output by the motor and / or the second sound wave output by the speaker until the detection data is at least equal to the target threshold.
[0065] In some embodiments of the present application, after acquiring the detection data, the processing device can compare the detection data with the target threshold value. When the detection data is at least equal to (i.e., greater than or equal to) the target threshold value, the motor is controlled to continuously output the first sound wave, and the speaker is controlled to continuously output the second sound wave. When the detection data is less than the target threshold value, the first sound wave output by the motor and / or the second sound wave output by the speaker are adjusted, the detection data of the vibration detection device is acquired again, and the size of the adjusted detection data and the target threshold value is determined. If the adjusted detection data is less than the target threshold value, the first sound wave output by the motor and / or the second sound wave output by the speaker are adjusted again, and the detection data of the vibration detection device is acquired again, ..., until the detection data of the vibration detection device is greater than or equal to the target threshold value.
[0066] Optionally, the target threshold may indicate the minimum vibration required to clean the USB interface of foreign objects. For example, when the vibration detection device is an acceleration sensor, the target threshold may be acceleration data of the USB interface corresponding to the minimum vibration required to clean the USB interface of foreign objects. In an optional implementation, the target threshold may be data obtained from laboratory testing.
[0067] In an optional implementation, the process of the processing device adjusting the first sound wave output by the motor and / or the second sound wave output by the speaker may include: the processing device may adjust the rotation frequency and / or amplitude of the motor to adjust the first sound wave output by the motor, thereby adjusting the resonant superposition wave of the first sound wave and the second sound wave, thereby adjusting the vibration size in the USB interface.
[0068] In another optional implementation, the process of the processing device adjusting the first sound wave output by the motor and / or the second sound wave output by the speaker may include: the processing device may adjust the ultrasonic sound source played by the speaker to adjust the frequency and / or amplitude of the second sound wave output by the speaker, thereby adjusting the resonant superposition wave of the first sound wave and the second sound wave, and adjusting the vibration size in the USB interface.
[0069] In another optional implementation, the process of the processing device adjusting the first sound wave output by the motor and / or the second sound wave output by the speaker may include: the processing device may perform sound wave adjustment processing to adjust the resonant superposition wave of the first sound wave and the second sound wave, and adjust the vibration size within the USB interface.
[0070] The sound wave adjustment process includes at least one of the following processes: adjusting the rotation frequency of the motor; adjusting the amplitude of the motor; adjusting the frequency of the second sound wave output by the speaker; adjusting the amplitude of the second sound wave output by the speaker; adjusting the interval working time of the motor and the speaker. The interval working time of the motor and the speaker refers to the interval time between the start of the motor rotation and the start of the speaker playing. By adjusting the interval working time of the motor and the speaker, the phase difference of the ultrasonic waves output by the motor and the speaker can be adjusted.
[0071] In some embodiments of the present application, as described above, Figure 3 As shown, when the motor and the speaker are used to output ultrasonic waves of the same frequency and with a phase difference of 0, there will be no cancellation between the ultrasonic wave L1 output by the motor and the ultrasonic wave L2 output by the speaker. In this way, the energy of the resonant superposition wave L3 of the ultrasonic waves L1-L2 output by the motor and the speaker at the USB interface is the largest, and the resonant energy of the ultrasonic waves output by the motor and the speaker can be utilized to the maximum extent, achieving efficient cleaning of foreign objects on the USB interface and improving the cleaning effect of foreign objects.
[0072] Based on this, the processing device can use the target threshold to calibrate the ultrasonic waves output by the motor and the speaker to ensure that the two output ultrasonic waves of the same frequency and with a phase difference of 0, thereby ensuring the foreign matter cleaning effect. The following takes the detection data detected by the vibration detection device when the motor and the speaker output ultrasonic waves with a phase difference of 0 and a frequency of both being the target frequency as an example to explain the implementation method of the processing device using the target threshold to make the motor and the speaker output ultrasonic waves with a target frequency and a phase difference of 0.
[0073] Alternatively, if Figure 4 As shown, the process of the processing device controlling the ultrasonic output device to output the first ultrasonic wave may include:
[0074] Step 401: Control the speaker to play the ultrasonic sound source to output a first ultrasonic wave of a target frequency, and control the motor to start rotating at a target rotation frequency.
[0075] The ultrasonic sound source (second ultrasonic sound source) is used for the speaker to output ultrasonic waves of a target frequency. The target rotation frequency is equal to the target frequency. The motor rotates at the target rotation frequency to output the first ultrasonic wave of the target frequency.
[0076] Step 402: Acquire detection data of the vibration detection device.
[0077] In the embodiment of the present application, the processing device obtains the detection data currently output by the vibration detection device after controlling the speaker to play the second ultrasonic sound source and controlling the motor to start rotating at the target rotation frequency.
[0078] Step 403: When the detection data is less than the target threshold, obtain the target adjustment time.
[0079] In an embodiment of the present application, after acquiring the detection data of the vibration detection device, the processing device can compare the detection data with the target threshold. When the detection data is at least equal to the target threshold, the speaker is controlled to continuously play the second ultrasonic sound source, and the motor is controlled to continuously rotate at the target rotation frequency. When the detection data is less than the target threshold, the target adjustment duration is obtained. Optionally, the processing device can store the target adjustment duration so as to obtain the target adjustment duration from its own storage space. Alternatively, the processing device can also obtain the target adjustment duration from a third-party device.
[0080] Step 404: Control the speaker to stop playing the ultrasonic sound source, and control the motor to stop rotating.
[0081] Optionally, the processing device may send a stop working signal to the speaker and the motor, so that the speaker stops playing the ultrasonic sound source when receiving the stop working signal, and the motor stops rotating when receiving the stop working signal.
[0082] Step 405 , control the speaker and the motor to start working after the target adjustment time interval, the speaker starts working to play the ultrasonic sound source, and the motor starts working to rotate at the target rotation frequency.
[0083] In an optional implementation, the processing device may control the motor to start working after the target adjustment time compared to the speaker. Specifically, the processing device may first control the speaker to play the ultrasonic sound source, and then control the motor to start rotating at the target rotation frequency after the target adjustment time. In this way, the second sound wave output by the speaker is used as a reference, and the output time of the first sound wave of the motor is adjusted to change the phase difference of the ultrasonic wave output by the motor and the speaker.
[0084] In another optional implementation, the processing device controls the motor to start working earlier than the speaker by the target adjustment time. Specifically, the processing device can first control the motor to start rotating at the target rotation frequency, and then control the speaker to play the ultrasonic sound source after the target adjustment time. In this way, the first sound wave output by the motor is used as a reference, and the output time of the second sound wave of the speaker is adjusted to change the phase difference of the ultrasonic wave output by the motor and the speaker.
[0085] Step 406: Acquire detection data of the vibration detection device again.
[0086] Step 407: if the detected data acquired again is less than the target threshold, the target adjustment time is updated. The process returns to step 404 to control the speaker to stop playing the ultrasonic sound source and the motor to stop rotating until the detected data is at least equal to the target threshold.
[0087] In the embodiment of the present application, after the processing device obtains the detection data of the vibration detection device again, it can compare the detection data with the target threshold again. When the detection data is at least equal to the target threshold, the speaker is controlled to continue to play the second ultrasonic sound source, and the motor is controlled to continue to rotate at the target rotation frequency. When the detection data is less than the target threshold, the target adjustment duration is updated, and the execution of step 404 is returned to adjust the phase difference of the ultrasonic waves output by the motor and the speaker again using the updated target adjustment duration.
[0088] Optionally, the process of the processing device updating the target adjustment time may include: increasing the target adjustment time, and / or reducing the target adjustment time. The target adjustment time after each update may differ from the target adjustment time before the update by a fixed value. Alternatively, the difference between the target adjustment time after the update and the target adjustment time before the update may decrease as the number of updates increases, so as to more accurately adjust the phase difference of the ultrasonic waves output by the motor and the speaker as the number of updates increases.
[0089] For example, the processing device may increase the target adjustment time multiple times during the process of updating the target adjustment time multiple times, so that the ultrasonic wave output by the speaker / motor that starts working later lags behind, and then reduce the target adjustment time multiple times, so that the ultrasonic wave output by the speaker / motor that starts working later is advanced.
[0090] It should be noted that in some embodiments, the target threshold can be measured by experiments. Take the target threshold as: the detection data detected by the vibration detection device when the motor and the speaker output ultrasonic waves with a phase difference of 0 and a frequency of the target frequency as an example.
[0091] In an optional case, in the test experiment of the target threshold, the speaker is controlled to play the second ultrasonic sound source, and the motor is controlled to rotate at the target rotation frequency. The ultrasonic waves output by the speaker and the motor are measured by the experimental instrument to observe whether the phase difference of the ultrasonic waves output by the speaker and the motor is 0. In the case where the phase difference of the ultrasonic waves output by the speaker and the motor is not 0, the interval between the start time of the speaker and the start time of the motor (i.e., the start time of the motor) is adjusted until the phase difference of the ultrasonic waves output by the speaker and the motor is observed to be 0, and the detection data output by the vibration detection device is read, and the detection data is determined as the target threshold, and stored in the electronic device.
[0092] Furthermore, in the target threshold test experiment, the target interval length between the start of the speaker playing and the start of the motor rotating can be obtained when the phase difference of the ultrasonic waves output by the speaker and the motor is 0. Therefore, when the processing device detects that there is a foreign object in the USB interface and the motor and the speaker are not working, it directly controls the speaker and the motor to start working at the target interval length, so that the motor and the speaker can output ultrasonic waves with the same frequency and a phase difference of 0 as soon as possible, shortening the calibration process.
[0093] In order to facilitate further understanding of the calibration process of the technical solution of the present application, an exemplary description is given below. For example, it is assumed that the detection data is an acceleration sensor. Accordingly, the detection data is acceleration data. When the detection data is less than the target threshold value Pmax, the processing device performs the calibration process. Figure 5 As shown, the calibration process includes:
[0094] The processing device controls the speaker to play the second ultrasonic sound source, and controls the motor to start rotating at the target rotation frequency F1 and the second amplitude. The second ultrasonic sound source is used for the speaker to output ultrasonic waves (i.e., first sound waves) with a frequency of the target frequency F1 and an amplitude of the third amplitude. The target rotation frequency is equal to the target frequency F1, the second amplitude may be less than the third amplitude, and the motor rotates to output ultrasonic waves (i.e., second sound waves) with a frequency of the target frequency F1 and an amplitude of the second amplitude. Of course, the second amplitude of the motor may also be equal to or greater than the third amplitude.
[0095] The processing device can read the acceleration data P0 detected by the acceleration sensor through the target application. It is determined whether the acceleration data P0 is less than the target threshold value Pmax. When the acceleration data P0 is greater than or equal to the target threshold value Pmax, it indicates that the phase difference between the ultrasonic waves output by the motor and the speaker is 0, that is, the phases of the ultrasonic waves output by the motor and the speaker are equal, and no further calibration processing is required, and the calibration processing ends.
[0096] When the acceleration data P0 is less than the target threshold value Pmax, it indicates that the phases of the ultrasonic waves output by the motor and the speaker are not equal, and further calibration processing is required. The processing device obtains the target adjustment time length △t1, controls the speaker to stop playing the second ultrasonic sound source, and controls the motor to stop rotating.
[0097] The processing device can control the start time of the motor (i.e., the time when the motor starts to rotate) to be delayed or advanced by the target adjustment time length △t1 compared to the start time of the speaker (i.e., the time when the speaker starts to play). That is, the processing device can control the motor to start working later or earlier than the speaker by the target adjustment time length △t1. Among them, the target adjustment time length △t1 is less than the vibration period of the motor, that is, the target adjustment time length △t1 is less than the period of the first ultrasonic wave. Moreover, the smaller the target adjustment time length △t1, the more accurate the process of adjusting the phase by the processing device.
[0098] The processing device reads the acceleration data P1 detected by the acceleration sensor again through the target application. Compare the acceleration data P1 with the target threshold value Pmax. When the acceleration data P1 is greater than or equal to the target threshold value Pmax, no further calibration processing is required. When the acceleration data P0 is less than the target threshold value Pmax, the processing device updates the target adjustment time △t1 to △t2. The processing device controls the speaker to stop playing the second ultrasonic sound source again, and controls the motor to stop rotating, and controls the start time of the motor to delay or advance the target adjustment time △t2 compared to the start time of the speaker. The processing device reads the acceleration data P2 detected by the acceleration sensor again through the target application, and compares the acceleration data P21 with the target threshold value Pmax. ... until the acceleration data of the acceleration sensor read by the processing device through the target application is greater than or equal to the target threshold value Pmax.
[0099] It should be noted that the processing device may first control the start time of the motor to delay the target adjustment time compared to the start time of the speaker for multiple times. Then, when the acceleration data detected by the acceleration sensor is less than the target threshold, the start time of the motor is controlled multiple times to advance the target adjustment time compared to the start time of the speaker, so as to adjust the phase difference of the ultrasonic waves output by the motor and the speaker. For example, the processing device may first control the start time of the motor to delay the target adjustment time △t1, target adjustment time △t2, target adjustment time △t3...target adjustment time △t10 in sequence compared to the start time of the speaker. Then, when the acceleration data detected by the acceleration sensor is less than the target threshold, the start time of the motor is controlled multiple times to advance the target adjustment time △t1, target adjustment time △t2, target adjustment time △t3...target adjustment time △t10 compared to the start time of the speaker.
[0100] In some embodiments of the present application, the processing device can control the ultrasonic output device to output ultrasonic waves multiple times to effectively clean the foreign matter on the interface. Optionally, the method for cleaning foreign matter on the interface includes:
[0101] The USB interface is detected for foreign objects. When a foreign object is detected in the USB interface, the working status information of the ultrasonic output device is obtained. When the working status information indicates that the ultrasonic output device is not in a working state, the ultrasonic output device is controlled to output the first ultrasonic wave for a first cleaning time. The USB interface is detected for foreign objects again. When a foreign object is detected in the USB interface again, the working status information of the ultrasonic output device is obtained. When the working status information indicates that the ultrasonic output device is not in a working state, the ultrasonic output device is controlled to output a second ultrasonic wave. The second ultrasonic wave has a larger frequency and / or amplitude than the first ultrasonic wave, and the second ultrasonic wave has a stronger ability to clean foreign objects than the first ultrasonic wave. Furthermore, when the ultrasonic output device includes a motor and a speaker, the second ultrasonic wave includes a third sound wave output by the motor and a fourth sound wave output by the speaker, and the phase difference between the third sound wave and the fourth sound wave is not equal to kπ.
[0102] Of course, the processing device can also control the ultrasonic output device to output the second ultrasonic wave for the second cleaning time when the presence of foreign objects in the USB interface is detected again, and return to execute the step of detecting foreign objects in the USB interface again until no foreign objects are detected in the USB interface.
[0103] In an optional implementation, Figure 6 As shown, the method for cleaning foreign matter from the interface includes:
[0104] Step 601: Perform foreign object detection on the USB interface.
[0105] The implementation method of this step can refer to the implementation method of the aforementioned step 201, and this embodiment of the present application will not be described in detail.
[0106] Step 602: When a foreign object is detected in the USB interface, obtain the working status information of the ultrasonic output device.
[0107] The implementation method of this step can refer to the implementation method of the aforementioned step 202, and this embodiment of the present application will not be elaborated on this.
[0108] Step 603: When the working state information indicates that the ultrasonic wave output device is in a non-working state, control the motor and the speaker to output the first ultrasonic wave.
[0109] The implementation method of this step can refer to the implementation method of the aforementioned step 2031, and this embodiment of the present application will not be elaborated on this.
[0110] Step 604: Acquire detection data of the vibration detection device.
[0111] The implementation method of this step can refer to the implementation method of the aforementioned step 2032, and this embodiment of the present application will not be elaborated on this.
[0112] Step 605: When the detection data is less than the target threshold, adjust the ultrasonic wave output by the motor and / or the speaker. Return to step 604 to obtain the detection data of the vibration detection device.
[0113] The implementation method of this step can refer to the implementation method of the aforementioned step 2033, and this embodiment of the present application will not be elaborated on this.
[0114] Step 606: When the detection data is greater than or equal to the target threshold, control the motor and the speaker to output the first ultrasonic wave for a first cleaning time period.
[0115] The first cleaning time length may be a preset fixed value. Alternatively, the first cleaning time length may be a user-defined value. For example, the first cleaning time length may be 30 seconds, 1 minute, etc.
[0116] Step 607: Perform foreign object detection on the USB interface again.
[0117] The implementation method of this step can refer to the implementation method of the aforementioned step 201, and this embodiment of the present application will not be described in detail.
[0118] Step 608: When the presence of foreign matter in the USB interface is detected again, the working status information of the ultrasonic output device is obtained.
[0119] The implementation method of this step can refer to the implementation method of the aforementioned step 202, and this embodiment of the present application will not be elaborated on this.
[0120] Step 609: When the working state information indicates that the ultrasonic output device is in a non-working state, control the ultrasonic output device to output a second ultrasonic wave.
[0121] Optionally, the process of the processing device controlling the ultrasonic output device to output the second ultrasonic wave can refer to the process of the aforementioned processing device controlling the ultrasonic output device to output the first ultrasonic wave, and the embodiments of the present application will not be described in detail. Of course, in some embodiments, the second ultrasonic wave may also be the same as the first ultrasonic wave. In this case, the processing device may repeatedly detect whether there is a foreign object in the USB interface, so that when a foreign object is detected in the USB interface, the ultrasonic output device is controlled to output the first ultrasonic wave until no foreign object is detected in the USB interface.
[0122] It should be noted that, in some embodiments, the processing device controls the motor and the speaker to output the second ultrasonic wave, thereby obtaining the detection data of the vibration detection device. The processing device may use the target threshold corresponding to the second ultrasonic wave to compare with the detection data. When the detection data is less than the target threshold corresponding to the second ultrasonic wave, the target adjustment duration is obtained to adjust the phase difference of the ultrasonic waves output by the motor and the speaker. When the detection data is greater than or equal to the target threshold corresponding to the second ultrasonic wave, the ultrasonic wave output device is controlled to output the second ultrasonic wave for a second cleaning duration. Among them, the target threshold corresponding to the second ultrasonic wave is: the detection data detected by the vibration detection device when the motor and the speaker output an ultrasonic wave of a third frequency and a phase difference of 0. The third frequency is the frequency of the second ultrasonic wave.
[0123] For example, the electronic device is a mobile phone, the ultrasonic output device includes a speaker and a motor, and the USB interface is provided on Figure 1 Take the lower end of the electronic device shown in FIG. Figure 7 As shown, the method for cleaning foreign matter in the interface includes: when the processing device detects that there is a foreign matter in the USB interface, it can determine whether the mobile phone is in an upright state and whether the speaker and the motor are in an inoperative state. If not, it returns to detecting foreign matter in the USB interface.
[0124] If so, the speaker and the motor are controlled to start working to output the first ultrasonic wave. The processing device performs foreign body detection on the USB interface again to detect whether the foreign body in the USB interface has been cleaned. If the USB interface is detected to have foreign body again, it returns to determine whether the mobile phone is in an upright state and whether the speaker and the motor are in a non-working state, so that when the mobile phone is in an upright state and the speaker and the motor are in a non-working state, the speaker and the motor are controlled to start working again to output the first ultrasonic wave. If no foreign body is detected in the USB interface again, it indicates that the foreign body in the USB interface has been cleaned, and the processing ends.
[0125] In summary, the electronic device provided in the embodiment of the present application includes an ultrasonic device and a USB interface. The ultrasonic output device includes a motor and / or a speaker. The electronic device detects foreign objects on the USB interface, and obtains the working status information of the ultrasonic output device when the presence of foreign objects in the USB interface is detected. Furthermore, when the working status information indicates that the ultrasonic output device is not working, the ultrasonic output device is controlled to output a first ultrasonic wave, so as to use the first ultrasonic wave to clean the foreign objects in the USB interface, thereby realizing automatic cleaning of the foreign objects in the USB interface. Compared with the related art, the efficiency of cleaning foreign objects in the USB interface is improved. Moreover, since the human body cannot perceive ultrasonic waves. Therefore, the technical solution of the present application can realize foreign object cleaning without the user's perception, improve the intelligence of foreign object cleaning, and improve the user experience.
[0126] The interface foreign body cleaning method provided in the embodiment of the present application can be executed by a foreign body cleaning device for the interface. In the embodiment of the present application, the interface foreign body cleaning device for the interface executing the interface foreign body cleaning method is taken as an example to illustrate the interface foreign body cleaning device provided in the embodiment of the present application.
[0127] Please refer to Figure 8 , which shows a block diagram of a foreign body cleaning device for an interface provided by an embodiment of the present application. The foreign body cleaning device for an interface can be applied to an electronic device. The electronic device includes an ultrasonic device and a USB interface. The ultrasonic output device includes a motor and / or a speaker. Figure 8 As shown, the foreign matter cleaning device 800 of the interface includes:
[0128] The detection module 801 is used to detect foreign objects on the USB interface;
[0129] An acquisition module 802 is used to acquire working status information of the ultrasonic output device when a foreign object is detected in the USB interface;
[0130] The control module 803 is used to control the ultrasonic output device to output a first ultrasonic wave when the working status information indicates that the ultrasonic output device is in a non-working state, wherein, when the ultrasonic output device includes the motor and the speaker, the first ultrasonic wave includes a first sound wave output by the motor and a second sound wave output by the speaker, and a phase difference between the first sound wave and the second sound wave is not equal to kπ, where k is an odd number.
[0131] Optionally, the ultrasonic device includes a motor and a speaker, and the electronic device further includes a vibration detection device disposed near the USB interface, the vibration detection device being used to output detection data indicating the vibration magnitude of the USB interface; the control module 803 is further used to:
[0132] controlling the motor to output a first sound wave, and controlling the speaker to output a second sound wave;
[0133] Acquiring detection data of the vibration detection device;
[0134] When the detection data is less than the target threshold, the first sound wave output by the motor and / or the second sound wave output by the speaker are adjusted until the detection data is equal to the target threshold.
[0135] Optionally, the target threshold is: when the motor and the speaker output ultrasonic waves with a phase difference of 0 and frequencies of both being target frequencies, the detection data detected by the vibration detection device; the control module 803 is further used to:
[0136] Controlling the speaker to play an ultrasonic sound source to output a first sound wave of the target frequency, and controlling the motor to start rotating at a target rotation frequency, wherein the ultrasonic sound source is used to output the first sound wave of the target frequency, and the target rotation frequency is equal to the target frequency;
[0137] When the detection data is less than the target threshold, obtaining a target adjustment duration;
[0138] Controlling the speaker to stop playing the ultrasonic sound source, and controlling the motor to stop rotating;
[0139] Control the speaker and the motor to start working after a target adjustment time, the speaker that starts working plays the ultrasonic sound source, and the motor that starts working rotates at the target rotation frequency;
[0140] acquiring detection data of the vibration detection device again;
[0141] When the detection data obtained again is less than the target threshold, the target adjustment time is updated, and the steps of controlling the speaker to stop playing the ultrasonic sound source and controlling the motor to stop rotating are returned to execute until the detection data is at least equal to the target threshold.
[0142] Optionally, the control module 803 is further configured to control the motor and the speaker to output the first ultrasonic wave for a first cleaning time period when the detection data is at least equal to the target threshold;
[0143] The detection module is also used to perform foreign body detection on the USB interface again;
[0144] The acquisition module is also used to acquire the working status information of the ultrasonic output device when the presence of foreign matter in the USB interface is detected again;
[0145] The control module is also used to control the ultrasonic output device to output a second ultrasonic wave when the working status information indicates that the ultrasonic output device is in a non-working state, and the second ultrasonic wave has a larger frequency and / or amplitude than the first ultrasonic wave.
[0146] In summary, the electronic device provided in the embodiment of the present application includes an ultrasonic device and a USB interface. The ultrasonic output device includes a motor and / or a speaker. The electronic device detects foreign objects on the USB interface, and obtains the working status information of the ultrasonic output device when the presence of foreign objects in the USB interface is detected. Furthermore, when the working status information indicates that the ultrasonic output device is not working, the ultrasonic output device is controlled to output a first ultrasonic wave, so as to use the first ultrasonic wave to clean the foreign objects in the USB interface, thereby realizing automatic cleaning of the foreign objects in the USB interface. Compared with the related art, the efficiency of cleaning foreign objects in the USB interface is improved. Moreover, since the human body cannot perceive ultrasonic waves. Therefore, the technical solution of the present application can realize foreign object cleaning without the user's perception, improve the intelligence of foreign object cleaning, and improve the user experience.
[0147] The foreign body cleaning device of the interface in the embodiment of the present application can be a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a palmtop computer, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.
[0148] The foreign matter cleaning device for the interface in the embodiment of the present application can be a device with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0149] The foreign body cleaning device of the interface provided in the embodiment of the present application can achieve Figures 2 to 7 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0150] Alternatively, if Fig. 9As shown, an embodiment of the present application also provides an electronic device 900, including a processor 901 and a memory 902, wherein the memory 902 stores programs or instructions that can be executed on the processor 901, and when the program or instructions are executed by the processor 901, the various steps of the foreign matter cleaning method embodiment of the above-mentioned interface are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be repeated here.
[0151] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0152] Fig.10 The hardware structure diagram of an electronic device for implementing an embodiment of the present application is shown below. The electronic device 1000 includes, but is not limited to, a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010. The electronic device also includes an ultrasonic device and a USB interface. The ultrasonic output device includes a motor and / or a speaker.
[0153] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0154] The processor 1010 is configured to perform foreign body detection on the USB interface; if a foreign body is detected in the USB interface, obtain the working state information of the ultrasonic output device; if the working state information indicates that the ultrasonic output device is not working, control the ultrasonic output device to output a first ultrasonic wave. If the ultrasonic output device includes the motor and the speaker, the first ultrasonic wave includes a first sound wave output by the motor and a second sound wave output by the speaker, and the phase difference between the first sound wave and the second sound wave is not equal to kπ, where k is an odd number.
[0155] In the embodiment of the present application, by detecting foreign objects on the USB interface, when foreign objects are detected in the USB interface, the working status information of the ultrasonic output device is obtained. Then, when the working status information indicates that the ultrasonic output device is not in a working state, the ultrasonic output device is controlled to output a first ultrasonic wave, so as to use the first ultrasonic wave to clean the foreign objects in the USB interface, thereby realizing automatic cleaning of the foreign objects in the USB interface. Compared with the related art, the efficiency of cleaning foreign objects in the USB interface is improved. Moreover, since the human body cannot perceive ultrasonic waves, the technical solution of the present application can realize foreign object cleaning without the user's perception, improve the intelligence of foreign object cleaning, and improve the user experience.
[0156] Optionally, the ultrasonic device includes the motor and the speaker, and the electronic device further includes a vibration detection device disposed near the USB interface, and the vibration detection device is used to output detection data indicating the vibration magnitude of the USB interface; the processor 1010 is further used to:
[0157] controlling the motor to output a first sound wave, and controlling the speaker to output a second sound wave;
[0158] Acquiring detection data of the vibration detection device;
[0159] When the detection data is less than the target threshold, the first sound wave output by the motor and / or the second sound wave output by the speaker are adjusted until the detection data is at least equal to the target threshold.
[0160] Optionally, the target threshold is: when the motor and the speaker output ultrasonic waves with a phase difference of 0 and frequencies of both being target frequencies, the detection data detected by the vibration detection device; the processor 1010 is further configured to:
[0161] Controlling the speaker to play an ultrasonic sound source to output a first sound wave of the target frequency, and controlling the motor to start rotating at a target rotation frequency, wherein the ultrasonic sound source is used to output the first sound wave of the target frequency, and the target rotation frequency is equal to the target frequency;
[0162] When the detection data is less than the target threshold, obtaining a target adjustment duration;
[0163] Controlling the speaker to stop playing the ultrasonic sound source, and controlling the motor to stop rotating;
[0164] Control the speaker and the motor to start working after a target adjustment time, the speaker that starts working plays the ultrasonic sound source, and the motor that starts working rotates at the target rotation frequency;
[0165] acquiring detection data of the vibration detection device again;
[0166] When the detection data obtained again is less than the target threshold, the target adjustment time is updated, and the steps of controlling the speaker to stop playing the ultrasonic sound source and controlling the motor to stop rotating are returned to execute until the detection data is at least equal to the target threshold.
[0167] Optionally, the processor 1010 is further configured to:
[0168] When the detection data is at least equal to the target threshold, controlling the motor and the speaker to output a first ultrasonic wave for a first cleaning time period;
[0169] After controlling the ultrasonic output device to output the first ultrasonic wave, performing foreign body detection on the USB interface again;
[0170] When the presence of a foreign object in the USB interface is detected again, the ultrasonic output device is controlled to output a second ultrasonic wave, wherein the frequency and / or amplitude of the second ultrasonic wave is larger than that of the first ultrasonic wave.
[0171] In the embodiment of the present application, by detecting foreign objects on the USB interface, when foreign objects are detected in the USB interface, the working status information of the ultrasonic output device is obtained. Then, when the working status information indicates that the ultrasonic output device is not in a working state, the ultrasonic output device is controlled to output a first ultrasonic wave, so as to use the first ultrasonic wave to clean the foreign objects in the USB interface, thereby realizing automatic cleaning of the foreign objects in the USB interface. Compared with the related art, the efficiency of cleaning foreign objects in the USB interface is improved. Moreover, since the human body cannot perceive ultrasonic waves, the technical solution of the present application can realize foreign object cleaning without the user's perception, improve the intelligence of foreign object cleaning, and improve the user experience.
[0172] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0173] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0174] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.
[0175] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the foreign matter cleaning method embodiment of the above-mentioned interface is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0176] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0177] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the foreign matter cleaning method embodiment of the above-mentioned interface, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0178] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0179] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the foreign matter cleaning method embodiment of the above-mentioned interface, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0180] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0181] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0182] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for cleaning foreign matter from an interface, characterized in that: Applied to electronic equipment, the electronic equipment comprises an ultrasonic device and a universal serial bus (USB) interface; the ultrasonic output device comprises a motor and / or a speaker; the method comprises: Performing foreign object detection on the USB interface; When a foreign object is detected in the USB interface, obtaining working status information of the ultrasonic output device; When the working state information indicates that the ultrasonic output device is in a non-working state, controlling the ultrasonic output device to output a first ultrasonic wave, Among them, when the ultrasonic output device includes the motor and the speaker, the first ultrasonic wave includes a first sound wave output by the motor and a second sound wave output by the speaker, and a phase difference between the first sound wave and the second sound wave is not equal to kπ, and k is an odd number.
2. The method according to claim 1, characterized in that The ultrasonic device includes the motor and the speaker, and the electronic device also includes a vibration detection device arranged near the USB interface, and the vibration detection device is used to output detection data indicating the vibration size of the USB interface; the controlling the ultrasonic output device to output the first ultrasonic wave includes: controlling the motor to output a first sound wave, and controlling the speaker to output a second sound wave; Acquiring detection data of the vibration detection device; When the detection data is less than the target threshold, the first sound wave output by the motor and / or the second sound wave output by the speaker are adjusted until the detection data is at least equal to the target threshold.
3. The method according to claim 2, characterized in that The target threshold is: the detection data detected by the vibration detection device when the motor and the speaker output ultrasonic waves with a phase difference of 0 and a frequency of the target frequency; The controlling the motor to output the first sound wave and the controlling the speaker to output the second sound wave comprises: controlling the speaker to play an ultrasonic sound source to output the first sound wave of the target frequency, and controlling the motor to start rotating at a target rotation frequency, wherein the ultrasonic sound source is used to output the first sound wave of the target frequency, and the target rotation frequency is equal to the target frequency; When the detection data is less than the target threshold, adjusting the first sound wave output by the motor and / or the second sound wave output by the speaker until the detection data is equal to the target threshold, comprising: When the detection data is less than the target threshold, obtaining a target adjustment duration; Controlling the speaker to stop playing the ultrasonic sound source, and controlling the motor to stop rotating; Control the speaker and the motor to start working after a target adjustment time, the speaker that starts working plays the ultrasonic sound source, and the motor that starts working rotates at the target rotation frequency; acquiring detection data of the vibration detection device again; When the detection data obtained again is less than the target threshold, the target adjustment time is updated, and the steps of controlling the speaker to stop playing the ultrasonic sound source and controlling the motor to stop rotating are returned to execute until the detection data is at least equal to the target threshold.
4. The method according to claim 2, characterized in that: The controlling the ultrasonic wave output device to output the first ultrasonic wave also includes: When the detection data is at least equal to the target threshold, controlling the motor and the speaker to output a first ultrasonic wave for a first cleaning time period; After controlling the ultrasonic wave output device to output the first ultrasonic wave, the method further includes: Performing foreign body detection on the USB interface again; When the presence of a foreign object in the USB interface is detected again, the ultrasonic output device is controlled to output a second ultrasonic wave, wherein the frequency and / or amplitude of the second ultrasonic wave is larger than that of the first ultrasonic wave.
5. A foreign body cleaning device for an interface, characterized in that: Applicable to electronic equipment, the electronic equipment comprises an ultrasonic device and a universal serial bus (USB) interface; the ultrasonic output device comprises a motor and / or a speaker; the device comprises: A detection module, used for performing foreign body detection on the USB interface; An acquisition module, used for acquiring the working status information of the ultrasonic output device when a foreign object is detected in the USB interface; a control module, configured to control the ultrasonic output device to output a first ultrasonic wave when the working state information indicates that the ultrasonic output device is in a non-working state; Among them, when the ultrasonic output device includes the motor and the speaker, the first ultrasonic wave includes a first sound wave output by the motor and a second sound wave output by the speaker, and a phase difference between the first sound wave and the second sound wave is not equal to kπ, and k is an odd number.
6. The device according to claim 5, characterized in that The ultrasonic device includes the motor and the speaker, and the electronic device also includes a vibration detection device arranged near the USB interface, and the vibration detection device is used to output detection data indicating the vibration magnitude of the USB interface; the control module is also used to: controlling the motor to output a first sound wave, and controlling the speaker to output a second sound wave; Acquiring detection data of the vibration detection device; When the detection data is less than the target threshold, the first sound wave output by the motor and / or the second sound wave output by the speaker are adjusted until the detection data is equal to the target threshold.
7. The device according to claim 6, characterized in that The target threshold is: the detection data detected by the vibration detection device when the motor and the speaker output ultrasonic waves with a phase difference of 0 and a frequency of the target frequency; the control module is also used to: Controlling the speaker to play an ultrasonic sound source to output a first sound wave of the target frequency, and controlling the motor to start rotating at a target rotation frequency, wherein the ultrasonic sound source is used to output the first sound wave of the target frequency, and the target rotation frequency is equal to the target frequency; When the detection data is less than the target threshold, obtaining a target adjustment duration; Controlling the speaker to stop playing the ultrasonic sound source, and controlling the motor to stop rotating; Control the speaker and the motor to start working after a target adjustment time, the speaker that starts working plays the ultrasonic sound source, and the motor that starts working rotates at the target rotation frequency; acquiring detection data of the vibration detection device again; When the detection data obtained again is less than the target threshold, the target adjustment time is updated, and the steps of controlling the speaker to stop playing the ultrasonic sound source and controlling the motor to stop rotating are returned to execute until the detection data is at least equal to the target threshold.
8. The device according to claim 6, characterized in that The control module is further configured to control the motor and the speaker to output the first ultrasonic wave for a first cleaning time period when the detection data is at least equal to the target threshold; The detection module is further used to perform foreign body detection on the USB interface again; The acquisition module is further used to acquire the working status information of the ultrasonic output device when the presence of a foreign object in the USB interface is detected again; The control module is further configured to control the ultrasonic output device to output a second ultrasonic wave when the working status information indicates that the ultrasonic output device is not in a working state, wherein the second ultrasonic wave has a larger frequency and / or amplitude than the first ultrasonic wave.
9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method for cleaning foreign matter of the interface as described in any one of claims 1 to 4 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the method for cleaning foreign matter of the interface as described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Self-cleaning method and device for electronic equipment
CN116000023A
Lens cleaning method and device, electronic equipment and storage medium
CN117983603A
Device for adjusting ultrasonic cleaning effect
CN211563880U
Super-linear loudspeaker for mobile phone with self-cleaning loudspeaking hole
CN216122513U
Mobile device having cleaning mode
JP2009071747A