Earphone detection method and device, computer equipment and storage medium
In the headphone detection method, the frequency response curve is generated by collecting signals from the microphone and the artificial ear, and the speaker status is determined based on historical data, which solves the problem of inconsistent manual detection standards and improves the accuracy and efficiency of detection.
Patent Information
- Application Number
- CN202310466894.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-20
- Publication Date
- 2024-10-22
AI Technical Summary
Existing headphone detection methods rely on manual listening, resulting in inconsistent detection standards and vulnerability to human factors, resulting in low detection accuracy and efficiency.
The first signal is collected through the microphone of the headset and the second signal is collected by the artificial ear, the first and second frequency response curves are generated, and compared with the preset frequency response curve to determine whether the speaker is abnormal, and the historical frequency response curve and the The degree of coincidence determines the functional status of the loudspeaker.
It improves the accuracy and efficiency of headphone detection, reduces false detection and missed detection, and ensures the reliability and consistency of speaker detection.
Smart Images

Figure CN118828331A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of earphone technology, and in particular to an earphone detection method, device, computer equipment and storage medium. Background Art
[0002] During the inspection of headphones, manual listening is usually used to inspect the headphones. However, due to differences in the hearing of inspectors, different standards for inspecting the speakers of the headphones are used, making it difficult to ensure the quality of the headphones. The headphones are also easily affected by human factors, resulting in false detection and missed detection, resulting in low accuracy and efficiency in headphone inspection. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a headphone detection method, apparatus, computer device and storage medium to solve the problem of low headphone detection efficiency.
[0004] In order to solve the above technical problems, the embodiment of the present application provides a headset detection method, which adopts the following technical solution:
[0005] A method for detecting an earphone comprises the following steps:
[0006] In response to the detection instruction, control the speaker of the headset to play the detection audio, and obtain the first signal collected by the microphone of the headset and the second signal collected by the artificial ear;
[0007] generating a first frequency response curve according to the first signal, and generating a second frequency response curve according to the second signal;
[0008] Generate a target frequency response curve according to the first frequency response curve and the second frequency response curve;
[0009] The target frequency response curve is compared with a preset frequency response curve to determine whether the speaker of the headset is abnormal.
[0010] Furthermore, the preset frequency response curve includes an upper limit frequency response curve and a lower limit frequency response curve; and the step of comparing the target frequency response curve with the preset frequency response curve to determine whether the speaker of the headset is abnormal includes:
[0011] Determine whether the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve to obtain a determination result;
[0012] Determine whether the speaker of the headset is abnormal according to the judgment result.
[0013] Further, the step of determining whether the speaker of the headset is abnormal according to the judgment result includes:
[0014] Get historical frequency response curve;
[0015] Whether the speaker of the headset is abnormal is determined according to the judgment result and the degree of overlap between the historical frequency response curve and the target frequency response curve.
[0016] Furthermore, the step of determining whether the speaker of the headset is abnormal according to the judgment result and the degree of overlap between the historical frequency response curve and the target frequency response curve includes:
[0017] If the judgment result is that the target frequency response curve does not exceed the upper limit frequency response curve and / or the lower limit frequency response curve, and the degree of overlap between the historical frequency response curve and the target frequency response curve is a first degree of overlap, it is determined that the function of the speaker of the headset is normal;
[0018] If the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve, and the degree of overlap between the historical frequency response curve and the target frequency response curve is a second degree of overlap, it is determined that the function of the speaker of the headset is abnormal; wherein the second degree of overlap is less than the first degree of overlap;
[0019] If the judgment result is that the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve, or the degree of overlap between the historical frequency response curve and the target frequency response curve is a second degree of overlap, first difference information between the target frequency response curve and the historical frequency response curve is obtained, and whether the speaker of the headset is abnormal is determined according to the first difference information.
[0020] Further, the step of determining whether the speaker of the headset is abnormal according to the first difference information includes:
[0021] Extracting a first frequency response difference value from the first difference information; wherein the first difference information includes at least one first frequency response difference value, and the first frequency response difference value is the difference between the frequency response values of the historical frequency response curve and the target frequency response curve at the same frequency point;
[0022] If the first frequency response difference is less than a first preset threshold, it is determined that the speaker of the headset functions normally;
[0023] If the first frequency response difference is greater than or equal to a first preset threshold, it is determined that the function of the speaker of the headset is abnormal.
[0024] Furthermore, after the step of determining whether the speaker of the headset is abnormal, the method further includes:
[0025] If the speaker of the headset is abnormal, the cause of the abnormality of the speaker of the headset is determined according to second difference information between the target frequency response curve and the preset frequency response curve.
[0026] Furthermore, the target frequency response curve includes at least two frequency bands, each of which includes at least one frequency point; and the step of determining the cause of the abnormality of the speaker of the headset according to the second difference information between the target frequency response curve and the preset frequency response curve includes:
[0027] Acquire second difference information between the target frequency response curve and the preset frequency response curve; wherein the second difference information includes at least one second frequency response difference value, and the second frequency response difference value is the difference between the frequency response values of the target frequency response curve and the preset frequency response curve at the same frequency point;
[0028] Obtaining the frequency band to which the frequency point corresponding to each of the second frequency response differences belongs;
[0029] If each frequency band in the target frequency response curve has a corresponding second frequency response difference, it is determined that the abnormality of the speaker of the earphone is caused by sealing;
[0030] If some of the frequency bands in the target frequency response curve have corresponding second frequency response differences, it is determined that the abnormality of the speaker of the earphone is caused by shell conduction.
[0031] In order to solve the above technical problems, the embodiment of the present application further provides an earphone detection device, which adopts the following technical solution:
[0032] An earphone detection device, comprising:
[0033] An acquisition module, used to respond to the detection instruction, control the speaker of the headset to play the detection audio, and acquire the first signal collected by the microphone of the headset and the second signal collected by the artificial ear;
[0034] A first generating module, configured to generate a first frequency response curve according to the first signal, and to generate a second frequency response curve according to the second signal;
[0035] A second generating module, configured to generate a target frequency response curve according to the first frequency response curve and the second frequency response curve;
[0036] The first determination module is used to compare the target frequency response curve with a preset frequency response curve to determine whether the speaker of the headset is abnormal.
[0037] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0038] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the above-mentioned earphone detection method when executing the computer-readable instructions.
[0039] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0040] A computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the earphone detection method described above are implemented.
[0041] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: in the present application, a first signal collected by a microphone of the headset and a second signal collected by an artificial ear, and a first frequency response curve generated by the first signal and a second frequency response curve generated by the second signal are compared with a preset frequency response curve to determine whether the speaker of the headset is abnormal; in this way, the accuracy of headset detection is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0044] Figure 2 It is a structural schematic diagram of an embodiment of a detection device for earphones of the present application;
[0045] Figure 3 is a flow chart of an embodiment of a headphone detection method according to the present application;
[0046] Figure 4 is a structural schematic diagram of an embodiment of an earphone detection device according to the present application;
[0047] Figure 5 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0049] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0050] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0051] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0052] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0053] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0054] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0055] It should be noted that the earphone detection method provided in the embodiment of the present application is generally executed by a server / terminal device; accordingly, the earphone detection device is generally arranged in the server / terminal device.
[0056] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0057] Continue to refer Figure 2 In a specific application scenario, the detection device for detecting the earphone 240 of the present application includes a muffler box 210, a loading platform 220 and an artificial ear 230. The muffler box 210 is used to isolate external sounds, so that the earphone 240 can be detected in a muffled environment to ensure the detection accuracy of the earphone 240; the loading platform 220 is arranged in the muffler box 210, and the loading platform 220 is used to carry the earphone 240 to be detected, and the artificial ear 230 is arranged in the muffler box 210. Correspondingly, the earphone 240 and the artificial ear 230 are both electrically connected to the server / terminal device; in actual application, the speaker of the earphone 240 is controlled by the server / terminal device to play the detection audio, and the microphone of the earphone 240 collects the detection audio to obtain a first signal, and the artificial ear 230 collects the detection audio to obtain a second signal, and then the collected first signal and second signal are sent to the server / terminal device for processing.
[0058] Continue to refer Figure 3 , shows a flow chart of an embodiment of a headphone detection method according to the present application. The headphone detection method comprises the following steps:
[0059] Step S310, in response to the detection instruction, controlling the speaker of the headset to play the detection audio, and obtaining a first signal collected by the microphone of the headset and a second signal collected by the artificial ear.
[0060] In this step, the above detection instruction may be generated after manual operation, or may be automatically generated by the above detection equipment.
[0061] For example, the operator generates the above detection instruction by operating the control button set on the server / terminal device / detection device; wherein the above control button includes but is not limited to virtual buttons, physical buttons, etc. For another example, the above detection device also includes a plurality of detection parts, which are used to detect whether the loading platform is located at the detection station, whether the silencer is in a closed state, whether there is an earphone on the loading platform at the detection station, etc.; when the loading platform is located at the detection station, the silencer is in a closed state, and the loading platform at the detection station has an earphone, the above detection instruction is generated. wherein the above detection parts include but are not limited to distance sensors, visual detection devices, etc.
[0062] In this step, the artificial ear is used as a standard end and is pre-debugged by an operator so that the second signal collected by the artificial ear can be used as a standard signal for comparison with the first signal collected by the earphone to determine whether the speaker of the earphone is abnormal.
[0063] Furthermore, the earphone detection method is executed on the electronic device (eg Figure 1 The server / terminal device shown in the figure) can obtain the first signal collected by the microphone of the headset and the second signal collected by the artificial ear through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0064] Step S320: generating a first frequency response curve according to the first signal, and generating a second frequency response curve according to the second signal.
[0065] In this step, the first signal and the second signal can be independently transformed by Fourier transform or Fast Fourier Transformation (FFT) on the first signal to generate a first frequency response curve corresponding to the first signal and a second frequency response curve corresponding to the second signal.
[0066] Step S330: generating a target frequency response curve according to the first frequency response curve and the second frequency response curve.
[0067] In this step, the first frequency response curve and the second frequency response curve both include multiple frequency points and a frequency response value corresponding to each frequency point. By calculating the difference between the frequency response value of the first frequency response curve and the frequency response value of the second frequency response curve at each same frequency point, a target frequency response curve is generated by fitting according to each frequency point and the difference between the frequency response values corresponding to each frequency point.
[0068] Furthermore, the target frequency response curve includes multiple frequency bands, each frequency band corresponds to at least one frequency point, and each frequency point corresponds to a frequency response value; the target frequency response curve is generated by fitting each frequency point and its corresponding frequency response value.
[0069] For example, the target frequency response curve includes three frequency bands, which are 50 Hz to 300 Hz, 301 Hz to 2000 Hz, and 2001 Hz to 7500 Hz, respectively; wherein, the frequency points corresponding to 50 Hz to 300 Hz are 50 Hz, 51 Hz, ..., 300 Hz, the frequency points corresponding to 301 Hz to 2000 Hz are 301 Hz, 302 Hz, ..., 2000 Hz, and the frequency points corresponding to 2001 Hz to 7500 Hz are 2001 Hz, 2002 Hz, ..., 7500 Hz.
[0070] Step S340: Compare the target frequency response curve with the preset frequency response curve to determine whether the speaker of the headset is abnormal.
[0071] In this step, the preset frequency response curve is pre-set by the operator or the system when it leaves the factory to limit the range of the frequency response value corresponding to each frequency point in the target frequency response curve, so as to determine whether the speaker of the earphone is abnormal according to whether the frequency response value corresponding to each frequency point exceeds the range set by the preset frequency response curve; in this way, the accuracy of the earphone detection is ensured, and compared with the traditional manual detection, the efficiency of the earphone detection is effectively improved.
[0072] In some embodiments, the preset frequency response curve includes an upper limit frequency response curve and a lower limit frequency response curve; in the above step S340, the step of comparing the target frequency response curve with the preset frequency response curve to determine whether the speaker of the headset is abnormal includes:
[0073] Step S341, determining whether the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve, and obtaining a determination result.
[0074] In this step, the upper limit frequency response curve includes the upper limit value of the frequency response value of each frequency point in the target frequency response curve; the lower limit frequency response curve includes the lower limit value of the frequency response value of each frequency point in the target frequency response curve.
[0075] In practical applications, the frequency response value corresponding to each frequency point in the target frequency response curve is judged by using the limit range formed by the upper limit value and the lower limit value to obtain the judgment result. For example, at the same frequency point, the frequency response value corresponding to the frequency point in the target frequency response curve is compared with the upper limit value and the lower limit value to determine whether the frequency response value corresponding to the frequency point in the target frequency response curve exceeds the upper limit value or the lower limit value; and so on, the frequency response value corresponding to each frequency point in the target frequency response curve is judged to obtain the judgment result.
[0076] Step S342: Determine whether the speaker of the headset is abnormal according to the judgment result.
[0077] In this step, the above judgment result includes a comparison result of the frequency response value corresponding to the target frequency response curve and the frequency response value corresponding to the preset frequency response curve at each same frequency point, and the comparison result is used to determine the playback effect of the speaker of the headset at different frequency points / frequency bands, and then determine whether the speaker function of the headset is abnormal.
[0078] In some embodiments, in the above step S342, the step of determining whether the speaker of the headset is abnormal according to the judgment result includes:
[0079] Step S3421, obtaining a historical frequency response curve.
[0080] In this step, during each detection process, if it is finally determined according to the target frequency response curve that the speaker function of the earphone is normal, the target frequency response curve of this time is stored to obtain a historical frequency response curve.
[0081] Furthermore, when storing the target frequency response curve, the old target frequency response curve in the database may be deleted and the new target frequency response curve may be stored to reduce the storage space occupied by the database; or the target frequency response curves may be stored in the database in sequence according to the storage time of each target frequency response curve, so as to facilitate the tracing and sorting of the target frequency response curves obtained in each detection.
[0082] Step S3422: Determine whether the speaker of the headset is abnormal according to the judgment result and the degree of overlap between the historical frequency response curve and the target frequency response curve.
[0083] In this step, the judgment result is used to determine whether the target frequency response curve of the speaker of the headset exceeds the upper limit frequency response curve and / or the lower limit frequency response curve. At the same time, the overlap degree between the historical frequency response curve and the target frequency response curve is combined to determine whether the speaker of the headset is abnormal, thereby achieving multi-dimensional determination of whether the speaker of the headset is abnormal, so as to avoid false detection and misdetection, further improve the accuracy of headset detection, and enhance the user's headset usage experience.
[0084] In some embodiments, in the above step S3422, the step of determining whether the speaker of the headset is abnormal according to the judgment result and the degree of overlap between the historical frequency response curve and the target frequency response curve includes:
[0085] Step S3422a: if the judgment result is that the target frequency response curve does not exceed the upper limit frequency response curve and / or the lower limit frequency response curve, and the degree of overlap between the historical frequency response curve and the target frequency response curve is a first degree of overlap, it is determined that the function of the speaker of the headset is normal.
[0086] In this step, if the target frequency response curve does not exceed the upper frequency response curve and / or the lower frequency response curve, it is characterized by that at each same frequency point, the frequency response value corresponding to the target frequency response curve is between the upper limit value corresponding to the upper frequency response curve and the lower limit value corresponding to the lower frequency response curve, and it can be preliminarily determined that the function of the speaker of the headset is normal; at the same time, if the degree of overlap between the historical frequency response curve and the target frequency response curve is the first degree of overlap, it is characterized by a high degree of overlap between the historical frequency response curve and the target frequency response curve, and it can be further determined that the function of the speaker of the headset is normal. In this way, judging in combination with the judgment result and the degree of overlap can effectively improve the accuracy of headset detection, so as to ensure the integrity of the function of the headset in actual use and improve the user experience.
[0087] Step S3422b: If the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve, and the degree of overlap between the historical frequency response curve and the target frequency response curve is a second degree of overlap, it is determined that the function of the speaker of the headset is abnormal; wherein the second degree of overlap is less than the first degree of overlap.
[0088] In this step, if the target frequency response curve exceeds the upper frequency response curve and / or the lower frequency response curve, it is characterized that at each same frequency point, the frequency response value corresponding to the target frequency response curve is greater than the upper limit value corresponding to the upper frequency response curve, or less than the lower limit value corresponding to the lower frequency response curve, and it can be preliminarily determined that the function of the speaker of the headset is abnormal; at the same time, if the degree of overlap between the historical frequency response curve and the target frequency response curve is the second degree of overlap, it is characterized that the degree of overlap between the historical frequency response curve and the target frequency response curve is low, and it can be further determined that the function of the speaker of the headset is abnormal. Based on this, the judgment is made in combination with the judgment result and the degree of overlap to avoid the phenomenon of false detection and misdetection.
[0089] Step S3422c: if the judgment result is that the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve, or the degree of overlap between the historical frequency response curve and the target frequency response curve is a second degree of overlap, first difference information between the target frequency response curve and the historical frequency response curve is obtained, and whether the speaker of the headset is abnormal is determined according to the first difference information.
[0090] In this step, if "the judgment result is that the target frequency response curve does not exceed the upper limit frequency response curve and / or the lower limit frequency response curve, and the degree of overlap between the historical frequency response curve and the target frequency response curve is the second degree of overlap", or "the judgment result is that the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve, and the degree of overlap between the historical frequency response curve and the target frequency response curve is the first degree of overlap", it is determined that the judgment result and the degree of overlap conflict, and further judgment is required on the speaker function of the headset to ensure the accuracy of the detection result.
[0091] Further, in the above steps S3422a, S3422b, and S3422c, in determining the degree of overlap between the historical frequency response curve and the target frequency response curve, a third frequency response difference is obtained by calculating the difference between the frequency response value corresponding to the historical frequency response curve and the frequency response value corresponding to the target frequency response curve at each identical frequency point, and the third frequency response difference corresponding to each frequency point is compared with the second preset threshold value respectively; if the number of frequency points at which the third frequency response difference satisfies the second preset threshold value is the first preset number, then the degree of overlap between the historical frequency response curve and the target frequency response curve is determined to be the first degree of overlap; conversely, if the number of frequency points at which the third frequency response difference satisfies the second preset threshold value is the second preset number, then the degree of overlap between the historical frequency response curve and the target frequency response curve is determined to be the second degree of overlap.
[0092] For example, if the number of frequency points whose third frequency response difference is greater than the second preset threshold is the first preset number of 10, it is determined that the degree of overlap between the historical frequency response curve and the target frequency response curve is a first high degree of overlap; if the number of frequency points whose third frequency response difference is greater than the second preset threshold is the second preset number of 30, it is determined that the degree of overlap between the historical frequency response curve and the target frequency response curve is a second low degree of overlap.
[0093] Furthermore, in the above steps S3422a, S3422b, and S3422c, the sizes of the first overlap and the second overlap can be determined based on preliminary experiments to set a first preset number corresponding to the first overlap and a second preset number corresponding to the second overlap.
[0094] Furthermore, different values corresponding to the first overlap and the second overlap can be set according to different earphone models, so as to perform targeted detection on earphones of different models to ensure the accuracy of earphone detection, improve the efficiency of earphone detection, and reduce the phenomenon of false detection and missed detection.
[0095] In some embodiments, in the above step S3422c, the step of processing the judgment result according to the first difference information includes:
[0096] Step S3422c1: extracting a first frequency response difference from the first difference information.
[0097] In this step, the first difference information includes at least one first frequency response difference value, and the first frequency response difference value is the difference between the frequency response values of the historical frequency response curve and the target frequency response curve at the same frequency point.
[0098] Furthermore, at the same frequency point, a first frequency response difference is obtained by calculating a difference between a frequency response value corresponding to the frequency point in the target frequency response curve and a frequency response value corresponding to the frequency point in the historical frequency response curve; and the first frequency response difference corresponding to each frequency point is calculated in this way, and each first frequency response difference is merged to obtain first difference information.
[0099] Step S3422c2: if the first frequency response difference is less than a first preset threshold, it is determined that the function of the speaker of the headset is normal.
[0100] In this step, if the first frequency response difference is less than the first preset threshold, it is characterized that at this frequency point, the difference between the frequency response value of the target frequency response curve and the frequency response value of the historical frequency response curve is small, that is, the speaker of the headset has little impact on the user's use experience in actual application. Therefore, the difference between the frequency response value of the target frequency response curve and the frequency response value of the historical frequency response curve can be ignored, and it is determined that the function of the speaker of the headset is normal; in this way, the number of times the headset is reworked can be reduced, the detection efficiency of the headset can be improved, and the user's use experience is also guaranteed.
[0101] Furthermore, when the first difference information includes a plurality of first frequency response difference values, when each frequency response difference is smaller than a first preset threshold, it is determined that the function of the speaker of the headset is normal.
[0102] Step S3422c3: if the first frequency response difference is greater than or equal to a first preset threshold, it is determined that the function of the speaker of the headset is abnormal.
[0103] In this step, if the first frequency response difference is greater than or equal to the first preset threshold, it is characterized by a large difference between the frequency response value of the target frequency response curve and the frequency response value of the historical frequency response curve at this frequency point, that is, the speaker of the headset has a large impact on the user's usage experience in actual application, and it is determined that the function of the speaker of the headset is abnormal.
[0104] Furthermore, in the above-mentioned step S3422c2 and step S3422c3, different first preset thresholds may be set in advance for different frequency bands to further ensure the accuracy of the comparison between the first frequency response difference and the first preset threshold; specifically, by obtaining the frequency point corresponding to each first frequency response difference and obtaining the frequency band to which the frequency point belongs, the corresponding first preset threshold is determined according to the frequency band.
[0105] In some embodiments, after the step S340 of determining whether the speaker of the headset is abnormal, the method further includes:
[0106] Step S350: If the speaker of the headset is abnormal, determine the cause of the abnormality of the speaker of the headset according to the second difference information between the target frequency response curve and the preset frequency response curve.
[0107] In this step, the cause of the abnormality of the speaker of the headset is determined by the second difference information between the target frequency response curve and the preset frequency response curve, so that the operator can perform targeted repairs on the speaker of the headset according to the cause of the abnormality to improve the repair efficiency and further improve the headset detection efficiency.
[0108] In some embodiments, the target frequency response curve includes at least two frequency bands, each of which includes at least one frequency point; in the above step S350, the step of determining the cause of the abnormality of the speaker of the headset according to the second difference information between the target frequency response curve and the preset frequency response curve includes:
[0109] Step S351, obtaining second difference information between the target frequency response curve and the preset frequency response curve; wherein the second difference information includes at least one second frequency response difference value, and the second frequency response difference value is the difference between the frequency response values of the target frequency response curve and the preset frequency response curve at the same frequency point.
[0110] In this step, at the same frequency point, the second frequency response difference is obtained by calculating the difference between the frequency response value corresponding to the frequency point in the target frequency response curve and the frequency response value corresponding to the frequency point in the preset frequency response curve; and the second frequency response difference corresponding to each frequency point is calculated in this way, and the second frequency response difference values are merged to obtain the second difference information.
[0111] Step S352: Obtain the frequency band to which the frequency point corresponding to each of the second frequency response differences belongs.
[0112] In this step, the target frequency response curve includes at least two frequency bands, and each frequency band includes at least one frequency point; thus, the frequency point corresponding to the second frequency response difference can be determined according to the second frequency response difference, and the frequency band to which the frequency point belongs can be determined according to the frequency point.
[0113] Step S353a: If each frequency band in the target frequency response curve has a corresponding second frequency response difference, it is determined that the abnormality of the speaker of the earphone is caused by sealing.
[0114] Step S353b: If some of the frequency bands in the target frequency response curve have corresponding second frequency response differences, it is determined that the abnormality of the speaker of the earphone is caused by shell conduction.
[0115] In step S353a and step S353b, after determining the frequency band corresponding to each second frequency response difference, if each frequency band in the target frequency response curve has a corresponding second frequency response difference, it is determined that the cause of the abnormality is the sealing of the earphone shell; if only some frequency bands in the target frequency response curve have corresponding second frequency response differences, it is determined that the cause of the abnormality is the shell conduction; at this time, the cause of the abnormality of the current earphone can be displayed so that the operator can repair the earphone according to the cause of the abnormality and re-test it after the repair, thereby effectively improving the detection accuracy and efficiency.
[0116] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0117] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0119] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0120] Further references Figure 4 , as a response to the above Figure 2 In order to realize the method shown in the figure, the present application provides an embodiment of a headset detection device, and the device embodiment is Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0121] like Figure 4 As shown, the earphone detection device 400 described in this embodiment includes: an acquisition module 401, an identification module 402, a calculation module 403, a training module 404 and a processing module 405. Among them:
[0122] An acquisition module 401 is used to respond to a detection instruction, control a speaker of the headset to play a detection audio, and acquire a first signal collected by a microphone of the headset and a second signal collected by an artificial ear;
[0123] A first generating module 402, configured to generate a first frequency response curve according to the first signal, and to generate a second frequency response curve according to the second signal;
[0124] A second generating module 403, configured to generate a target frequency response curve according to the first frequency response curve and the second frequency response curve;
[0125] The first determination module 404 is used to compare the target frequency response curve with a preset frequency response curve to determine whether the speaker of the headset is abnormal.
[0126] In the present application, a first signal collected by a microphone of the headset and a second signal collected by an artificial ear, and a first frequency response curve generated by the first signal and a second frequency response curve generated by the second signal are compared with a preset frequency response curve to determine whether the speaker of the headset is abnormal; in this way, the accuracy of headset detection is guaranteed, and compared with traditional manual detection, the efficiency of headset detection is effectively improved.
[0127] In some embodiments, the preset frequency response curve includes an upper limit frequency response curve and a lower limit frequency response curve; the first determination module 404 includes a judgment submodule and a first determination submodule.
[0128] A judgment submodule, used to judge whether the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve, and obtain a judgment result;
[0129] The first determination submodule is used to determine whether the speaker of the headset is abnormal according to the judgment result.
[0130] In some embodiments, the first determination submodule includes an acquisition unit and a first determination unit.
[0131] An acquisition unit, used for acquiring a historical frequency response curve;
[0132] The first determining unit is used to determine whether the speaker of the headset is abnormal according to the judgment result and the overlap degree between the historical frequency response curve and the target frequency response curve.
[0133] In some embodiments, the first determining subunit includes a first determining subunit, a second determining subunit, and a third determining subunit.
[0134] a first determining subunit, configured to determine that the function of the speaker of the headset is normal if the judgment result is that the target frequency response curve does not exceed the upper limit frequency response curve and / or the lower limit frequency response curve, and the degree of overlap between the historical frequency response curve and the target frequency response curve is a first degree of overlap;
[0135] A second determination subunit is configured to determine that the function of the speaker of the headset is abnormal if the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve, and the degree of overlap between the historical frequency response curve and the target frequency response curve is a second overlap; wherein the second overlap is less than the first overlap;
[0136] The third determination subunit is used to obtain first difference information between the target frequency response curve and the historical frequency response curve if the judgment result is that the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve, or the degree of overlap between the historical frequency response curve and the target frequency response curve is a second degree of overlap, and determine whether the speaker of the headset is abnormal according to the first difference information.
[0137] In some embodiments, the third determination subunit is further configured to extract a first frequency response difference from the first difference information; wherein the first difference information includes at least one first frequency response difference, and the first frequency response difference is a difference between frequency response values of the historical frequency response curve and the target frequency response curve at the same frequency point; if the first frequency response difference is less than a first preset threshold, it is determined that the function of the speaker of the headset is normal; if the first frequency response difference is greater than or equal to the first preset threshold, it is determined that the function of the speaker of the headset is abnormal.
[0138] In some embodiments, the earphone detection device 400 further includes a second determination module.
[0139] in:
[0140] The second determination module is configured to determine the cause of the abnormality of the speaker of the headset according to second difference information between the target frequency response curve and the preset frequency response curve if the speaker of the headset is abnormal.
[0141] In some embodiments, the target frequency response curve includes at least two frequency bands, each of which includes at least one frequency point; the second determination module includes a first acquisition submodule, a second acquisition submodule, a second determination submodule, and a third determination submodule.
[0142] A first acquisition submodule is used to acquire second difference information between the target frequency response curve and the preset frequency response curve; wherein the second difference information includes at least one second frequency response difference value, and the second frequency response difference value is the difference between the frequency response values of the target frequency response curve and the preset frequency response curve at the same frequency point;
[0143] A second acquisition submodule, used to acquire the frequency band to which the frequency point corresponding to each of the second frequency response differences belongs;
[0144] a second determination submodule, configured to determine that the abnormality of the speaker of the earphone is caused by sealing if each of the frequency bands in the target frequency response curve has a corresponding second frequency response difference;
[0145] The third determination submodule is used to determine that the abnormality of the speaker of the earphone is caused by shell conduction if some of the frequency bands in the target frequency response curve have the corresponding second frequency response difference.
[0146] To solve the above technical problems, the present application also provides a computer device. Figure 5 , Figure 5 This is a basic structural block diagram of the computer device in this embodiment.
[0147] The computer device 5 includes a memory 51, a processor 52, and a network interface 53 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 5 with components 51-53, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0148] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0149] The memory 51 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 51 can be an internal storage unit of the computer device 5, such as a hard disk or memory of the computer device 5. In other embodiments, the memory 51 can also be an external storage device of the computer device 5, such as a plug-in hard disk equipped on the computer device 5, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 51 can also include both the internal storage unit of the computer device 5 and its external storage device. In this embodiment, the memory 51 is generally used to store the operating system and various application software installed on the computer device 5, such as computer-readable instructions of the headphone detection method, etc. In addition, the memory 51 can also be used to temporarily store various types of data that have been output or are to be output.
[0150] The processor 52 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 52 is generally used to control the overall operation of the computer device 5. In this embodiment, the processor 52 is used to run computer-readable instructions stored in the memory 51 or process data, such as computer-readable instructions for running the headphone detection method.
[0151] The network interface 53 may include a wireless network interface or a wired network interface. The network interface 53 is generally used to establish a communication connection between the computer device 5 and other electronic devices.
[0152] In the present application, a first signal collected by the microphone of the headset and a second signal collected by the artificial ear are used to generate a first frequency response curve and a second frequency response curve by the first signal, so as to compare the target frequency response curve generated by the first frequency response curve and the second frequency response curve with the preset frequency response curve to determine whether the speaker of the headset is abnormal; in this way, the accuracy of headset detection is ensured, and the efficiency of headset detection is effectively improved compared with traditional manual detection. The present application also provides another implementation method, namely, providing a computer-readable storage medium, the computer-readable storage medium storing computer-readable instructions, the computer-readable instructions being executable by at least one processor, so that the at least one processor executes the steps of the headset detection method as described above.
[0153] In the present application, a first signal collected by a microphone of the headset and a second signal collected by an artificial ear, and a first frequency response curve generated by the first signal and a second frequency response curve generated by the second signal are compared with a preset frequency response curve to determine whether the speaker of the headset is abnormal; in this way, the accuracy of headset detection is guaranteed, and compared with traditional manual detection, the efficiency of headset detection is effectively improved.
[0154] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0155] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A headphone detection method, characterized in that: The steps include: In response to the detection instruction, control the speaker of the headset to play the detection audio, and obtain the first signal collected by the microphone of the headset and the second signal collected by the artificial ear; generating a first frequency response curve according to the first signal, and generating a second frequency response curve according to the second signal; Generate a target frequency response curve according to the first frequency response curve and the second frequency response curve; The target frequency response curve is compared with a preset frequency response curve to determine whether the speaker of the headset is abnormal.
2. The earphone detection method according to claim 1, characterized in that: The preset frequency response curve includes an upper limit frequency response curve and a lower limit frequency response curve; the step of comparing the target frequency response curve with the preset frequency response curve to determine whether the speaker of the headset is abnormal includes: Determine whether the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve to obtain a determination result; Determine whether the speaker of the headset is abnormal according to the judgment result.
3. The earphone detection method according to claim 2, characterized in that: The step of determining whether the speaker of the earphone is abnormal according to the judgment result comprises: Get historical frequency response curve; Whether the speaker of the headset is abnormal is determined according to the judgment result and the degree of overlap between the historical frequency response curve and the target frequency response curve.
4. The earphone detection method according to claim 3, characterized in that: The step of determining whether the speaker of the headset is abnormal according to the judgment result and the degree of overlap between the historical frequency response curve and the target frequency response curve comprises: If the judgment result is that the target frequency response curve does not exceed the upper limit frequency response curve and / or the lower limit frequency response curve, and the degree of overlap between the historical frequency response curve and the target frequency response curve is a first degree of overlap, it is determined that the function of the speaker of the headset is normal; If the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve, and the degree of overlap between the historical frequency response curve and the target frequency response curve is a second degree of overlap, it is determined that the function of the speaker of the headset is abnormal; wherein the second degree of overlap is less than the first degree of overlap; If the judgment result is that the target frequency response curve exceeds the upper limit frequency response curve and / or the lower limit frequency response curve, or the degree of overlap between the historical frequency response curve and the target frequency response curve is a second degree of overlap, first difference information between the target frequency response curve and the historical frequency response curve is obtained, and whether the speaker of the headset is abnormal is determined according to the first difference information.
5. The earphone detection method according to claim 4, characterized in that: The step of determining whether the speaker of the headset is abnormal according to the first difference information comprises: Extracting a first frequency response difference value from the first difference information; wherein the first difference information includes at least one first frequency response difference value, and the first frequency response difference value is the difference between the frequency response values of the historical frequency response curve and the target frequency response curve at the same frequency point; If the first frequency response difference is less than a first preset threshold, it is determined that the speaker of the headset functions normally; If the first frequency response difference is greater than or equal to a first preset threshold, it is determined that the function of the speaker of the headset is abnormal.
6. The earphone detection method according to any one of claims 1 to 5, characterized in that: After the step of determining whether the speaker of the headset is abnormal, the method further includes: If the speaker of the headset is abnormal, the cause of the abnormality of the speaker of the headset is determined according to second difference information between the target frequency response curve and the preset frequency response curve.
7. The earphone detection method according to claim 6, characterized in that: The target frequency response curve includes at least two frequency bands, each of which includes at least one frequency point; and the step of determining the abnormal cause of the speaker of the headset according to the second difference information between the target frequency response curve and the preset frequency response curve includes: Acquire second difference information between the target frequency response curve and the preset frequency response curve; wherein the second difference information includes at least one second frequency response difference value, and the second frequency response difference value is the difference between the frequency response values of the target frequency response curve and the preset frequency response curve at the same frequency point; Obtaining the frequency band to which the frequency point corresponding to each of the second frequency response differences belongs; If each frequency band in the target frequency response curve has a corresponding second frequency response difference, it is determined that the abnormality of the speaker of the earphone is caused by sealing; If some of the frequency bands in the target frequency response curve have corresponding second frequency response differences, it is determined that the abnormality of the speaker of the earphone is caused by shell conduction.
8. An earphone detection device, characterized in that: include: An acquisition module, used to respond to the detection instruction, control the speaker of the headset to play the detection audio, and acquire the first signal collected by the microphone of the headset and the second signal collected by the artificial ear; A first generating module, configured to generate a first frequency response curve according to the first signal, and to generate a second frequency response curve according to the second signal; A second generating module, configured to generate a target frequency response curve according to the first frequency response curve and the second frequency response curve; The first determination module is used to compare the target frequency response curve with a preset frequency response curve to determine whether the speaker of the headset is abnormal.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the earphone detection method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the earphone detection method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Earphone quality detection method and system
CN121151784A
