Foreign object detection method, system, device, storage medium and program product
By analyzing the sound signals during vibration and combining similarity and machine learning models, the problem of low efficiency and poor accuracy in detecting foreign objects inside electronic devices has been solved, achieving efficient detection without disassembly.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BYD CO LTD
- Filing Date
- 2024-10-18
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies for detecting foreign objects inside electronic devices are inefficient and inaccurate, mainly relying on disassembly and visual inspection, which leads to low detection efficiency.
By acquiring the sound signals of electronic devices when they vibrate, and using the similarity or feature sequence analysis of the sound signals, it is possible to determine whether there are foreign objects inside the devices, and then use machine learning models for detection.
It can accurately detect internal foreign objects without disassembling electronic components, thus improving detection efficiency and accuracy.
Smart Images

Figure CN119781005B_ABST
Abstract
Description
Technical Field
[0001] This application relates to foreign object detection technology, and more particularly to a foreign object detection method, system, device, storage medium, and program product. Background Technology
[0002] During the manufacturing and use of electronic devices, tiny metal shavings, dust, or other impurities may remain inside. The presence of foreign objects within electronic devices can significantly impact their reliability. Detecting foreign objects inside electronic devices allows for the timely identification of potential problems and the prevention of malfunctions caused by these objects.
[0003] Taking relays as an example of electronic devices, currently, the main method to determine whether there are foreign objects inside the relay is to disassemble it and visually inspect it, which results in low detection efficiency and poor accuracy. Summary of the Invention
[0004] This application provides a foreign object detection method, system, device, storage medium, and program product to solve the problems of low efficiency and poor accuracy in detecting internal foreign objects in electronic devices.
[0005] In a first aspect, this application provides a method for detecting foreign objects, the method comprising:
[0006] Acquire the first sound signal of the device under test when it vibrates;
[0007] Based at least on the first sound signal, it can be determined whether there is a foreign object in the device under test.
[0008] Optionally, the method further includes:
[0009] Acquire a second sound signal of the target device when it vibrates, wherein the target device and the device under test are of the same type;
[0010] The step of determining whether there is a foreign object in the device under test based at least on the first sound signal includes:
[0011] Based on the first sound signal and the second sound signal, determine the sound similarity between the device under test and the target device;
[0012] The presence of foreign objects in the device under test can be determined at least based on the sound similarity.
[0013] Optionally, the sound similarity includes a first similarity and / or a second similarity, wherein the first similarity is the similarity between the first sound signal and the second sound signal, and the second similarity is the similarity between the first signal feature sequence of the first sound signal and the second signal feature sequence of the second sound signal.
[0014] Optionally, the target device is a device without foreign objects. When the sound similarity includes a first similarity, determining whether a foreign object exists in the device under test based at least on the sound similarity includes:
[0015] If the first similarity is less than or equal to a preset first preset value, then it is determined that there is a foreign object in the device under test.
[0016] Optionally, the target device is a device without foreign objects. When the sound similarity includes a second similarity, determining whether a foreign object exists in the device under test based at least on the sound similarity includes:
[0017] If the second similarity is less than or equal to a preset second preset value, then it is determined that there is a foreign object in the device under test.
[0018] Optionally, the second similarity includes:
[0019] When the first signal feature sequence includes a first time-domain signal feature sequence and the second signal feature sequence includes a second time-domain signal feature sequence, the second similarity includes the time-domain similarity between the first time-domain signal feature sequence and the second time-domain signal feature sequence; and / or
[0020] When the first signal feature sequence includes a first frequency domain signal feature sequence and the second signal feature sequence includes a second frequency domain signal feature sequence, the second similarity includes the frequency domain similarity between the first frequency domain signal feature sequence and the second frequency domain signal feature sequence.
[0021] If the second similarity is less than or equal to a preset second preset value, then it is determined that there is a foreign object in the device under test, including:
[0022] If the time-domain similarity and / or the frequency-domain similarity are less than or equal to a preset second preset value, then it is determined that there is a foreign object in the device under test.
[0023] Optionally, determining whether a foreign object exists in the device under test based at least on the sound similarity includes:
[0024] If both the time-domain similarity and the frequency-domain similarity are greater than the preset second preset value, then it is determined that there are no foreign objects in the device under test.
[0025] Optionally, determining whether a foreign object exists in the device under test based at least on the first sound signal further includes:
[0026] If both the time-domain similarity and the frequency-domain similarity are greater than the preset second preset value, then at least one of the first sound signal, the first time-domain signal feature sequence, and the first frequency-domain signal feature sequence is input into the pre-trained foreign object detection model to obtain the detection result output by the foreign object detection model. The detection result is used to characterize whether there is a foreign object in the device under test.
[0027] Optionally, when the device under test contains foreign matter, the detection result is also used to characterize the type of foreign matter present in the device under test.
[0028] Optionally, before determining whether a foreign object exists in the device under test based on the first sound signal, the method further includes:
[0029] The first sound signal is preprocessed to remove noise from it.
[0030] Optionally, acquiring the first sound signal of the device under test during vibration includes:
[0031] Acquire the first sound signal of the device under test when it vibrates at a set frequency and a set amplitude.
[0032] Optionally, before acquiring the first sound signal when the device under test vibrates at a set frequency and a set amplitude, the method further includes:
[0033] Obtain the actual amplitude of the device under test when it vibrates at a set frequency and a set amplitude;
[0034] The difference between the set amplitude and the actual amplitude is determined to be within a preset difference range.
[0035] Optionally, the device under test is mounted on the vibration device, and the method further includes:
[0036] A control command is sent to the vibration device, wherein the vibration device is capable of vibrating in response to the control command, so that the device under test vibrates at the set frequency and the set amplitude.
[0037] Secondly, this application provides a testing system, which includes: a detection device, a vibration device, and a sound acquisition device;
[0038] The device under test is located on the vibration device and can vibrate under the drive of the vibration device;
[0039] The sound acquisition device is used to acquire the first sound signal of the device under test when it vibrates;
[0040] The detection device is used to perform the method as described in any of the first aspects.
[0041] Optionally, the vibration device is used to receive control commands sent by the detection device, and drive the device under test to vibrate according to the control commands at a set frequency and a set amplitude.
[0042] Optionally, the system further includes: an amplitude acquisition device;
[0043] The amplitude acquisition device is used to acquire the actual amplitude of the device under test when it vibrates at a set frequency and a set amplitude.
[0044] The detection device is also used to acquire the first sound signal of the device under test vibrating at a set frequency and a set amplitude when the difference between the set amplitude and the actual amplitude is within a preset difference range.
[0045] Optionally, the system further includes: a fixing device;
[0046] The fixing device is used to fix the device under test onto the vibration device.
[0047] Optionally, the system further includes: a data acquisition device;
[0048] The data acquisition device is connected to the detection device and the sound acquisition device respectively, and is used to acquire the first sound signal of the device under test when it vibrates, which is acquired by the sound acquisition device, and send the first sound signal to the detection device.
[0049] Thirdly, this application provides an electronic device, the electronic device comprising: a processor, and a memory communicatively connected to the processor;
[0050] The memory stores computer-executed instructions;
[0051] The processor executes computer execution instructions stored in the memory to implement the method as described in any of the first aspects.
[0052] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any of the first aspects.
[0053] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the first aspects.
[0054] The foreign object detection method, system, device, storage medium, and program product provided in this application, when the device under test (DUT) contains a foreign object, vibrating the DUT at a certain frequency will cause the foreign object to displace inside the DUT and collide with internal components, generating sound. Therefore, this application can accurately determine whether there is a foreign object inside the DUT by using the sound signal from the vibration of the DUT. This method does not require manual disassembly of the DUT or manual visual inspection, thus improving detection efficiency. Attached Figure Description
[0055] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0056] Figure 1 This is a schematic diagram of the structure of a testing system provided in an embodiment of this application;
[0057] Figure 2 A flowchart illustrating a foreign object detection method provided in an embodiment of this application;
[0058] Figure 3 This application provides a schematic flowchart of a method for determining whether a device under test contains foreign matter.
[0059] Figure 4 This is a schematic flowchart of a first method for determining whether a device under test contains foreign matter, provided in an embodiment of this application.
[0060] Figure 5 This is a schematic flowchart of a second method for determining whether a device under test contains foreign matter, provided in an embodiment of this application.
[0061] Figure 6 This is a schematic flowchart of a third method for determining whether a device under test contains foreign matter, provided in an embodiment of this application.
[0062] Figure 7 A flowchart illustrating a relay foreign object detection step provided in an embodiment of this application;
[0063] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0064] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments.
[0065] Figure label:
[0066] 11-Detection device; 12-Vibration device; 13-Sound acquisition device; 14-Device under test; 15-Amplitude acquisition device; 16-Fixing device; 17-Data acquisition device. Detailed Implementation
[0067] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0068] During the manufacturing and use of electronic components, tiny metal shavings, dust, or other impurities may remain inside. The presence of foreign objects within electronic components can significantly impact their reliability. Detecting foreign objects inside electronic components allows for the timely identification of potential problems, preventing malfunctions caused by foreign objects.
[0069] Taking relays as an example of electronic devices, currently, the main method to determine whether there are foreign objects inside the relay is to manually disassemble it and visually inspect the disassembled relay. This results in low efficiency and poor accuracy in detecting foreign objects inside the relay.
[0070] The inventors discovered that when an electronic device contains foreign objects, shaking the device at a certain frequency will cause the foreign objects to shift within the device, colliding with other internal components and producing sound. Therefore, this application proposes a method for determining the presence of foreign objects inside an electronic device by detecting the sound signal from its vibration. This method eliminates the need for manual disassembly or visual inspection, thus improving detection efficiency.
[0071] In view of the above, this application provides a testing system, as detailed below:
[0072] Figure 1 This is a schematic diagram of the structure of a testing system provided in an embodiment of this application, such as... Figure 1 As shown, the testing system includes: a detection device 11, a vibration device 12, and a sound acquisition device 13.
[0073] The vibration device 12 is used to support the device under test 14 and drive the device under test 14 to vibrate. That is, the device under test 14 is located on the vibration device 12 and can vibrate under the drive of the vibration device 12. In some embodiments, the vibration device 12 may be, for example, a vibration table.
[0074] This embodiment does not limit the manner in which the device under test 14 is mounted on the vibration device 12. For example, the test system may also include a fixing device 16 for fixing the device under test 14 to the vibration device 12. The fixing device may be, for example, any device that can fix the device under test 14 to the vibration device 12, such as a clamp. By securing the device under test 14 with the fixing device, the accuracy of the vibration effect of the vibration device 12 driving the device under test 14 to vibrate can be improved.
[0075] For example, the vibration device 12 itself has a component that can fix the device under test 14. Therefore, the device under test 14 can be fixed by the component. For example, the vibration device 12 is provided with a cavity to accommodate the device under test 14. Therefore, the device under test 14 can be located in the cavity and can vibrate under the drive of the vibration device 12.
[0076] The sound acquisition device 13 is used to acquire the sound signal of the device under test 14 when it vibrates. The sound acquisition device 13 can be, for example, a sound sensor or a microphone, for acquiring the sound signal of the device under test 14 when it vibrates.
[0077] For example, the sound acquisition device 13 can be located within a preset range of the device under test 14. That is, the sound acquisition device 13 is placed near the device under test 14, and the position of the sound acquisition device 13 is not limited, as long as it can acquire the sound signal when the device under test 14 vibrates.
[0078] The detection device 11 is used to execute the foreign object detection method provided in the embodiments of this application. In this embodiment, the detection device 11 can be any device with processing and control functions, such as a host computer.
[0079] In this embodiment, the vibration device 12 can drive the device under test 14 to vibrate at any amplitude and / or frequency, or it can vibrate at a set frequency and / or amplitude.
[0080] Taking the vibration at a set frequency and / or amplitude as an example, the vibration device 12 can control the device under test 14 to vibrate at a set frequency and / or amplitude based on the control command input by the user, or it can control the device under test 14 to vibrate at a set frequency and / or amplitude based on the control command issued by the detection device 11.
[0081] The set frequency and / or amplitude can be preset in the vibration device 12, or it can be issued along with the control command, or it can be carried in the control command, or it can be issued through other commands, etc., which will not be elaborated further. For example, the detection device 11 sends a control command to the vibration device 12, which is used to control the vibration device 12 to apply vibration to the device under test 14 according to the set vibration frequency and vibration amplitude.
[0082] It should be noted that the interaction between the vibration device 12 and the detection device 11 described above can be achieved through the controller of the vibration device 12. The controller of the vibration device 12 can be a device independent of the vibration device 12 or it can be part of the vibration device 12. There is no limitation on this.
[0083] Taking the vibration device 12 as an example, which drives the device under test 14 to vibrate at a set frequency and / or amplitude, the above-described test system may further include an amplitude acquisition device 15. The amplitude acquisition device 15 can be used to acquire the actual amplitude of the device under test 14 when it vibrates at a set frequency. For example, the amplitude acquisition device 15 can also be used to acquire the actual frequency of the device under test 14 when it vibrates at a set frequency. The amplitude acquisition device 15 may be located on the device under test 14, for example, fixed to the housing of the device under test 14.
[0084] The amplitude acquisition device 15 mentioned above can be, for example, an accelerometer sensor, used to acquire the acceleration of the device under test 14 when it vibrates, and the acceleration can characterize the vibration amplitude of the device under test 14.
[0085] The testing system may also include a data acquisition device 17, which is connected to the detection device 11, the sound acquisition device 13, and the amplitude acquisition device 15, respectively, and is used to convert the data acquired by the amplitude acquisition device 15 and the sound acquisition device 13 from analog signals into digital signals and transmit them to the detection device 11.
[0086] In some embodiments, the detection device 11 may also integrate a data acquisition function, that is, it can directly obtain the acquired data from the amplitude acquisition device 15 and the sound acquisition device 13. In this implementation, the detection device 11 can be directly connected to the amplitude acquisition device 15 and the sound acquisition device 13 to collect the acquired data.
[0087] The following is based on Figure 1 Taking the test system shown as an example, the method provided in the embodiments of this application will be described in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0088] Figure 2 This is a flowchart illustrating a foreign object detection method provided in an embodiment of this application, as shown below. Figure 2 As shown, the execution subject of this embodiment can be the detection device 11 mentioned above, and the method includes the following steps:
[0089] S201. Obtain the first sound signal of the device under test when it vibrates.
[0090] The aforementioned first sound signal is the sound signal collected when the device under test 14 vibrates. This sound signal can reflect whether there are foreign objects inside the device under test 14.
[0091] For example, when the vibration device 12 applies vibration to the device under test 14, the detection device 11 can directly use the sound acquisition device 13 to acquire the sound signal, and the acquired signal can be directly used as the first sound signal.
[0092] In this embodiment, the sound signal can be the sound signal when the vibration device 12 drives the device under test 14 to vibrate at any amplitude and / or frequency, or it can be the sound signal when the device under test 14 is driven to vibrate at a set amplitude and / or frequency.
[0093] Furthermore, this embodiment does not limit the method of acquiring the first sound signal. For example, the detection device 11 can be the sound signal acquired by the sound acquisition device 13 when the vibration device 12 applies vibration to the device under test 14, or it can be that other devices or equipment filter the data acquired by the sound acquisition device 13 and then send it to the detection device 11. In this implementation, the operation of applying vibration to the device under test 14 and determining whether the device under test 14 contains foreign objects based on the first sound signal of the device under test 14 can be asynchronous.
[0094] Taking the sound signal collected when the device under test 14 vibrates with a set amplitude and / or frequency as an example, for instance, the detection device 11 can acquire the actual amplitude and / or actual frequency of the device under test 14 during vibration when the vibration device 12 applies vibration to the device under test 14. That is, the actual amplitude and / or actual frequency of the device under test 14 during vibration is obtained through the amplitude and / or frequency signal collected by the amplitude acquisition device 15. Then, based on the relationship between the actual amplitude and / or actual frequency and the set amplitude and / or set frequency, it is determined whether the sound signal collected by the sound acquisition device 13 is valid, that is, whether it can be used as the first sound signal.
[0095] For example, if the difference between the set amplitude and / or set frequency and the actual amplitude and / or actual frequency is within a preset difference range, the sound signal acquired after the acquisition time corresponding to the actual amplitude and / or actual frequency is used as the first sound signal. This ensures that the acquired first sound signal is obtained when the device under test (DUT) 14 is vibrating at the set frequency and amplitude, preventing premature acquisition and ensuring that the sound signal accurately reflects the internal condition of the DUT 14. In this implementation, the operation of applying vibration to the DUT 14 and determining whether the DUT 14 contains foreign objects based on the first sound signal can be performed in real time.
[0096] Accordingly, in this implementation, the vibration device 12 applying vibration to the device under test 14 can be based on user control, controlled by the detection device 11, or initialized by the vibration device 12. For example, the detection device 11 can send a control command to the vibration device 12, which controls the vibration device 12 to apply vibration to the device under test 14 according to a set vibration frequency and / or vibration amplitude. For example, the set frequency and / or amplitude can be specifically set according to the model of the device under test 14 and actual needs. For example, it can be a frequency and / or amplitude that can cause foreign objects inside the device under test 14 to vibrate, but not cause internal components of the device under test 14 to vibrate. This frequency and / or amplitude can be obtained in advance through experimental testing, or it can be obtained based on historical experience, etc.
[0097] S202. Determine whether there is a foreign object in the device under test based at least on the first sound signal.
[0098] For example, the detection device 11 can determine whether there is a foreign object in the device under test based on the first sound signal and a pre-trained foreign object detection model.
[0099] For example, the detection device 11 can acquire a second sound signal from a target device of the same type as the device under test when it vibrates, and determine whether there is a foreign object in the device under test based on the second sound signal and the first sound signal. The target device and the device under test 14 are of the same type. The target device can be a device with foreign objects or a device without foreign objects; this embodiment does not impose any restrictions on this.
[0100] For example, when the target device is a device without foreign objects, the presence of foreign objects in the device under test (DUT) 14 can be determined by comparing the first sound signal with the sound signal of the target device. For instance, the similarity of the two sound signals can be compared; a higher similarity indicates a closer proximity, suggesting a higher probability that the DUT 14 is free of foreign objects. Conversely, a lower similarity indicates a greater difference between the two signals, suggesting a higher probability that the DUT 14 contains foreign objects.
[0101] For example, the similarity determination mentioned above can be obtained by calculating the distance between two sound signals, or by obtaining the similarity between the two through a pre-trained model, etc., which will not be elaborated on here.
[0102] Optionally, before determining whether the device under test 14 contains foreign objects based on the first sound signal, the first sound signal can be preprocessed to improve its quality. For example, noise in the first sound signal can be removed. That is, sound signals that do not belong to the device under test 14 can be filtered out. For example, median filtering, Kalman filtering, or other algorithms can be used to preprocess the first sound signal.
[0103] Optionally, after determining whether the device under test 14 contains foreign objects, the detection result can be output, or an alarm message indicating that the device under test 14 contains foreign objects can be output when it is determined that the device under test 14 contains foreign objects. The specific subsequent processing can be set according to actual needs, and this embodiment does not limit it.
[0104] The foreign object detection method provided in this application involves shaking the device under test (DUT) at a certain frequency when a foreign object is present inside the DUT. The foreign object will displace within the DUT and collide with other internal components, generating a sound. Therefore, this application can accurately determine the presence of a foreign object inside the DUT by using the sound signal from the vibration of the DUT. This method eliminates the need for manual disassembly or visual inspection of the DUT, thus improving detection efficiency.
[0105] The following example illustrates how to determine whether the device under test 14 contains foreign matter based on the first and second sound signals, taking the target device as a device without foreign matter as an example.
[0106] Figure 3 This is a schematic flowchart illustrating a method for determining whether a device under test contains foreign matter, provided in an embodiment of this application. Figure 3 As shown, step S202 above may include, for example:
[0107] S301. Determine the acoustic similarity between the device under test and the target device based on the first acoustic signal and the second acoustic signal.
[0108] S302. Determine whether there are foreign objects in the device under test based at least on the similarity of sound.
[0109] In some embodiments, voice similarity may include, for example, a first similarity and / or a second similarity.
[0110] The first similarity is the similarity between the first sound signal and the second sound signal. This similarity can be obtained, for example, by calculating the distance between the two.
[0111] The second similarity is the similarity between the first signal feature sequence of the first sound signal and the second signal feature sequence of the second sound signal.
[0112] For example, when the first signal feature sequence includes a first time-domain signal feature sequence and the second signal feature sequence includes a second time-domain signal feature sequence, the second similarity includes the time-domain similarity between the first time-domain signal feature sequence and the second time-domain signal feature sequence; and / or when the first signal feature sequence includes a first frequency-domain signal feature sequence and the second signal feature sequence includes a second frequency-domain signal feature sequence, the second similarity includes the frequency-domain similarity between the first frequency-domain signal feature sequence and the second frequency-domain signal feature sequence.
[0113] The following explains how to determine the presence of foreign objects in the device under test based on sound similarity for foreign object detection.
[0114] Detection Method 1: Foreign object detection using the first similarity score.
[0115] Figure 4 This is a schematic flowchart illustrating a first method for determining whether a device under test contains foreign matter, provided in an embodiment of this application. Figure 4 As shown, step S302 may include, for example, the following steps:
[0116] S401. Calculate the first similarity between the first sound signal and the second sound signal.
[0117] The aforementioned first similarity can be calculated using, for example, Euclidean distance, Manhattan distance, or Minkowski distance. The closer the distance, the more similar the two objects are; the farther the distance, the less similar they are.
[0118] S402. Determine whether the first similarity is less than or equal to a preset first value. If yes, proceed to S403; otherwise, proceed to S404.
[0119] S403. It is determined that the device under test contains foreign matter.
[0120] S404. Ensure that there are no foreign objects in the device under test.
[0121] Detection Method 2: Use the second similarity to detect foreign objects.
[0122] As mentioned above, the second similarity may include: the time-domain similarity between the first time-domain signal feature sequence of the first signal feature sequence and the second time-domain signal feature sequence of the second signal feature sequence, and / or the frequency-domain similarity between the first frequency-domain signal feature sequence of the first signal feature sequence and the second frequency-domain signal feature sequence of the second signal feature sequence.
[0123] The time-domain signal feature sequence mentioned here may be, for example, the zero crossover rate of the signal, the number of peak points of the signal, the statistical value of the signal, the skewness of the signal, the kurtosis of the signal, and the correlation of the signal. For example, one or more of the above time-domain signal features can be used to construct the time-domain signal feature sequence.
[0124] The zero-crossing rate of a signal is an important characteristic in signal processing. It represents the number of times a signal changes from a positive value to a negative value or from a negative value to a positive value within a certain period of time.
[0125] The number of peak points in a signal refers to the total number of local maxima and local minima in a signal sequence.
[0126] Statistical values of the signal, such as the maximum value X of the signal. max Minimum value X min Mean X mean , median mid One or more of the following: standard deviation, mean deviation.
[0127] The skewness of a signal is a third-order matrix that reflects the degree of asymmetry in the signal's probability density function, effectively detecting minute changes in the signal. In other words, the skewness of a signal can reflect minute sounds generated by foreign objects in the device under test (DUT).
[0128] The kurtosis of a signal reflects the peak value of the signal's density function at the mean.
[0129] The correlation of a signal includes unbiased autocorrelation estimation and biased autocorrelation estimation. Correlation analysis can show the trend of the signal repeating its own characteristics. When the device under test 14 contains foreign objects, the up and down vibration of the foreign objects will show autocorrelation.
[0130] Frequency domain signal feature sequences can be, for example, the power density spectrum, the median frequency of the power spectrum, the mean frequency of the signal, the statistical value of the spectrum, the kurtosis of the spectrum, the skewness of the spectrum, the energy concentration, and the entropy of the spectrum. For example, one or more of the above frequency domain signal features can be used to construct a frequency domain signal feature sequence.
[0131] In the frequency domain, the power density spectrum is a density representation of the power spectrum, typically used to describe the power distribution of a signal within a unit frequency bandwidth. It is a normalized form of the power spectrum, representing the power per unit frequency bandwidth.
[0132] The power spectrum is the power distribution of a signal in the frequency domain, typically represented by the squared amplitude of the signal's Fourier transform. It indicates the power of the signal at each frequency component. The power spectrum helps analyze the distribution of a signal's energy across different frequencies. The median frequency of the power spectrum can be determined from the frequency point k where the power spectrum area is equal.
[0133] Statistical values of the spectrum can reflect the characteristics of the spectrum, such as frequency standard deviation, spectral density, and one or more of the standard deviation of the spectrum.
[0134] The kurtosis of the spectrum reflects the distribution of the sound signal across the spectrum.
[0135] The skewness of the spectrum can reflect minute changes in the frequency spectrum of a sound signal.
[0136] Energy concentration reflects the degree of concentration of spectral energy near its peak.
[0137] Spectral entropy reflects the disorder of the spectrum. When there is a foreign object in the device under test 14, the disorder of its sound will increase under vibration conditions.
[0138] It should be noted that the time-domain signal feature sequence and frequency-domain signal feature sequence of this embodiment are not limited to the above features, and may also include any sound feature that can reflect sound characteristics, so as to identify whether the device under test 14 contains foreign objects.
[0139] Method 21: Use temporal similarity for foreign object detection.
[0140] Figure 5 This is a schematic flowchart illustrating a second method for determining whether a device under test contains foreign matter, provided in an embodiment of this application. Figure 5 As shown, step S302 may include, for example, the following steps:
[0141] S501. Calculate the second similarity between the first signal feature sequence and the second signal feature sequence.
[0142] The second similarity mentioned above can be calculated using, for example, Euclidean distance, Manhattan distance, or Minkowski distance. The closer the distance, the more similar the two are; the farther the distance, the less similar the two are.
[0143] S502. Determine whether the second similarity is less than or equal to a preset second value. If yes, proceed to S503; otherwise, proceed to S504.
[0144] S503. Determine that the device under test contains foreign matter.
[0145] S504. Ensure that there are no foreign objects in the device under test.
[0146] Method 22: Use frequency domain similarity for foreign object detection.
[0147] The method of using frequency domain similarity for foreign object detection is similar to that of method 21. The preset second preset value used can be the same or different, which will not be elaborated further.
[0148] Method 23: Detect foreign objects by combining time-domain similarity and frequency-domain similarity.
[0149] Figure 6 This is a schematic flowchart illustrating a third method for determining whether a device under test contains foreign matter, provided in an embodiment of this application. Figure 6 As shown, step S302 may include, for example, the following steps:
[0150] S601. Calculate the time-domain similarity between the first time-domain signal feature sequence and the second time-domain signal feature sequence.
[0151] S602. Determine whether the time-domain similarity is less than or equal to a preset second preset value. If yes, proceed to S603; otherwise, it means that the current time-domain similarity cannot determine whether there are foreign objects in the device under test, and then proceed to S604.
[0152] S603. Determine that the device under test contains foreign matter.
[0153] S604. Calculate the frequency domain similarity between the first frequency domain signal feature sequence and the second frequency domain signal feature sequence. S605. Determine whether the frequency domain similarity is less than or equal to a preset second preset value. If yes, execute S603.
[0154] If not, then it is determined that there are no foreign objects in the device under test. Alternatively, step S606 can be executed further.
[0155] S606. Use a foreign object detection model to determine whether the device under test contains foreign objects.
[0156] For example, at least one of the first sound signal, the first time-domain signal feature sequence, and the first frequency-domain signal feature sequence is input into a pre-trained foreign object detection model to obtain the detection result output by the foreign object detection model. The detection result is used to characterize whether there is a foreign object in the device under test.
[0157] That is, the form of the input to the above foreign object detection model is related to the form of the sample data used during the training of the model.
[0158] Taking the input of the first sound signal as an example, the above-mentioned foreign object detection model can be trained in advance using the sound signal of the device under test 14 when it vibrates, so that the trained foreign object detection model can conclude whether the device under test 14 contains foreign objects based on the sound signal.
[0159] It should be understood that the models mentioned in the above embodiments can be any machine learning model capable of classification, such as back propagation (BP) neural networks, autoregressive models, Adaboost models, decision tree models, support vector machines (SVMs), Bayesian methods, or other machine learning models. In some embodiments, the foreign object detection model can also be referred to as a classifier.
[0160] For example, the foreign object detection model is a neural network, where the input to a neuron is x = [x0, x1, ..., xn-1], such as the time-domain feature sequence, frequency-domain feature sequence, or sound signal of the device under test 14 as the input value. The corresponding neuron weights are w = [w0, w1, ..., wn-1], and the bias of the weighted summation is b. Each neuron can output directly or through an activation function. The activation function includes various forms such as the maximum value function and the sigmoid function; this embodiment does not limit this. Multiple neurons can form the hidden layers of the neural network, and the neural network can have multiple hidden layers.
[0161] The detection result obtained based on the foreign object detection model can either indicate that the device under test 14 contains a foreign object, or that it does not. In some embodiments, relays containing foreign objects, such as fiber foreign objects or plastic foreign objects, can be artificially created to establish corresponding datasets and feature sets. These datasets and feature sets can then be used to train the model, enabling the model to not only determine whether the device under test 14 contains a foreign object, but also detect the type of foreign object when it is present, thus assisting the user in identifying problems with the device under test 14. For example, the foreign object type can be fiber foreign objects, plastic foreign objects, etc.
[0162] It should be understood that although the above example uses time-domain similarity first and then frequency-domain similarity, in practice, frequency-domain similarity can be used first, followed by time-domain similarity, or both can be used simultaneously. Accordingly,
[0163] Furthermore, not only can temporal similarity and frequency similarity be combined for judgment, but any two or all three of the following can also be used for judgment: first similarity, temporal similarity, and frequency similarity. Alternatively, any one, two, or all three of the above can be further combined with the foreign object detection model for judgment. By integrating multi-dimensional detection methods, the accuracy of detection can be improved.
[0164] The method provided in this embodiment can determine whether there are foreign objects inside the device under test 14 based on the characteristic sequence of the sound signal obtained when the device under test 14 vibrates. Since these characteristics can reflect the properties of sound, it is possible to accurately determine whether the device under test 14 contains foreign objects based on these sound characteristics.
[0165] It should be understood that the second sound signal of the target device when it vibrates can be collected by the user in advance using other methods, or it can be obtained using the test system provided in the embodiments of this application.
[0166] For example, before testing the device under test 14, the test system can also acquire the second sound signal of the target device when it vibrates, as well as the second signal feature sequence.
[0167] One possible implementation, taking the application of vibration with a set frequency and / or amplitude as an example, is as follows: The process of establishing a second sound signal of the target device during vibration is as follows:
[0168] (1) The detection device 11 sends a control command to the vibration device 12, or the user inputs a control command to the vibration device 12 to control the vibration device 12 to apply vibration to the foreign object-free relay according to the set vibration frequency and / or amplitude, or the vibration device 12 vibrates according to the initially set vibration frequency and / or amplitude.
[0169] (2) The vibration device 12 applies vibration to the target device.
[0170] (3) The sound acquisition device 13 sends the acquired sound signal to the data acquisition device 17.
[0171] (4) The amplitude acquisition device 15 sends the acquired acceleration signal to the data acquisition device 17.
[0172] (5) The data acquisition device 17 sends the received sound signal and amplitude and / or frequency signal to the detection device 11.
[0173] (6) The detection device 11 acquires the actual amplitude and / or actual frequency of the device under test 14 during vibration based on the amplitude and / or frequency signals.
[0174] (7) The detection device 11 determines whether the difference between the set amplitude and / or set frequency and the actual amplitude and / or actual frequency is within the preset difference range. The specific steps are shown in S707 and will not be repeated here.
[0175] (8) The detection device 11 extracts the sound signal acquired after the acquisition time corresponding to the actual amplitude and / or actual frequency.
[0176] (9) Repeat the above steps to measure multiple target devices multiple times and obtain the sound signals of multiple target devices.
[0177] (10) The detection device 11 can extract the time-domain signal features and / or frequency-domain signal features of the sound signals of the multiple target devices, and select typical values from them to finally form the second sound signal and the second signal feature sequence.
[0178] Since the sound signal of the target device obtained above can be the same as the sound signal of the device under test 14, the differences caused by different sound acquisition devices can be avoided or reduced, thereby improving the accuracy of foreign object detection of the device under test 14.
[0179] The following example, using the device under test 14 as the target relay and the test system containing the data acquisition device 17, illustrates how to detect the device under test 14.
[0180] After the target relay is manually fixed on the fixing device 16 of the vibration device 12, the amplitude acquisition device 15 is arranged on the device under test 14, and the sound acquisition device 13 is arranged near the device under test 14.
[0181] Then, the detection device 11 can detect foreign objects in the following manner:
[0182] Figure 7 This is a flowchart illustrating a relay foreign object detection step provided in an embodiment of this application, as shown below. Figure 7 As shown, the method may include, for example, the following steps:
[0183] S701. The detection device sends a control command to the vibration device. The control command is used to control the vibration device to apply vibration to the target relay according to the set vibration frequency and vibration amplitude.
[0184] S702. The vibration device applies vibration to the target relay according to the set vibration frequency and / or vibration amplitude.
[0185] S703, The sound acquisition device sends the acquired sound signal to the data acquisition device.
[0186] S704. The amplitude acquisition device sends the acquired amplitude and / or frequency signals to the data acquisition device.
[0187] S705, The data acquisition device sends the received sound signal and amplitude and / or frequency signal to the detection device.
[0188] S706. The detection device acquires the actual amplitude and / or actual frequency of the target relay during vibration based on the amplitude and / or frequency signals.
[0189] S707, The detection device determines whether the difference between the set amplitude and / or set frequency and the actual amplitude and / or actual frequency is within the preset difference range.
[0190] If not, a prompt message is output to remind the user to re-check and adjust the fixing device 16 (e.g., re-fix the target relay to the fixing device 16, or replace the fixing device 16, depending on the tightness between the fixing device 16 and the target relay). After the fixing device 16 has been checked, the process returns to S701 to start execution again. If yes, it means that the vibration device 12 has applied vibration to the target relay to reach the set amplitude, and then step S708 is executed.
[0191] S708. The detection device takes the sound signal collected after the acquisition time corresponding to the actual amplitude and / or actual frequency as the first sound signal and obtains the first sound signal.
[0192] S709. The detection device preprocesses the first sound signal to remove noise from the first sound signal.
[0193] S710 The detection device determines whether the target relay contains foreign objects based on the first sound signal.
[0194] The method provided in this embodiment allows for the accurate determination of the presence of foreign objects inside a relay when the relay is shaken at a certain frequency. The foreign objects will displace within the relay and collide with internal components, producing a sound. Therefore, this application can accurately determine the presence of foreign objects inside the relay by utilizing the sound signal from the relay's vibration. This method eliminates the need for manual disassembly or visual inspection of the relay, thus improving detection efficiency.
[0195] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 8 As shown, the electronic device 800 may include a memory 801 and a processor 802. Optionally, the electronic device may also include a transceiver 803, wherein the memory 801 and the processor 802 communicate with each other; for example, the memory 801, the processor 802 and the transceiver 803 may communicate via a communication bus 806, the memory 801 is used to store a computer program, and the processor 802 executes the computer program to implement the method of the above embodiments.
[0196] Optionally, the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps in the method embodiments disclosed in this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0197] This application also provides a method such as... Figure 1 The test system shown is described in detail in the foregoing content and will not be repeated here.
[0198] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the methods in any of the above method embodiments.
[0199] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods in any of the above method embodiments.
[0200] All or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.
[0201] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0202] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0203] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0204] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.
[0205] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0206] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for detecting foreign objects, characterized in that, The method includes: Acquire the first sound signal of the device under test when it vibrates; Based on the similarity of the first sound signal and the second sound signal of the target device, it is determined whether there is a foreign object in the device under test, and the target device and the device under test are of the same type. The sound similarity includes a first similarity between the first sound signal and the second sound signal, and a second similarity between the signal feature sequences corresponding to the two sound signals. The second similarity includes the time-domain similarity between the first time-domain feature sequence of the first sound signal and the second time-domain feature sequence of the second sound signal, and / or the frequency-domain similarity between the first frequency-domain feature sequence of the first sound signal and the second frequency-domain feature sequence of the second sound signal.
2. The method according to claim 1, characterized in that, The method further includes: Acquire the second sound signal of the target device when it vibrates.
3. The method according to claim 2, characterized in that, The target device is a device free of foreign objects. When the sound similarity includes a first similarity, determining whether a foreign object exists in the device under test based on the sound similarity between the first sound signal and the second sound signal of the target device includes: If the first similarity is less than or equal to a preset first preset value, and the second similarity is less than or equal to a preset second preset value, then it is determined that there is a foreign object in the device under test.
4. The method according to claim 1, characterized in that, The second similarity includes: When the first signal feature sequence includes a first time-domain signal feature sequence and the second signal feature sequence includes a second time-domain signal feature sequence, the second similarity includes the time-domain similarity between the first time-domain signal feature sequence and the second time-domain signal feature sequence; and / or When the first signal feature sequence includes a first frequency domain signal feature sequence and the second signal feature sequence includes a second frequency domain signal feature sequence, the second similarity includes the frequency domain similarity between the first frequency domain signal feature sequence and the second frequency domain signal feature sequence. If the second similarity is less than or equal to a preset second preset value, then it is determined that there is a foreign object in the device under test, including: If the first similarity is less than or equal to a preset first preset value, and the time-domain similarity and / or the frequency-domain similarity is less than or equal to a preset second preset value, then it is determined that there is a foreign object in the device under test.
5. The method according to claim 4, characterized in that, The step of determining whether there is a foreign object in the device under test based on the sound similarity between the first sound signal and the second sound signal of the target device includes: If the first similarity is greater than a preset first preset value, and both the time-domain similarity and the frequency-domain similarity are greater than the preset second preset value, then it is determined that there are no foreign objects in the device under test.
6. The method according to claim 4, characterized in that, The step of determining whether there is a foreign object in the device under test based on the sound similarity between the first sound signal and the second sound signal of the target device further includes: If the first similarity is greater than a preset first preset value, and the time-domain similarity and the frequency-domain similarity are both greater than the preset second preset value, then the first time-domain signal feature sequence and / or the first frequency-domain signal feature sequence and the first sound signal are input into the pre-trained foreign object detection model to obtain the detection result output by the foreign object detection model. The detection result is used to characterize whether there is a foreign object in the device under test.
7. The method according to claim 6, characterized in that, When the device under test contains foreign matter, the detection result is also used to characterize the type of foreign matter present in the device under test.
8. The method according to any one of claims 1-7, characterized in that, Before determining whether a foreign object exists in the device under test based on the first sound signal, the method further includes: The first sound signal is preprocessed to remove noise from it.
9. The method according to any one of claims 1-7, characterized in that, The acquisition of the first sound signal of the device under test during vibration includes: Acquire the first sound signal of the device under test when it vibrates at a set frequency and a set amplitude.
10. The method according to claim 9, characterized in that, Before acquiring the first sound signal when the device under test vibrates at a set frequency and a set amplitude, the method further includes: Obtain the actual amplitude of the device under test when it vibrates at a set frequency and a set amplitude; The difference between the set amplitude and the actual amplitude is determined to be within a preset difference range.
11. The method according to claim 9, characterized in that, The device under test is mounted on the vibration device, and the method further includes: A control command is sent to the vibration device, wherein the vibration device is capable of vibrating in response to the control command, so that the device under test vibrates at the set frequency and the set amplitude.
12. A testing system, characterized in that, The testing system includes: a detection device, a vibration device, and a sound acquisition device; The vibration device is used to support the device under test and drive the device under test to vibrate; The sound acquisition device is used to acquire the first sound signal of the device under test when it vibrates; The detection device is used to perform the method as described in any one of claims 1-11.
13. The system according to claim 12, characterized in that, The vibration device is used to receive control commands sent by the detection device, and drive the device under test to vibrate according to the control commands at a set frequency and a set amplitude.
14. The system according to claim 13, characterized in that, The system also includes: an amplitude acquisition device; The amplitude acquisition device is used to acquire the actual amplitude of the device under test when it vibrates at a set frequency and a set amplitude. The detection device is also used to acquire the first sound signal of the device under test vibrating at a set frequency and a set amplitude when the difference between the set amplitude and the actual amplitude is within a preset difference range.
15. The system according to any one of claims 12-14, characterized in that, The system also includes: a fixing device; The fixing device is used to fix the device under test onto the vibration device.
16. The system according to any one of claims 13-14, characterized in that, The system also includes: a data acquisition device; The data acquisition device is connected to the detection device and the sound acquisition device respectively, and is used to acquire the first sound signal of the device under test when it vibrates, which is acquired by the sound acquisition device, and send the first sound signal to the detection device.
17. An electronic device, characterized in that, The electronic device includes: a processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-11.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-11.
19. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-11.
Citation Information
Patent Citations
Device based on sound wave detects pottery board flaw
CN206990500U
Sound diagnostic device and sound diagnostic method
JP2002323371A