Equipment testing method and device, electronic equipment and storage medium
By performing linkage tests on the dual filter switcher and microphone of the test equipment, collecting audio signals for filter switching detection, the problem of low efficiency and large errors of traditional test methods is solved, and the integration of video and audio input and output functional equipment is realized. Efficient and accurate testing.
Patent Information
- Application Number
- CN202410742160.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-10-01
AI Technical Summary
Traditional equipment testing methods have low efficiency, large human operation errors, and unstable test results, making it difficult to efficiently and accurately test equipment with integrated video and audio input and output functions.
By controlling the dual filter switcher and microphone of the test equipment for linkage testing, audio signals are collected for filter switching detection to ensure that the speaker is in normal functional status, achieving comprehensive coverage of the equipment components and reducing manual intervention.
It improves test efficiency and result reliability, enables efficient and accurate testing of integrated video and audio input and output functional devices, and reduces production costs and misjudgment rates.
Smart Images

Figure CN118741401A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of equipment testing, and in particular to equipment testing methods, devices, electronic equipment and storage media. Background Art
[0002] On traditional production lines, for devices that integrate video and audio input and output functions, such as smart cameras, webcams, smart doorbells, video intercoms and other devices, each component of the device needs to be tested separately before leaving the factory, and the test results are usually judged manually. However, due to the complexity of the test items, there are problems such as low test efficiency, large human operation errors, and unstable test results, making it difficult to test such devices efficiently and accurately.
[0003] In summary, how to efficiently and accurately test devices that integrate video and audio input and output functions has become a technical problem that urgently needs to be solved in this field. Summary of the invention
[0004] The main purpose of this application is to provide a device testing method, apparatus, electronic device and storage medium, aiming to efficiently and accurately test devices that integrate video and audio input and output functions.
[0005] To achieve the above purpose, the present application proposes a device testing method, which includes:
[0006] Control the dual filter switch of the test equipment to switch filters;
[0007] Controlling the microphone of the test device to collect a first audio signal during a first process in which the dual filter switch performs filter switching;
[0008] Performing audio detection on the first audio signal to test the functional status of the dual filter switch and the microphone;
[0009] When the functional states of the dual filter switch and the microphone are in normal states, controlling the speaker of the test device to play the first audio signal, and controlling the microphone to collect the second audio signal during the second process of the speaker playing the first audio signal;
[0010] An audio detection is performed on the second audio signal to test the functional status of the speaker.
[0011] In one embodiment, the step of controlling the dual filter switch of the test device to switch filters includes:
[0012] After receiving the test instruction, within a preset time period, the dual filter switch of the test equipment is controlled to switch the filters according to a preset time interval;
[0013] Record the switching times of the dual filter switch.
[0014] In one embodiment, after the step of controlling the microphone of the test device to collect the first audio signal during the first process of the dual filter switch performing filter switching, the step further includes:
[0015] Performing filtering processing on the first audio signal to obtain a third audio signal;
[0016] Binarizing the third audio signal to obtain a binary audio signal;
[0017] The step of performing audio detection on the first audio signal to test the functional status of the dual filter switch and the microphone comprises:
[0018] Perform audio detection on binary audio signals to test the functional status of the dual filter switcher and microphone.
[0019] In one embodiment, the step of performing audio detection on a binary audio signal to test the functional status of a dual filter switch and a microphone includes:
[0020] Performing audio detection on the binary audio signal to determine the number of filter switching audios collected in the binary audio signal;
[0021] Compare the number of times the filter switches audio and the number of switching times;
[0022] If the difference between the number of times the filter switches the audio and the number of switching times is less than a preset threshold, it is determined that the functional status of the dual filter switch and the microphone is normal.
[0023] In one embodiment, the step of performing audio detection on the binary audio signal to determine the number of filter switching audios collected in the binary audio signal includes:
[0024] Obtain the length of each continuous zero sequence in the binary audio signal;
[0025] The number of target continuous zero sequences whose lengths are within a preset interval in each continuous zero sequence is counted, and the number is determined as the number of filter switching audios collected in the binary audio signal.
[0026] In one embodiment, after the step of performing audio detection on the first audio signal to test the functional status of the dual filter switch and the microphone, the method further includes:
[0027] When the functional status of the dual filter switch and the microphone is abnormal, the first abnormal prompt information is output.
[0028] In one embodiment, after the step of performing audio detection on the second audio signal to test the functional status of the speaker, the method further includes:
[0029] When the speaker is in normal function state, the output test is successful prompt message;
[0030] When the functional state of the speaker is an abnormal state, a second abnormal prompt information is output.
[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a device testing apparatus, the device testing apparatus comprising:
[0032] A filter switching module is used to control the dual filter switch of the test equipment to switch filters;
[0033] A first audio acquisition module, used to control the microphone of the test device to collect a first audio signal during a first process of filter switching by the dual filter switch;
[0034] A first audio detection module, used for performing audio detection on a first audio signal to test the functional status of a dual filter switch and a microphone;
[0035] A second audio acquisition module is used to control the speaker of the test device to play the first audio signal when the functional states of the dual filter switch and the microphone are in a normal state, and to control the microphone to collect the second audio signal during the second process of the speaker playing the first audio signal;
[0036] The second audio detection module is used to perform audio detection on the second audio signal to test the functional status of the speaker.
[0037] In addition, to achieve the above objectives, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the device testing method as described above.
[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the device testing method as described above are implemented.
[0039] The present application proposes a device testing method, which first controls a dual filter switch of a test device to switch filters, and during the process of the dual filter switch switching filters (referred to as the first process), simultaneously controls the microphone of the test device to collect audio signals to obtain a first audio signal; then, performs audio detection on the collected first audio signal to evaluate whether the functional states of the dual filter switch and the microphone are normal; then, when the functional states of the dual filter switch and the microphone are both normal, controls the speaker of the test device to play the previously collected first audio signal, and during the speaker playing process (referred to as the second process), controls the microphone again to collect audio signals to obtain a second audio signal; finally, performs audio detection on the second audio signal to verify whether the functional state of the speaker is normal.
[0040] In summary, the present application can comprehensively cover the detection of the audio input and output functions and the filter switching functions of the test equipment for video acquisition by performing linkage tests on the dual filter switcher, microphone and speaker of the test equipment, thereby ensuring that the components of the test equipment can work normally. At the same time, during the test process, there is no need for manual testing and test result judgment of multiple projects, which improves the test efficiency and ensures the reliability of the test results, thereby achieving efficient and accurate testing of devices with integrated video and audio input and output functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 A schematic diagram of a process flow provided for Embodiment 1 of the device testing method of the present application;
[0044] Figure 2 A schematic diagram of collecting audio signals provided in Embodiment 2 of the device testing method of this application;
[0045] Figure 3 A schematic diagram of a binary audio signal provided in Embodiment 2 of the device testing method of the present application;
[0046] Figure 4 A brief flow chart of the second embodiment of the device testing method of the present application is provided;
[0047] Figure 5 This is a schematic diagram of the module structure of the equipment testing device according to the embodiment of the present application;
[0048] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the device testing method in the embodiment of the present application.
[0049] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0051] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0052] The main solution of the embodiment of the present application is: controlling the dual filter switch of the test device to switch filters; controlling the microphone of the test device to collect a first audio signal in the first process of the dual filter switch switching filters; performing audio detection on the first audio signal to test the functional status of the dual filter switch and the microphone; when the functional status of the dual filter switch and the microphone is normal, controlling the speaker of the test device to play the first audio signal, and controlling the microphone to collect the second audio signal in the second process of the speaker playing the first audio signal; performing audio detection on the second audio signal to test the functional status of the speaker.
[0053] Since traditional equipment testing methods usually use manual judgment, but due to the complexity of the test items, there are problems such as low test efficiency, large human operation errors, and unstable test results, making it difficult to test such equipment efficiently and accurately.
[0054] Specifically, in the traditional equipment testing process, each component of the equipment needs to be tested separately to detect defective products. The test results of many components need to rely on manual judgment. The entire process is complicated, the test takes a long time, and the production cost is high. At the same time, since it involves manual judgment, there is a certain probability of errors and omissions.
[0055] For example, currently, the testing of the mic (microphone) and speaker (speaker) of the equipment requires the use of a professional audio tester, which is expensive and has high professional requirements, and is not suitable for ordinary small-scale factories; or the audio is recorded and played through the mic and speaker, and the sound is manually listened to for testing, but it is easy to cause misjudgment; and the detection of IR-CUT (infrared cut dual filter switcher) mainly relies on manual listening to the switching sound. Due to the noisy factory environment or the workers' lack of concentration, it is easy to miss defective products and make misjudgments; IR-CUT detection can also be carried out by judging whether the image is color or black and white through video transmission, which requires the use of wifi (Wireless Fidelity wireless network communication technology) or algorithms, which has high requirements for wifi stability and algorithms. In addition, during the test process, when the IR-CUT fails to switch, a purple image will appear, which is easy to be misjudged as switching to a color filter, missing defective products, and there is also the problem of wifi instability and packet loss, which is also prone to detection failure.
[0056] The embodiment of the present application provides a solution, which can comprehensively cover the detection of the audio input and output functions and the filter switching functions of the test equipment and the video acquisition through linkage testing of the dual filter switch, microphone and speaker of the test equipment, thereby ensuring that the components of the test equipment can work normally. At the same time, during the test process, there is no need for manual testing and test result judgment of multiple projects, which improves the test efficiency and ensures the reliability of the test results, thereby achieving the effect of efficient and accurate testing of devices with integrated video and audio input and output functions.
[0057] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a vehicle terminal, etc., or an electronic device capable of realizing the above functions, etc. The following takes a test machine as an example to illustrate this embodiment and the following embodiments.
[0058] Based on this, the present application embodiment provides a device testing method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the device testing method of the present application.
[0059] In this embodiment, the device testing method includes steps S10 to S50:
[0060] Step S10, controlling the dual filter switch of the test equipment to switch filters;
[0061] It should be noted that the test equipment is a device that integrates video and audio input and output functions, or a device that integrates IR-CUT, mic and speaker components, such as smart cameras, network cameras, smart doorbells, video intercoms and other devices. In order to ensure the factory quality of such equipment, the functions of each component of the equipment must be tested before the equipment leaves the factory to eliminate defective products.
[0062] In addition, it should be noted that IR-CUT is usually used in cameras to switch between day and night shooting modes. During the day, the filter allows visible light to pass through, and at night or in low-light environments, the filter will switch to allow infrared light to pass through, and cooperate with the infrared fill light to achieve night vision function; the mic is used to receive sound signals and convert them into electrical signals for recording or transmission; the speaker is used to convert electrical signals into sound signals to achieve audio playback or call functions.
[0063] During the testing phase for the test equipment, the dual filter switch of the test equipment is first controlled to execute a filter switching action, that is, to simulate the filter switching function of the dual filter switch of the test equipment under different light intensities during actual use.
[0064] Step S20, controlling the microphone of the test device to collect a first audio signal during a first process of filter switching by the dual filter switch;
[0065] It should be noted that the dual filter switch of the test equipment will generate a fixed sound when performing a filter switching action. The fixed sound can be collected by the microphone of the test equipment to determine whether the filter switching action is completed normally.
[0066] During the process of filter switching by the dual filter switch (referred to as the first process), the microphone of the test equipment is simultaneously controlled to collect audio signals to obtain a first audio signal, which generally includes filter switching audio during filter switching and noise audio in the test environment.
[0067] Step S30, performing audio detection on the first audio signal to test the functional status of the dual filter switch and the microphone;
[0068] After collecting the first audio signal, the first audio signal is processed and analyzed through a preset audio detection algorithm to determine whether the first audio signal contains specific characteristic information, such as specific sound characteristics when the dual filter switch is working. Based on the detection results, it is determined whether the functional status of the dual filter switch and the microphone is normal.
[0069] Step S40, when the functional states of the dual filter switch and the microphone are in normal states, controlling the speaker of the test device to play the first audio signal, and controlling the microphone to collect the second audio signal during the second process of the speaker playing the first audio signal;
[0070] When the functional status of the dual filter switch and the microphone are both judged to be normal, the speaker of the test device is controlled to play the collected first audio signal. At the same time, the microphone is controlled again to collect the second audio signal during the process of the speaker playing the audio, so as to determine whether the functional status of the speaker of the test device is normal.
[0071] In a feasible embodiment, after step S30, the device testing method further includes step A10:
[0072] Step A10: when the functional status of the dual filter switch and the microphone is abnormal, output a first abnormal prompt message.
[0073] When the functional status of the dual filter switch and the microphone is judged to be abnormal, the exception handling mechanism is automatically triggered and the first abnormal prompt information is output. The first abnormal prompt information specifically indicates that the functional status of the dual filter switch and / or the microphone of the test equipment is abnormal. The information can be displayed on the display screen of the test machine or presented to the tester in the form of a sound prompt, so that the tester can be informed of the abnormal situation of the test equipment in time and take corresponding handling measures.
[0074] Step S50: Perform audio detection on the second audio signal to test the functional status of the speaker.
[0075] After collecting the second audio signal, the second audio signal is processed and analyzed again through the preset audio detection algorithm to determine whether the second audio signal contains specific characteristic information, such as specific sound characteristics when the dual filter switch is working, and based on the detection results, it is judged whether the functional status of the speaker is normal.
[0076] In a feasible embodiment, after step S50, the device testing method further includes steps B10 to B20:
[0077] Step B10, when the function status of the speaker is normal, outputting a prompt message indicating that the test is successful;
[0078] When it is determined that the functional status of the speaker is normal, at this time, the test machine has completed the functional testing of the dual filter switch, microphone and speaker of the test product, and the test results of the three components are normal, then the test equipment is judged to be tested correctly, and the test machine can present the correct test result to the tester through the display screen, LED (Light Emitting Diode) indicator light or other user interface (such as voice prompt interface) to inform the tester that the current test equipment is normal and can be replaced with the next device to be tested for a new round of testing.
[0079] Step B20: when the function status of the speaker is abnormal, output a second abnormal prompt message.
[0080] When the functional status of the speaker is judged to be abnormal, the exception handling mechanism is automatically triggered and a second abnormal prompt information is output. The second abnormal prompt information specifically indicates that the functional status of the speaker of the test equipment is abnormal. The information can be displayed on the display screen of the test machine or presented to the tester in the form of a sound prompt, so that the tester can be informed of the abnormal situation of the test equipment in time and take corresponding handling measures.
[0081] In summary, the embodiments of the present application can comprehensively cover the detection of the audio input and output functions and the filter switching functions of the test equipment and video acquisition by performing linkage tests on the dual filter switch, microphone and speaker of the test equipment, thereby ensuring that the components of the test equipment can work normally. At the same time, during the test process, there is no need for manual testing and test result judgment of multiple projects, which improves the test efficiency and ensures the reliability of the test results, thereby achieving efficient and accurate testing of devices with integrated video and audio input and output functions.
[0082] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. On this basis, step S10 can include steps S101 to S102:
[0083] Step S101, after receiving the test instruction, within a preset time period, control the dual filter switch of the test equipment to switch the filter according to a preset time interval;
[0084] Step S101, recording the switching times of the dual filter switch.
[0085] It should be noted that the triggering method of test instructions varies depending on the test scenario. In a manual testing environment, test instructions are usually manually triggered by the tester after the test equipment to be tested is properly placed on the test platform, thereby starting the entire test process; in a fully automated testing scenario, when the test equipment to be tested is placed on the test platform through a conveyor chain or the precise operation of a robot, the test machine can quickly detect the arrival status of the test equipment and automatically trigger the test process accordingly, without the need for human intervention, greatly improving the automation level and efficiency of the test.
[0086] After receiving the test instruction, the test machine will first start a preset time period. During this time period, the dual filter switch of the test equipment is controlled to switch filters according to the preset time interval and the switching times of the dual filter switch are recorded.
[0087] Exemplarily, after receiving the test instruction, within the time period N, the dual filter switch of the test equipment is controlled to repeatedly switch the filter according to the time interval T, and the number of times the filter is switched is M=N / T.
[0088] In a feasible embodiment, after step S20, the device testing method further includes steps C10 to C20:
[0089] Step C10, filtering the first audio signal to obtain a third audio signal;
[0090] It should be noted that the first audio signal collected by the test equipment is an analog audio signal. Before filtering, the first audio signal is converted into a digital audio signal, and the digital audio signal is used as the first audio signal to perform filtering to obtain the third audio signal.
[0091] In the process of collecting audio with the mic, the collected analog audio signal is first sampled according to the set sampling rate, then converted into a digital signal through quantization, and finally encoded to obtain a digital audio signal. Then, the digital audio signal is filtered to obtain a third audio signal.
[0092] The filtering process is used to remove the noise signal in the first audio signal. Specifically, in a feasible embodiment, the test machine pre-sets a threshold T of the filter. When the first audio signal passes through the filter, the value of the sampling point (i.e., the sampling value) is compared with the threshold T. If the value of the sampling point is lower than the threshold T, the sampling value is considered to be environmental noise and is filtered out, thereby removing the low-amplitude noise in the first audio signal and obtaining the third audio signal.
[0093] Exemplarily, the collected first audio signal is as follows: Figure 2As shown, the horizontal axis is the duration of the audio, and every 10000 represents 1 second, and the vertical axis is the sampling value. In the case of no noise signal interference, the sampling value distribution in the first audio signal should present the characteristics of the same time interval and the same sampling value, and Figure 2 It shows the situation where there is noise signal interference. At this time, the audio signal needs to be filtered first to remove the noise signal in the signal.
[0094] Step C20, performing binary processing on the third audio signal to obtain a binary audio signal;
[0095] It should be noted that the purpose of binarization is to convert the sampled values of the audio signal into binary form (ie, 0 and 1) for further processing or analysis.
[0096] The third audio signal is binarized based on the previously set threshold T. If the amplitude of the sampled value is higher than the threshold T, it is set to 1. If the amplitude of the sampled value is lower than the threshold T, it is set to 0. After the binarization process, a sequence containing only 0 and 1 is obtained, which is a binary audio signal.
[0097] On this basis, step S30 may include step D30:
[0098] Step D30, performing audio detection on the binary audio signal to test the functional status of the dual filter switch and the microphone.
[0099] Performing audio detection on the first audio signal is essentially performing audio detection on the binary audio signal obtained after filtering and binarization, by determining whether the binary audio signal contains specific feature information, such as specific sound features when the dual filter switch is working, and judging whether the functional status of the dual filter switch and the microphone is normal based on the detection results.
[0100] In a feasible embodiment, step D30 may include steps D301 to D303:
[0101] Step D301, performing audio detection on the binary audio signal to determine the number of filter switching audios collected in the binary audio signal;
[0102] Audio detection is performed on the binary audio signal to determine the number of filter switching audios collected in the binary audio signal, wherein the filter switching audio is a sound signal generated by the dual filter switcher of the test equipment when performing a filter switching operation. Under ideal conditions, the filter switching audio is an audio signal that maintains a fixed sampling period and a fixed sampling value.
[0103] In a feasible embodiment, step D301 may include steps D3011 to D3012:
[0104] Step D3011, obtaining the length of each continuous zero sequence in the binary audio signal;
[0105] It should be noted that, in a feasible embodiment, the image of the binary audio signal is as follows: Figure 3 As shown, the horizontal axis is the duration of the audio, and every 10000 represents 1 second. The vertical axis is the audio assignment. When the sampling value is higher than the threshold value T, the audio assignment value is 1, and when the sampling value is lower than the threshold value T, the audio assignment value is 0. The continuous zero sequence represents a sequence of audio durations in which the audio assignment value is continuously 0. The continuous zero sequence can also be regarded as a signal in a silent state in the sound signal collected after filtering out the noise signal.
[0106] Analyze the binary audio signal, extract all the continuous zero sequences in it, and record the length of each continuous zero sequence, that is, the number of continuous zero values in the sequence.
[0107] Step D3012, counting the number of target continuous zero sequences whose lengths are within a preset interval in each continuous zero sequence, and determining the number as the number of filter switching audios collected in the binary audio signal.
[0108] It should be noted that the preset interval is determined based on the sampling rate and the sampling interval threshold. Specifically, the sampling rate S (the number of sampling points per second) and the sampling interval threshold X are used to calculate the two boundary values L and H of the preset interval, where L is the sampling rate S minus X% of the sampling points, and H is the sampling rate S plus X% of the sampling points. The sampling interval threshold can be set according to actual application requirements, and this is not specifically limited in this embodiment.
[0109] The number of target continuous zero sequences whose length is within a preset interval is sequentially counted in the binary audio signal, that is, the number N of audio values assigned to zero in the counted target continuous zero sequence satisfies N≥L and N≤H, and the number is determined as the number of filter switching audios collected in the binary audio signal.
[0110] Step D302, comparing the number of times the filter switches the audio frequency with the number of switching times;
[0111] Step D303, if the difference between the number of times the filter switches the audio and the number of switching times is less than a preset threshold, it is determined that the functional status of the dual filter switch and the microphone is normal.
[0112] The number of filter switching audios counted based on the binary audio signal is compared with the pre-recorded switching number of the dual filter switcher. If it is determined that the difference between the number of filter switching audios and the recorded switching number is less than a preset threshold, it is determined that the functional status of the dual filter switcher and the microphone is normal. The preset threshold can be set according to actual application requirements and is not specifically limited in this embodiment.
[0113] For example, to facilitate understanding of the audio detection step in the above embodiment, it is assumed that the audio sampling frequency is 44.1kHz, the sampling rate is 8000bps, and the sampling bit number is 16bit, that is, 8000 samples are taken per second, and the size of each sampling point is 16bit. 44.1khz is the extraction cycle of the digital discrete point, and 44100 extractions are made per second. 16bit means that the size of each extracted discrete point value is expressed by the numerical interval of 2^16=65536. Since the waveform has peaks and troughs, the upper and lower limits are 65536 / 2=32768, indicating that the sampling value range is -32768 to +32768. IR-CUT switches once every 1 second, and the sampling interval threshold X=10. Then the first boundary value L=8000*0.9=7200 of the preset interval and the second boundary value H=8000*1.1=8800 of the preset interval are calculated. After obtaining the binary audio signal, the signal is traversed to find a sequence of continuous 0s. If the length of a sequence of continuous 0s (i.e., the number of 0s N) satisfies N>=7200&&N<=8800, it is determined that this is a valid filter switch. In this way, all valid filter switches in the entire binary audio signal, or the number of filter switching audios, are counted.
[0114] After obtaining the number of filter switching audio times, compare the number with the recorded switching number. Assuming that there are 10 filter switches every 10 seconds during the test, and the preset threshold is set to 20%, it means that when the difference between the number of filter switching audio times and the recorded switching number is within 2 times, it is considered that the binary audio signal includes the characteristics of the filter switching event, that is, when the counted number of filter switching audio times is greater than or equal to 8 times within 10 seconds, it is determined that the functional status of the dual filter switch and the microphone is normal.
[0115] In this way, in this embodiment, the IR-CUT of the test equipment is controlled to be repeatedly triggered according to a specific rule to generate a sound source containing a specific signal, and the mic of the test equipment itself is controlled to collect the corresponding first audio signal, and then the first audio signal is processed (including filtering, binarization, etc.), and the processed signal is detected by a software algorithm to check whether it contains specified feature information to determine whether the functional status of the IR-CUT and mic of the test equipment is normal. After determining that the functional status of the IR-CUT and the mic is normal, the first audio signal is played through the speaker of the test equipment itself, and the mic is controlled again to collect the second audio signal, and then the second audio signal is processed (including filtering, binarization, etc.), and the processed signal is detected by a software algorithm to check whether it contains specified feature information to determine whether the functional status of the speaker of the test equipment is normal. It should be noted that the processing process of the second audio signal is the same as the processing process of the first audio signal, which will not be repeated here.
[0116] In this way, the embodiment of the present application can realize unattended automated testing on the production line, and the test results do not need human intervention to judge, thereby improving the efficiency of testing equipment with integrated video and audio input and output functions, saving manpower and costs, and ensuring the accuracy of the test.
[0117] For example, to help understand the implementation process of the device testing method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 4 , Figure 4 A brief flow chart of a device testing method is provided, specifically:
[0118] After receiving the test instruction, within the preset time period N seconds, the IR-CUT of the test equipment is controlled to switch the filter at a certain time interval, and the action is performed M times in total, that is, the number of switching times is M. Then, the mic of the test equipment is controlled to collect the audio during the filter switching process to obtain a first audio signal, and then the first audio signal is processed, and it is detected whether the first audio signal contains the expected sound characteristics, that is, it is determined whether the signal has the sound amplitude and sound interval that meet the filter switching, so as to determine whether the mic and IR-CUT of the test equipment are normal. If the signal does not meet the requirements, it is determined that the test of the mic and / or IR-CUT has failed (mic / IR-CUTerr), and the test is terminated and the corresponding As a result, if the signal meets the requirements, the speaker of the test device is controlled to play the collected first audio signal, and the mic of the test device is controlled again to collect audio to obtain a second audio signal. The second audio signal is then processed, and it is detected whether the second audio signal contains specific features, that is, it is determined whether the signal contains sound amplitude and sound interval that meet the requirements when the filter is switched. If the signal meets the requirements, it is determined that the tests of mic, IR-CUT and speaker have all passed (IR-CUT, speaker, micok), and the test is terminated and the corresponding result is output. If the signal does not meet the requirements, it is determined that the test of the speaker has failed (speakererr), and the test is terminated and the corresponding result is output.
[0119] In addition, in another feasible embodiment, after processing the first audio signal, the processed first audio signal can be played through the speaker immediately and subsequent steps can be executed. If the second audio signal meets the sound amplitude and sound interval when the filter is switched, it is determined that the tests of mic, IR-CUT and speaker have all passed, and the test is ended and the corresponding result is output. If it does not meet the requirements, the step of detecting whether the first audio signal contains specific features is executed to determine whether the tests of mic and IR-CUT have failed or the test of the speaker has failed.
[0120] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the equipment testing method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0121] The present application also provides a device testing apparatus, see Figure 5 , the equipment test device includes:
[0122] A filter switching module 10 is used to control a dual filter switch of a test device to switch filters;
[0123] A first audio acquisition module 20, used to control the microphone of the test device to collect a first audio signal during a first process of filter switching by the dual filter switch;
[0124] A first audio detection module 30, used for performing audio detection on the first audio signal to test the functional status of the dual filter switch and the microphone;
[0125] The second audio acquisition module 40 is used to control the speaker of the test device to play the first audio signal when the functional states of the dual filter switch and the microphone are in a normal state, and to control the microphone to collect the second audio signal during the second process of the speaker playing the first audio signal;
[0126] The second audio detection module 50 is used to perform audio detection on the second audio signal to test the functional status of the speaker.
[0127] Optionally, the filter switching module 10 is further used to:
[0128] The steps of controlling the dual filter switch of the test equipment to switch the filters include:
[0129] After receiving the test instruction, within a preset time period, the dual filter switch of the test equipment is controlled to switch the filters according to a preset time interval;
[0130] Record the switching times of the dual filter switch.
[0131] Optionally, the equipment testing device is also used to:
[0132] Performing filtering processing on the first audio signal to obtain a third audio signal;
[0133] Binarizing the third audio signal to obtain a binary audio signal;
[0134] Optionally, the first audio detection module 30 is further configured to:
[0135] Perform audio detection on binary audio signals to test the functional status of the dual filter switcher and microphone.
[0136] Optionally, the first audio detection module 30 is further configured to:
[0137] Performing audio detection on the binary audio signal to determine the number of filter switching audios collected in the binary audio signal;
[0138] Compare the number of times the filter switches audio and the number of switching times;
[0139] If the difference between the number of times the filter switches the audio and the number of switching times is less than a preset threshold, it is determined that the functional status of the dual filter switch and the microphone is normal.
[0140] Optionally, the first audio detection module 30 is further configured to:
[0141] Obtain the length of each continuous zero sequence in the binary audio signal;
[0142] The number of target continuous zero sequences whose lengths are within a preset interval in each continuous zero sequence is counted, and the number is determined as the number of filter switching audios collected in the binary audio signal.
[0143] Optionally, the equipment testing device is also used to:
[0144] When the functional status of the dual filter switch and the microphone is abnormal, the first abnormal prompt information is output.
[0145] Optionally, the equipment testing device is also used to:
[0146] When the speaker is in normal function state, the output test is successful prompt message;
[0147] When the functional state of the speaker is an abnormal state, a second abnormal prompt information is output.
[0148] The device testing device provided in the embodiment of the present application adopts the device testing method in the above embodiment, which can solve the technical problem of how to efficiently and accurately test the device with integrated video and audio input and output functions. Compared with the prior art, the beneficial effects of the device testing device provided in the embodiment of the present application are the same as the beneficial effects of the device testing method provided in the above embodiment, and the other technical features in the device testing device are the same as the features disclosed in the device testing method in the above embodiment, which will not be repeated here.
[0149] An embodiment of the present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the device testing method in the above-mentioned embodiment 1.
[0150] Reference below Figure 6, which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0151] like Figure 6 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0152] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0153] The electronic device provided in the embodiment of the present application adopts the device testing method in the above embodiment to solve the technical problem of how to efficiently and accurately test the device integrated with the video and audio input and output functions. Compared with the prior art, the beneficial effects of the electronic device provided in the embodiment of the present application are the same as the beneficial effects of the device testing method provided in the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the device testing method in the previous embodiment, which will not be described in detail here.
[0154] It should be understood that the various parts disclosed in the embodiments of the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0155] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0156] An embodiment of the present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the device testing method in the above embodiment.
[0157] The computer-readable storage medium provided in the embodiment of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0158] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0159] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: controls the dual filter switch of the test device to switch filters; controls the microphone of the test device to collect a first audio signal during the first process of the dual filter switch switching filters; performs audio detection on the first audio signal to test the functional status of the dual filter switch and the microphone; when the functional status of the dual filter switch and the microphone is normal, controls the speaker of the test device to play the first audio signal, and controls the microphone to collect the second audio signal during the second process of the speaker playing the first audio signal; performs audio detection on the second audio signal to test the functional status of the speaker.
[0160] The computer program code for performing the operation of the embodiment of the present application can be written in one or more programming languages or a combination thereof, and the above-mentioned programming languages include object-oriented programming languages, such as Java, Smalltalk, C++, and also include conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN: Local Area Network) or a wide area network (WAN: Wide Area Network), or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0161] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0162] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0163] The readable storage medium provided in the embodiment of the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned device testing method, and can solve the technical problem of how to efficiently and accurately test devices with integrated video and audio input and output functions. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiment of the present application are the same as the beneficial effects of the device testing method provided in the above-mentioned embodiment, and will not be repeated here.
[0164] The above are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A device testing method, characterized in that: The method includes: Control the dual filter switch of the test equipment to switch filters; Control the microphone of the test device to collect a first audio signal during a first process of filter switching by the dual filter switch; Performing audio detection on the first audio signal to test the functional status of the dual filter switch and the microphone; When the functional states of the dual filter switch and the microphone are in normal states, controlling the speaker of the test device to play the first audio signal, and controlling the microphone to collect the second audio signal during the second process in which the speaker plays the first audio signal; Performing audio detection on the second audio signal to test the functional status of the speaker.
2. The method according to claim 1, characterized in that The step of controlling the dual filter switch of the test equipment to switch filters comprises: After receiving the test instruction, within a preset time period, the dual filter switch of the test equipment is controlled to switch the filters according to a preset time interval; The switching times of the dual filter switch are recorded.
3. The method according to claim 2, characterized in that After the step of controlling the microphone of the test device to collect the first audio signal during the first process of the dual filter switch performing filter switching, the step further includes: Performing filtering on the first audio signal to obtain a third audio signal; Binarizing the third audio signal to obtain a binary audio signal; The step of performing audio detection on the first audio signal to test the functional status of the dual filter switch and the microphone comprises: Audio detection is performed on the binary audio signal to test the functional status of the dual filter switch and the microphone.
4. The method according to claim 3, characterized in that The step of performing audio detection on the binary audio signal to test the functional status of the dual filter switch and the microphone includes: Performing audio detection on the binary audio signal to determine the number of filter switching audios collected from the binary audio signal; Compare the number of times the filter switches the audio frequency with the number of switching times; If the difference between the number of times the filter switches the audio and the number of switches is less than a preset threshold, it is determined that the functional status of the dual filter switch and the microphone is normal.
5. The method according to claim 4, characterized in that The step of performing audio detection on the binary audio signal to determine the number of filter switching audios collected in the binary audio signal includes: Obtaining the length of each continuous zero sequence in the binary audio signal; The number of target continuous zero sequences whose lengths are within a preset interval in each of the continuous zero sequences is counted, and the number is determined as the number of filter switching audios collected in the binary audio signal.
6. The method according to claim 1, characterized in that After the step of performing audio detection on the first audio signal to test the functional status of the dual filter switch and the microphone, the step further includes: When the functional status of the dual filter switch and the microphone is abnormal, a first abnormal prompt information is output.
7. The method according to claim 1, characterized in that After the step of performing audio detection on the second audio signal to test the functional status of the speaker, the method further comprises: When the functional state of the speaker is normal, outputting a prompt message indicating that the test is successful; When the functional state of the speaker is an abnormal state, second abnormal prompt information is output.
8. A device testing apparatus, characterized in that: The device comprises: A filter switching module is used to control the dual filter switch of the test equipment to switch filters; A first audio acquisition module, used for controlling the microphone of the test device to acquire a first audio signal during a first process of filter switching by the dual filter switch; a first audio detection module, configured to perform audio detection on the first audio signal to test the functional status of the dual filter switch and the microphone; A second audio acquisition module, configured to control the speaker of the test device to play the first audio signal when the functional states of the dual filter switch and the microphone are in a normal state, and to control the microphone to collect a second audio signal during a second process in which the speaker plays the first audio signal; The second audio detection module is used to perform audio detection on the second audio signal to test the functional status of the speaker.
9. An electronic device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
