WO2021134409A1 - Underwater detection method, device, and storage medium - Google Patents

Underwater detection method, device, and storage medium Download PDF

Info

Publication number
WO2021134409A1
WO2021134409A1 PCT/CN2019/130348 CN2019130348W WO2021134409A1 WO 2021134409 A1 WO2021134409 A1 WO 2021134409A1 CN 2019130348 W CN2019130348 W CN 2019130348W WO 2021134409 A1 WO2021134409 A1 WO 2021134409A1
Authority
WO
WIPO (PCT)
Prior art keywords
frequency domain
environment
sound signal
digital sound
electronic device
Prior art date
Application number
PCT/CN2019/130348
Other languages
French (fr)
Chinese (zh)
Inventor
边云锋
吴晟
赵文泉
莫品西
薛政
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2019/130348 priority Critical patent/WO2021134409A1/en
Publication of WO2021134409A1 publication Critical patent/WO2021134409A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Definitions

  • the embodiments of the present application relate to the technical field of electronic devices, and in particular, to a water ingress detection method, device, and storage medium.
  • the following methods are generally used to detect: one is to add additional devices to detect underwater scenes, such as adding pressure sensors, adding optical devices and optical water entry detection, adding thermistors and other thermodynamic water entry Detection etc. This method will increase the cost of electronic equipment.
  • the other is to perform scene detection based on existing devices using the physical laws of underwater scenes, such as detecting whether communication signals can be transmitted normally, but some communication signals (such as Bluetooth) can still be transmitted normally in shallow water, and the detection results will be biased.
  • the present application provides a method, equipment and storage medium for water ingress detection, which improves the accuracy of water ingress detection.
  • the present application provides a water entry detection method, which is applied to an electronic device, the electronic device is provided with a microphone, and the method includes:
  • the frequency domain characteristics it is determined whether the environment in which the electronic device is located is an underwater environment.
  • this application provides a control device, including: a microphone and a processor;
  • the microphone is used to collect environmental sound signals
  • the processor is configured as:
  • the frequency domain characteristics it is determined whether the environment in which the electronic device is located is an underwater environment.
  • the present application provides a storage medium, including: a readable storage medium and a computer program, the computer program being used to implement the water ingress detection method provided by any one of the above-mentioned embodiments of the first aspect.
  • the present application provides a program product.
  • the program product includes a computer program (that is, an execution instruction), and the computer program is stored in a readable storage medium.
  • the processor can read the computer program from a readable storage medium, and the processor executes the computer program to execute the water ingress detection method provided by any one of the embodiments of the first aspect described above.
  • This application provides a water entry detection method, equipment and storage medium, which extracts the frequency domain characteristics of the environmental sound signal according to the environmental sound signal of the environment in which the electronic device is located by the microphone; due to the environment that the microphone collects in the water environment and the underwater environment The frequency domain characteristics of the sound signal have obvious differences. Therefore, according to the frequency domain characteristics extracted from the environmental sound signal, it is determined whether the environment in which the electronic device is located is an underwater environment, and the accuracy rate is high.
  • Figure 1 is a scene diagram provided by an embodiment of the application
  • FIG. 2 is a flowchart of a water entry detection method provided by an embodiment of the application
  • FIG. 3 is a schematic block diagram of a water entry detection method provided by an embodiment of this application.
  • FIG. 4 is a flowchart of a water entry detection method provided by another embodiment of this application.
  • FIG. 5 is a flowchart of a water entry detection method provided by another embodiment of this application.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • FIG. 7 is a schematic structural diagram of an electronic device provided by another embodiment of the application.
  • the water entry detection method provided in the embodiments of the present application is applied to electronic equipment. It can detect whether the electronic equipment is in an underwater environment, and then control the electronic equipment to perform corresponding operations or adjust the electronic equipment according to the underwater environment in which the electronic equipment is located. Status or corresponding parameters, such as imaging parameters, etc.
  • the electronic device may be any electronic device capable of working underwater, for example, including wearable devices, camera equipment, underwater measuring equipment, etc., and wearable devices, for example, include smart bracelets, smart watches, smart glasses, and the like.
  • the electronic device is waterproof.
  • the following methods are generally used to detect: one is to add additional devices to detect underwater scenes, such as adding pressure sensors, adding optical devices and optical water entry detection, adding thermistors and other thermodynamic water entry Detection etc. This method will increase the cost of electronic equipment.
  • the other is to perform scene detection based on existing devices using the physical laws of underwater scenes, such as detecting whether communication signals can be transmitted normally, but some communication signals (such as Bluetooth) can still be transmitted normally in shallow water, and the detection results will be biased.
  • the water entry detection method of the embodiment of the present application uses the obvious difference in the frequency domain characteristics of the environmental sound signal collected by the microphone in the water and in the air (that is, the frequency domain characteristics of the environmental noise) to determine whether the environment in which the device is located is an underwater environment, Compared with the current underwater scene detection scheme, the microphones contained in most electronic devices can be reused, thereby reducing equipment design costs and hardware costs, easy implementation, and high accuracy of detection results.
  • the method in the embodiment of the present application may be executed by an electronic device, and the electronic device includes a microphone.
  • the electronic device includes a microphone.
  • it can be implemented by an electronic device such as a processor of the electronic device executing corresponding software code.
  • the methods of the embodiments of the present application may be executed by a device communicatively connected with the electronic device.
  • the method may be a control terminal that communicates with an electronic device.
  • the server is in communication connection with the electronic device, and the method of this application may be implemented by the server.
  • the method may be executed jointly by an electronic device and a device communicatively connected with the electronic device.
  • the electronic device may include an imaging component, where the imaging component is used to obtain image or video data.
  • Fig. 2 is a flowchart of a water entry detection method provided by an embodiment of the application. As shown in Figures 2 and 3, the method provided in this embodiment is applied to an electronic device that is provided with a microphone, and the method includes:
  • Step 101 According to the microphone collecting the environmental sound signal of the environment in which the electronic device is located, extract the frequency domain characteristics of the environmental sound signal.
  • the microphone collects the environmental sound signal of the environment in which the electronic device is located, and extracts the frequency domain characteristics of the environmental sound signal.
  • the environmental sound signal collected by the microphone may be sampled and processed to obtain a time-discrete digital sound signal, and then the digital sound signal may be subjected to frequency domain conversion processing, and frequency domain features may be extracted.
  • the frequency domain feature is extracted according to the amplitude of the signal after frequency domain conversion processing.
  • Step 102 Determine whether the environment in which the electronic device is located is an underwater environment according to the frequency domain characteristics.
  • the frequency domain characteristics of the environmental sound signals collected by the aquatic environment and the underwater environment are significantly different, it can be determined whether the environment in which the electronic device is located is an underwater environment according to the frequency domain characteristics of the environmental sound signal.
  • the frequency domain characteristics of the environmental sound signal may be compared with the frequency domain characteristics of the water environment and the frequency domain characteristics of the underwater environment, if the difference between the frequency domain characteristics of the underwater environment and the frequency domain characteristics of the underwater environment is less than that of The difference in the frequency domain characteristics of the aquatic environment can determine that the environment in which the electronic device is located is an underwater environment.
  • the frequency domain characteristics of the environmental sound signal can be input into a pre-trained machine learning model, and the output result of the model is the label of the environment type in which the electronic device is located, or
  • the machine learning model is established, for example, through a neural network model, a support vector machine classification algorithm model, and a clustering algorithm.
  • the neural network model is, for example, CNN, VGG, GoogleNet, etc.
  • this step can be implemented by a judgment function, for example, respectively judging the frequency domain feature and the frequency domain feature of the underwater environment obtained a priori, and the difference with the frequency domain feature of the water environment.
  • the electronic device may further include an imaging component, and the method further includes:
  • the imaging parameters of the imaging component are adjusted.
  • the imaging parameters include, for example, exposure time, exposure gain, and so on.
  • the imaging parameters can be adjusted to adapt to the scene of the underwater environment.
  • the method of this embodiment extracts the frequency domain characteristics of the environmental sound signal according to the environmental sound signal of the environment in which the electronic device is collected by the microphone; because the frequency domain characteristics of the environmental sound signal collected by the microphone in the water environment and the underwater environment are obvious Therefore, according to the frequency domain characteristics extracted from the environmental sound signal, it is determined whether the environment in which the electronic device is located is an underwater environment, and the accuracy rate is high.
  • step 101 can be implemented in the following manner:
  • Step 1011 Perform sampling processing on the environmental sound signal to obtain a group of digital sound signals of the current working cycle, where the group of digital sound signals includes at least one first digital sound signal subframe;
  • Step 1012 Perform frequency domain transformation on each first digital sound signal subframe to obtain a frequency domain amplitude spectrum of each first digital sound signal subframe;
  • Step 1013 Extract the frequency domain characteristic of the current working cycle according to the frequency domain amplitude spectrum of each second digital sound signal subframe, where the second digital sound signal subframe is the time domain characteristic amplitude in the first digital sound signal subframe The digital sound signal sub-frame whose value is less than the environmental noise judgment threshold.
  • the environmental sound signal is sampled, that is, the environmental sound signal is converted into a time-discrete digital signal to obtain a group of digital sound signals, where the group of digital sound signals includes at least one first digital sound signal subframe.
  • the time discrete digital signal is x(t), where t is the discrete time index, and the converted sampling rate is fs; each interval L (obtained according to the sampling rate fs) samples x(t) to form K frames with a length of N ,
  • x k (n) is the first digital sound signal subframe with a frame length of N, where each first digital sound signal subframe includes N elements.
  • n represents the working period of frequency domain feature extraction.
  • x(n,k,i) x(n ⁇ L-N+i-(k-1) ⁇ M)
  • x k (n) [x(n,k,i),x(n,k,i+1), whil,x(n,k,i+N-1)]
  • each first digital sound signal subframe such as Fourier transform, wavelet transform, etc.
  • frequency domain transformation on each first digital sound signal subframe, such as Fourier transform, wavelet transform, etc.
  • the Fourier transform uses, for example, a short-time windowed Fourier transform.
  • the temporal characteristic amplitude can be obtained, for example, by averaging the amplitude of each element of each first digital sound signal subframe, or can also be based on the median value of the amplitude of each element of the first digital sound signal subframe, Or the mode of the amplitude of each element of the first digital sound signal subframe, which is not limited in this application.
  • the absolute values of the elements x(n,k,i) in the K subframes x k (n) are respectively summed and then averaged to obtain the temporal characteristic amplitude of each subframe x k (n),
  • the following formula can be used to calculate the time domain characteristic amplitude:
  • the environmental noise judgment threshold may be obtained according to the temporal characteristic amplitudes of the K first digital sound signal subframes.
  • the frequency domain characteristic of the current working period is extracted.
  • a group of digital sound signals includes a plurality of first digital sound signal subframes
  • the average value of the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current working cycle
  • a group of digital sound signals includes a first digital sound signal subframe
  • the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current period.
  • Num(SegEng(k) n ⁇ Nthr n ) represents the number of second digital sound signal sub-frames whose time domain feature amplitude is less than the environmental noise judgment threshold, and frequency domain feature N n is a vector of length N.
  • frequency domain transformation is performed on the subframe x k (n) to obtain a frequency domain spectrum vector X( n);
  • X( n) the absolute value of X(n) as the frequency domain feature of the subframe x k (n)
  • the following formula can be used to calculate the frequency domain feature:
  • a group of digital sound signals includes a first digital sound signal sub-frame, and the amplitude of the first digital sound signal sub-frame is greater than or equal to the environmental noise judgment threshold, then the historical work before the current work cycle
  • the frequency domain feature extracted by the period determines the frequency domain feature of the current working period.
  • the frequency domain feature N n will not be updated, and the current working cycle can be obtained from the frequency domain features extracted from the historical working cycle
  • the frequency domain features can be smoothed.
  • ⁇ and ⁇ are smoothing coefficients, and the value range is: 0 ⁇ , ⁇ 1.
  • the extracted frequency domain features N n with the frequency domain features of the prior environment (the frequency domain features of the water environment N normal , the frequency domain features of the underwater environment N Water ) to determine the environment where the equipment is located Whether it is an underwater environment.
  • the frequency domain amplitude spectrum is obtained by performing frequency domain transformation on the subframes of the environmental sound signal, and the frequency domain characteristics are extracted from the subframes whose time domain characteristic amplitude is less than the environmental noise judgment threshold, that is, the environment is extracted.
  • the frequency domain characteristics of the noise based on the frequency domain characteristics to determine whether it is in an underwater environment, the accuracy is high.
  • a group of digital sound signals includes a plurality of first digital sound signal sub-frames
  • the time domain characteristic amplitude of each sub-frame of the plurality of first digital sound signal sub-frames is determined, based on the plurality of first digital sound signal sub-frames.
  • the time domain characteristic amplitude value of a digital sound signal subframe obtains the environmental noise judgment threshold value of the current working cycle
  • a group of digital sound signals includes a first digital sound signal sub-frame
  • the time-domain characteristic amplitude based on the time-domain characteristic amplitude of a first digital sound signal sub-frame and the time-domain characteristic amplitude of the first digital signal sub-frame of the historical working period before the current working cycle, to obtain the current working cycle Environmental noise judgment threshold.
  • the minimum time domain characteristic amplitude of the plurality of first digital sound signal subframes may be determined, and the minimum time domain characteristic amplitude can be obtained according to the minimum time domain characteristic amplitude.
  • the environmental noise judgment threshold of the current working cycle may be determined, and the minimum time domain characteristic amplitude can be obtained according to the minimum time domain characteristic amplitude.
  • the environmental noise judgment threshold of the current working cycle may be determined in the following manner:
  • Nthr n ⁇ 1*min(SegEng(1) n ,SegEng(2) n ,...,SegEng(K) n )
  • ⁇ 1 is the adjustment parameter
  • min() is the minimum value operation
  • the time domain characteristic amplitude in the first digital sound signal sub-frame and the first historical working period before the current working period can be determined.
  • the minimum time-domain characteristic amplitude among the time-domain characteristic amplitudes of a digital signal subframe, and the environmental noise judgment threshold value of the current working cycle is obtained according to the minimum time-domain characteristic amplitude.
  • the environmental noise judgment threshold of the current working cycle may be determined in the following manner:
  • Nthr n ⁇ 2*min(SegEng n , SegEng n-1 ,...SegEng nK ), where ⁇ is the adjustment parameter, ⁇ 2 ⁇ 1, min() is the minimum operation.
  • SegEng n-1 ,...SegEng nK are the time domain characteristic amplitudes of the historical work cycle.
  • ⁇ 1 and ⁇ 2 can be the same or different.
  • smoothing processing may also be performed:
  • Nthr n ⁇ Nthr n +(1- ⁇ ) ⁇ Nthr n-1
  • step 102 can be implemented in the following ways:
  • Step 1021a Obtain an environmental frequency domain characteristic threshold, where the environmental frequency domain characteristic threshold is determined according to at least one of the frequency domain characteristic threshold of the underwater environment and the frequency domain characteristic threshold of the aquatic environment;
  • Step 1022a Determine whether the environment in which the electronic device is located is an underwater environment according to the environmental frequency domain characteristic threshold and the frequency domain characteristic.
  • the electronic equipment can be placed in the aquatic environment and the underwater environment respectively, and by continuously collecting the environmental sound signal for a period of time T, the frequency domain feature vector of the environmental sound signal in different environments can be obtained Among them, fs is the sampling rate, L is the sampling interval, and n is the working period.
  • the frequency domain characteristic thresholds of the corresponding a priori environmental sound signals in the aquatic environment and the underwater environment are denoted as N Normal and N water , where N Normal and N water are vectors of length N respectively.
  • the difference in the frequency domain characteristics of the environmental sound signals of different environments that is, at least one of the frequency domain characteristic threshold of the aquatic environment and the frequency domain characteristic threshold of the underwater environment is used to determine whether the environment in which the electronic device is located is an underwater environment .
  • the difference between the frequency domain characteristics of the environmental sound signal acquired in the current working cycle and the frequency domain characteristic threshold of the underwater environment is calculated, and if the difference is less than the preset threshold, the electronic device is determined
  • the environment is underwater.
  • the difference can be obtained by calculation methods such as Euclidean distance. If the difference is greater than or equal to the preset threshold, it is determined that the environment where the electronic device is located is not an underwater environment.
  • the difference between the frequency domain characteristics of the environmental sound signal acquired in the current working cycle and the frequency domain characteristic threshold of the marine environment is calculated, and if the difference is greater than the preset threshold, the location of the electronic device is determined.
  • the environment is underwater.
  • the difference can be obtained by calculation methods such as Euclidean distance. If the difference is less than or equal to the preset threshold, it is determined that the environment where the electronic device is located is not an underwater environment.
  • the difference between the frequency domain characteristic of the environmental sound signal acquired in the current working cycle and the frequency domain characteristic threshold of the aquatic environment and the frequency domain characteristic threshold of the underwater environment is calculated separately, if a certain difference is If the absolute value of is less than the preset threshold, the environment corresponding to the difference can be regarded as the environment where the electronic device is currently located. For example, the absolute value of the difference between the current frequency domain feature and the frequency domain feature threshold of the underwater environment is less than the preset Threshold, it is determined that the environment in which the electronic device is currently located is an underwater environment.
  • the absolute value of the two differences is less than the preset threshold, the absolute value of the two differences can be further compared, and the environment corresponding to the absolute value of the smaller difference is determined as the current environment of the electronic device .
  • the environmental frequency domain characteristic threshold includes the frequency domain characteristic threshold of the underwater environment and the frequency domain characteristic threshold of the aquatic environment, and this step 102 may be implemented in the following manner:
  • a first frequency domain characteristic difference value Determining a first frequency domain characteristic difference value, where the first frequency domain characteristic difference value is determined according to a difference between a frequency domain characteristic and a frequency domain characteristic threshold of the underwater environment;
  • the first frequency domain characteristic difference value is less than or equal to the second frequency domain characteristic difference value, it is determined that the environment where the electronic device is located is an underwater environment.
  • N n , N Normal and N water are frequency domain feature vectors of length N respectively, and the distance can be calculated as follows:
  • distance is used to classify the environment
  • other methods can also be used to classify the environment, including cluster analysis, adaptive learning and other methods for classification. For example, clustering is performed on the acquired frequency domain features, the pre-acquired frequency domain features of the underwater environment, and the frequency domain features of the water environment to determine whether the environment in which the electronic device is located is an underwater environment.
  • Step 1021b Input the frequency domain features into the preset environment discrimination model to obtain the environment type label output by the preset environment discrimination model, where the preset environment discrimination model is based on the frequency domain characteristics of the underwater environment and the water environment Optimized frequency domain characteristics;
  • Step 1022b Determine whether the environment in which the electronic device is located is an underwater environment according to the environment type label.
  • the preset environment discrimination model can be optimized through the frequency domain characteristics of the aquatic environment and the frequency domain characteristics of the underwater environment, that is, collecting a large number of environmental sound signals of the aquatic environment and the aquatic environment in different scenarios, and extracting the corresponding environment The frequency domain characteristics of, input to the preset environment discrimination model to optimize the parameters of the environment discrimination model.
  • the environment discrimination model can be established based on neural networks, support vector machine classification algorithm models, clustering algorithms, and so on.
  • the output environment type label is a water environment label, it is determined that the environment in which the electronic device is located is a water environment.
  • the environment discrimination model may also output the probability of the environment type, for example, the final environment is determined according to the magnitude of the probability.
  • the preset environment discrimination model is a neural network model, and the neural network is trained on the frequency domain characteristics of the underwater environment and the frequency domain characteristics of the water environment.
  • the preset environment discrimination model is a support vector machine classification algorithm model.
  • sign represents a sign function
  • the microphone-based water entry detection method in the embodiment of the present application uses the obvious difference between the frequency domain characteristics of the environmental sound signal of the microphone in the water and the air (that is, the frequency domain characteristics of the environmental noise) for comparison and discrimination, and determines the environment in which the electronic device is located.
  • the microphones contained in most electronic devices can be reused, and the function of rapid water entry detection is achieved without increasing other costs. It has easy implementation, low equipment requirements, high detection accuracy, and high detection speed. advantage.
  • different implementations of the solution can be deployed and implemented according to different electronic devices and different software and hardware platforms.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • the electronic device provided in this embodiment is used to implement the water ingress detection method provided in any one of the embodiments shown in FIG. 2 to FIG. 5.
  • the electronic device provided in this embodiment may include: a microphone 61 and a processor 62.
  • the microphone 61 is used to collect environmental sound signals;
  • the processor 62 is configured as:
  • the frequency domain characteristics it is determined whether the environment in which the electronic device is located is an underwater environment.
  • the processor 62 is configured to:
  • the frequency domain characteristics of the current working period are extracted, wherein the second digital sound signal subframe is the first digital sound signal subframe Digital sound signal sub-frames whose mid-time domain feature amplitude is less than the environmental noise judgment threshold.
  • the processor 62 is configured to:
  • the average value of the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current working period
  • the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current period.
  • the processor 62 is configured to:
  • the set of digital sound signals includes a first digital sound signal sub-frame, and the amplitude of the first digital sound signal sub-frame is greater than or equal to the environmental noise judgment threshold, then according to the current working period before The frequency domain feature extracted from the historical work cycle determines the frequency domain feature of the current work cycle.
  • the processor 62 is configured to:
  • the time domain characteristic amplitude of each subframe of the plurality of first digital sound signal subframes is determined, based on the plurality of first digital sound signal subframes.
  • the time domain characteristic amplitude value of the sound signal subframe obtains the environmental noise judgment threshold value of the current working period;
  • the set of digital sound signals includes a first digital sound signal sub-frame
  • determine the time domain characteristic amplitude in the one first digital sound signal sub-frame and the first historical working period before the current working period The time domain characteristic amplitude of a digital signal subframe is based on the time domain characteristic amplitude of the one first digital sound signal subframe and the time of the first digital signal subframe of the historical working period before the current working period
  • the domain characteristic amplitude is used to obtain the environmental noise judgment threshold of the current working period.
  • the processor 62 is configured to:
  • the environment frequency domain feature threshold is determined according to at least one of the frequency domain feature threshold of the underwater environment and the frequency domain feature threshold of the aquatic environment;
  • the environmental frequency domain characteristic threshold includes the frequency domain characteristic threshold of the underwater environment and the frequency domain characteristic threshold of the marine environment, and the processor 62 is configured to:
  • the first frequency domain characteristic difference value is less than or equal to the second frequency domain characteristic difference value, it is determined that the environment where the electronic device is located is the underwater environment.
  • the processor 62 is configured to:
  • the preset environment discrimination model is a neural network model.
  • the preset environment discrimination model is a support vector machine classification algorithm model.
  • the electronic device may further include an imaging component 63 for shooting images or videos, and optionally, a memory for storing instructions executable by the processor. And/or image or video data captured by the imaging component.
  • the processor 62 is configured as:
  • the imaging parameters of the imaging component are adjusted.
  • the electronic device provided in this embodiment is used to implement the water ingress detection method provided in any of the embodiments in FIG. 2 to FIG. 5.
  • the technical principles and technical effects are similar, and will not be repeated here.
  • the embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the corresponding method in the foregoing method embodiment is implemented.
  • the specific implementation process please refer to the foregoing method implementation.
  • the implementation principles and technical effects are similar, so I won’t repeat them here.
  • the embodiments of the present application also provide a program product.
  • the program product includes a computer program (that is, an execution instruction), and the computer program is stored in a readable storage medium.
  • the processor can read the computer program from a readable storage medium, and the processor executes the computer program to execute the water entry detection method provided by any one of the foregoing method embodiments.
  • a person of ordinary skill in the art can understand that all or part of the steps in the foregoing method embodiments can be implemented by a program instructing relevant hardware.
  • the aforementioned program can be stored in a computer readable storage medium. When the program is executed, it executes the steps including the foregoing method embodiments; and the foregoing storage medium includes: ROM, RAM, magnetic disk, or optical disk and other media that can store program codes.

Abstract

An underwater detection method, a device, and a storage medium. The method is applied to an electronic device which is provided with a microphone (61). The method comprises: extracting, according to an ambient sound signal of the environment where the electronic device is located collected by the microphone (61), a frequency-domain feature of the ambient sound signal (101); and determining whether the environment where the electronic device is located is underwater environment according to the frequency-domain feature (102). According to the method, whether the environment is the underwater environment by means of the frequency-domain feature of the ambient sound signal collected by the microphone (61), and the detection result is relatively accurate.

Description

入水检测方法、设备和存储介质Water ingress detection method, equipment and storage medium 技术领域Technical field
本申请实施例涉及电子设备技术领域,尤其涉及一种入水检测方法、设备和存储介质。The embodiments of the present application relate to the technical field of electronic devices, and in particular, to a water ingress detection method, device, and storage medium.
背景技术Background technique
随着电子设备的广泛应用,用户对电子设备的性能要求越来越高,其中水下场景便是一个典型场景。水下的应用(比如水下探测或摄影、水下设备保护等)也会越来越普及,因此有必要对设备入水前后的状态进行检测,以确认设备是否在水中,以针对不同情况开发不同应用或者模式,比如水下拍照模式等。With the widespread application of electronic devices, users have higher and higher performance requirements for electronic devices, and an underwater scene is a typical scene. Underwater applications (such as underwater detection or photography, underwater equipment protection, etc.) will become more and more popular. Therefore, it is necessary to test the state of the equipment before and after entering the water to confirm whether the equipment is in the water, so as to develop different conditions for different situations. Application or mode, such as underwater camera mode, etc.
相关技术中,一般通过如下几种方式检测:一种是增加额外的器件对水下场景进行检测,例如增加压力传感器、增加光学器件并基于光学的入水检测,增加热敏电阻等基于热力学的入水检测等。该方式中会增加电子设备的成本。另一种是基于已有器件利用水下场景的物理规律进行场景检测,例如检测通信信号能否正常传输,但有些通信信号(例如蓝牙)在浅水区仍能正常传输,检测结果会存在偏差。In related technologies, the following methods are generally used to detect: one is to add additional devices to detect underwater scenes, such as adding pressure sensors, adding optical devices and optical water entry detection, adding thermistors and other thermodynamic water entry Detection etc. This method will increase the cost of electronic equipment. The other is to perform scene detection based on existing devices using the physical laws of underwater scenes, such as detecting whether communication signals can be transmitted normally, but some communication signals (such as Bluetooth) can still be transmitted normally in shallow water, and the detection results will be biased.
发明内容Summary of the invention
本申请提供一种入水检测方法、设备和存储介质,提升了入水检测的准确性。The present application provides a method, equipment and storage medium for water ingress detection, which improves the accuracy of water ingress detection.
第一方面,本申请提供一种入水检测方法,应用于电子设备,所述电子设备设置有麦克风,所述方法包括:In a first aspect, the present application provides a water entry detection method, which is applied to an electronic device, the electronic device is provided with a microphone, and the method includes:
根据所述麦克风采集所述电子设备所处的环境的环境声音信号,提取所述环境声音信号的频域特征;Collecting, according to the microphone, the environmental sound signal of the environment in which the electronic device is located, and extracting the frequency domain characteristics of the environmental sound signal;
根据所述频域特征,确定所述电子设备所处的环境是否为水下环境。According to the frequency domain characteristics, it is determined whether the environment in which the electronic device is located is an underwater environment.
第二方面,本申请提供一种控制设备,包括:麦克风、处理器;In the second aspect, this application provides a control device, including: a microphone and a processor;
其中,所述麦克风用于采集环境声音信号;Wherein, the microphone is used to collect environmental sound signals;
所述处理器配置为:The processor is configured as:
根据所述麦克风采集所述电子设备所处的环境的环境声音信号,提取所述环境声音信号的频域特征;Collecting, according to the microphone, the environmental sound signal of the environment in which the electronic device is located, and extracting the frequency domain characteristics of the environmental sound signal;
根据所述频域特征,确定所述电子设备所处的环境是否为水下环境。According to the frequency domain characteristics, it is determined whether the environment in which the electronic device is located is an underwater environment.
第三方面,本申请提供一种存储介质,包括:可读存储介质和计算机程序,所述计算机程序用于实现上述第一方面任一实施方式提供的入水检测方法。In a third aspect, the present application provides a storage medium, including: a readable storage medium and a computer program, the computer program being used to implement the water ingress detection method provided by any one of the above-mentioned embodiments of the first aspect.
第四方面,本申请提供一种程序产品,该程序产品包括计算机程序(即执行指令),该计算机程序存储在可读存储介质中。处理器可以从可读存储介质读取该计算机程序,处理器执行该计算机程序用于执行上述第一方面任一实施方式提供的入水检测方法。In a fourth aspect, the present application provides a program product. The program product includes a computer program (that is, an execution instruction), and the computer program is stored in a readable storage medium. The processor can read the computer program from a readable storage medium, and the processor executes the computer program to execute the water ingress detection method provided by any one of the embodiments of the first aspect described above.
本申请提供一种入水检测方法、设备和存储介质,根据麦克风采集电子设备所处的环境的环境声音信号,提取环境声音信号的频域特征;由于麦克风在水上环境和水下环境中采集的环境声音信号的频域特征具有明显差别,因此根据环境声音信号提取的频域特征,确定电子设备所处的环境是否为水下环境,准确率较高。This application provides a water entry detection method, equipment and storage medium, which extracts the frequency domain characteristics of the environmental sound signal according to the environmental sound signal of the environment in which the electronic device is located by the microphone; due to the environment that the microphone collects in the water environment and the underwater environment The frequency domain characteristics of the sound signal have obvious differences. Therefore, according to the frequency domain characteristics extracted from the environmental sound signal, it is determined whether the environment in which the electronic device is located is an underwater environment, and the accuracy rate is high.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
图1为本申请一实施例提供的场景图;Figure 1 is a scene diagram provided by an embodiment of the application;
图2为本申请一实施例提供的入水检测方法的流程图;FIG. 2 is a flowchart of a water entry detection method provided by an embodiment of the application;
图3为本申请一实施例提供的入水检测方法的原理框图;FIG. 3 is a schematic block diagram of a water entry detection method provided by an embodiment of this application;
图4为本申请另一实施例提供的入水检测方法的流程图;FIG. 4 is a flowchart of a water entry detection method provided by another embodiment of this application;
图5为本申请又一实施例提供的入水检测方法的流程图;FIG. 5 is a flowchart of a water entry detection method provided by another embodiment of this application;
图6为本申请一实施例提供的电子设备的结构示意图;FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the application;
图7为本申请另一实施例提供的电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device provided by another embodiment of the application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
首先对本申请所涉及的应用场景进行介绍:First, the application scenarios involved in this application are introduced:
本申请实施例提供的入水检测方法,应用于电子设备中,可以检测电子设备是否处于水下环境,进而根据电子设备所处的水下环境,控制电子设备执行相应的操作,或调节电子设备的状态或相应参数,例如成像参数等。The water entry detection method provided in the embodiments of the present application is applied to electronic equipment. It can detect whether the electronic equipment is in an underwater environment, and then control the electronic equipment to perform corresponding operations or adjust the electronic equipment according to the underwater environment in which the electronic equipment is located. Status or corresponding parameters, such as imaging parameters, etc.
所述电子设备可以为任何能够在水下工作电子设备,例如包括:可穿戴设备、摄像设备、水下测量设备等,可穿戴设备例如包括智能手环、智能手表、智能眼镜等。该电子设备为防水设备。The electronic device may be any electronic device capable of working underwater, for example, including wearable devices, camera equipment, underwater measuring equipment, etc., and wearable devices, for example, include smart bracelets, smart watches, smart glasses, and the like. The electronic device is waterproof.
相关技术中,一般通过如下几种方式检测:一种是增加额外的器件对水下场景进行检测,例如增加压力传感器、增加光学器件并基于光学的入水检测,增加热敏电阻等基于热力学的入水检测等。该方式中会增加电子设备的成本。另一种是基于已有器件利用水下场景的物理规律进行场景检测,例如检测通信信号能否正常传输,但有些通信信号(例如蓝牙)在浅水区仍能正常传输,检测结果会存在偏差。In related technologies, the following methods are generally used to detect: one is to add additional devices to detect underwater scenes, such as adding pressure sensors, adding optical devices and optical water entry detection, adding thermistors and other thermodynamic water entry Detection etc. This method will increase the cost of electronic equipment. The other is to perform scene detection based on existing devices using the physical laws of underwater scenes, such as detecting whether communication signals can be transmitted normally, but some communication signals (such as Bluetooth) can still be transmitted normally in shallow water, and the detection results will be biased.
本申请实施例的入水检测方法,利用麦克风在水中和空气中采集的环境声音信号的频域特征(即环境噪声的频域特征)的明显差别,判断设备所处的环境是否为水下环境,与目前的水下场景检测方案相比,可以复用大部分电子设备中所包含的麦克风,从而可以降低设备设计成本以及硬件成本,实施容易,而且检测结果准确性高。The water entry detection method of the embodiment of the present application uses the obvious difference in the frequency domain characteristics of the environmental sound signal collected by the microphone in the water and in the air (that is, the frequency domain characteristics of the environmental noise) to determine whether the environment in which the device is located is an underwater environment, Compared with the current underwater scene detection scheme, the microphones contained in most electronic devices can be reused, thereby reducing equipment design costs and hardware costs, easy implementation, and high accuracy of detection results.
本申请实施例的方法可以由电子设备执行,该电子设备包括麦克风。例如可由电子设备如该电子设备的处理器执行相应的软件代码实现。在某些实施例中,本申请实施例的方法可以由与所述电子设备通信连接的设备执行。例如所述方法可以由与电子设备通信的控制终端,再例图1所示,服务器与电子设备通信连接,本申请的所述方法可以由服务器实施。在某 些实施例,所述方法可以由电子设备和由与所述电子设备通信连接的设备共同执行。The method in the embodiment of the present application may be executed by an electronic device, and the electronic device includes a microphone. For example, it can be implemented by an electronic device such as a processor of the electronic device executing corresponding software code. In some embodiments, the methods of the embodiments of the present application may be executed by a device communicatively connected with the electronic device. For example, the method may be a control terminal that communicates with an electronic device. As shown in FIG. 1, the server is in communication connection with the electronic device, and the method of this application may be implemented by the server. In some embodiments, the method may be executed jointly by an electronic device and a device communicatively connected with the electronic device.
在一个可选的实施例中,电子设备可以包括成像组件,其中,成像组件用于获取图像或视频数据。In an optional embodiment, the electronic device may include an imaging component, where the imaging component is used to obtain image or video data.
下面以具体的实施例对本公开的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。The technical solutions of the present disclosure will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
图2为本申请一实施例提供的入水检测方法的流程图。如图2、图3所示,本实施例提供的方法,应用于电子设备,该电子设备设置有麦克风,该方法包括:Fig. 2 is a flowchart of a water entry detection method provided by an embodiment of the application. As shown in Figures 2 and 3, the method provided in this embodiment is applied to an electronic device that is provided with a microphone, and the method includes:
步骤101、根据麦克风采集电子设备所处的环境的环境声音信号,提取环境声音信号的频域特征。Step 101: According to the microphone collecting the environmental sound signal of the environment in which the electronic device is located, extract the frequency domain characteristics of the environmental sound signal.
具体的,通过麦克风采集电子设备所处的环境的环境声音信号,并提取该环境声音信号的频域特征。Specifically, the microphone collects the environmental sound signal of the environment in which the electronic device is located, and extracts the frequency domain characteristics of the environmental sound signal.
在一个可选的实施例中,可以对麦克风采集的环境声音信号进行采样处理,得到时间离散的数字声音信号,进而对数字声音信号进行频域转换处理,并提取频域特征。例如根据频域转换处理后的信号的幅值,提取频域特征。In an optional embodiment, the environmental sound signal collected by the microphone may be sampled and processed to obtain a time-discrete digital sound signal, and then the digital sound signal may be subjected to frequency domain conversion processing, and frequency domain features may be extracted. For example, the frequency domain feature is extracted according to the amplitude of the signal after frequency domain conversion processing.
步骤102、根据频域特征,确定电子设备所处的环境是否为水下环境。Step 102: Determine whether the environment in which the electronic device is located is an underwater environment according to the frequency domain characteristics.
具体的,由于水上环境和水下环境采集的环境声音信号的频域特征具有明显差别,因此可以根据该环境声音信号的频域特征,确定该电子设备所处的环境是否为水下环境。Specifically, since the frequency domain characteristics of the environmental sound signals collected by the aquatic environment and the underwater environment are significantly different, it can be determined whether the environment in which the electronic device is located is an underwater environment according to the frequency domain characteristics of the environmental sound signal.
在一个可选的实施例中,可以将该环境声音信号的频域特征,与水上环境的频域特征和水下环境的频域特征比较,若与水下环境的频域特征的差别小于与水上环境的频域特征的差别,则可以确定该电子设备所处的环境是水下环境。In an optional embodiment, the frequency domain characteristics of the environmental sound signal may be compared with the frequency domain characteristics of the water environment and the frequency domain characteristics of the underwater environment, if the difference between the frequency domain characteristics of the underwater environment and the frequency domain characteristics of the underwater environment is less than that of The difference in the frequency domain characteristics of the aquatic environment can determine that the environment in which the electronic device is located is an underwater environment.
在一个可选的实施例中,可以将该环境声音信号的频域特征,输入一预先训练得到的机器学习模型中,该模型的输出结果为该电子设备所处的环境类型标签,或所处的环境类型的概率等,该机器学习模型例如通过神经网络模型、支持向量机分类算法模型、聚类算法等建立。其中,神经网络模型例如为CNN、VGG、GoogleNet等。In an optional embodiment, the frequency domain characteristics of the environmental sound signal can be input into a pre-trained machine learning model, and the output result of the model is the label of the environment type in which the electronic device is located, or The machine learning model is established, for example, through a neural network model, a support vector machine classification algorithm model, and a clustering algorithm. Among them, the neural network model is, for example, CNN, VGG, GoogleNet, etc.
在一个可选的实施例中,该步骤可以通过一个判断函数来说实现,例如分别判断频域特征与先验得到的水下环境的频域特征,以及与水上环境的频域特征的差别。In an optional embodiment, this step can be implemented by a judgment function, for example, respectively judging the frequency domain feature and the frequency domain feature of the underwater environment obtained a priori, and the difference with the frequency domain feature of the water environment.
在一实施例中,该电子设备还可以包括成像组件,该方法还包括:In an embodiment, the electronic device may further include an imaging component, and the method further includes:
当确定成像组件处于水下环境时,调节成像组件的成像参数。When it is determined that the imaging component is in an underwater environment, the imaging parameters of the imaging component are adjusted.
其中,成像参数例如包括曝光时间、曝光增益等。在水下环境拍照或录像时,可以调节成像参数,以适应水下环境的场景。Among them, the imaging parameters include, for example, exposure time, exposure gain, and so on. When taking pictures or videos in an underwater environment, the imaging parameters can be adjusted to adapt to the scene of the underwater environment.
本实施例的方法,根据麦克风采集电子设备所处的环境的环境声音信号,提取环境声音信号的频域特征;由于麦克风在水上环境和水下环境中采集的环境声音信号的频域特征具有明显差别,因此根据环境声音信号提取的频域特征,确定电子设备所处的环境是否为水下环境,准确率较高。The method of this embodiment extracts the frequency domain characteristics of the environmental sound signal according to the environmental sound signal of the environment in which the electronic device is collected by the microphone; because the frequency domain characteristics of the environmental sound signal collected by the microphone in the water environment and the underwater environment are obvious Therefore, according to the frequency domain characteristics extracted from the environmental sound signal, it is determined whether the environment in which the electronic device is located is an underwater environment, and the accuracy rate is high.
在上述实施例的基础上,进一步的,如图4所示,步骤101可以采用如下方式实现:On the basis of the foregoing embodiment, further, as shown in FIG. 4, step 101 can be implemented in the following manner:
步骤1011、对环境声音信号进行采样处理,得到当前工作周期的一组数字声音信号,其中,一组数字声音信号包括至少一个第一数字声音信号子帧;Step 1011: Perform sampling processing on the environmental sound signal to obtain a group of digital sound signals of the current working cycle, where the group of digital sound signals includes at least one first digital sound signal subframe;
步骤1012、将各个第一数字声音信号子帧进行频域变换,得到各个第一数字声音信号子帧的频域幅值谱;Step 1012: Perform frequency domain transformation on each first digital sound signal subframe to obtain a frequency domain amplitude spectrum of each first digital sound signal subframe;
步骤1013、根据各个第二数字声音信号子帧的频域幅值谱,提取当前工作周期的频域特征,其中,第二数字声音信号子帧为第一数字声音信号子帧中时域特征幅值小于环境噪声判断阈值的数字声音信号子帧。Step 1013: Extract the frequency domain characteristic of the current working cycle according to the frequency domain amplitude spectrum of each second digital sound signal subframe, where the second digital sound signal subframe is the time domain characteristic amplitude in the first digital sound signal subframe The digital sound signal sub-frame whose value is less than the environmental noise judgment threshold.
具体的,对环境声音信号进行采样处理,即将环境声音信号转换为时间离散的数字信号,得到一组数字声音信号,其中,一组数字声音信号包括至少一个第一数字声音信号子帧。Specifically, the environmental sound signal is sampled, that is, the environmental sound signal is converted into a time-discrete digital signal to obtain a group of digital sound signals, where the group of digital sound signals includes at least one first digital sound signal subframe.
设时间离散的数字信号为x(t),其中t是离散时间索引,转换的采样率为fs;每间隔L(根据采样率fs得到)对x(t)采样,形成K个帧长为N,帧间隔为M的向量x(n),其中K>=1,M>=1,x(n)=[x 1(n),x 2(n),…,x K(n)],其中x k(n)是帧长为N的第一数字声音信号子帧,其中,每一个第一数字声音信号子帧中包括N个元素。其中,n表示频域特征提取的工作周期。 Suppose the time discrete digital signal is x(t), where t is the discrete time index, and the converted sampling rate is fs; each interval L (obtained according to the sampling rate fs) samples x(t) to form K frames with a length of N , The vector x(n) with a frame interval of M, where K>=1, M>=1, x(n)=[x 1 (n), x 2 (n),...,x K (n)], Where x k (n) is the first digital sound signal subframe with a frame length of N, where each first digital sound signal subframe includes N elements. Among them, n represents the working period of frequency domain feature extraction.
Figure PCTCN2019130348-appb-000001
Figure PCTCN2019130348-appb-000001
令x(n,k,i)=x(n×L-N+i-(k-1)×M),则x k(n)可简记为: Let x(n,k,i)=x(n×L-N+i-(k-1)×M), then x k (n) can be abbreviated as:
x k(n)=[x(n,k,i),x(n,k,i+1),……,x(n,k,i+N-1)] x k (n)=[x(n,k,i),x(n,k,i+1),……,x(n,k,i+N-1)]
k是子帧序号,其中,k=1,2,.....K;i是子帧内的元素序号。k is the sequence number of the subframe, where k=1, 2,...K; i is the sequence number of the element in the subframe.
进一步,将各个第一数字声音信号子帧进行频域变换,例如傅里叶变换、小波变换等,得到各个第一数字声音信号子帧的频域幅值谱,并筛选出第一数字声音信号子帧中时域特征幅值小于环境噪声判断阈值的第二数字声音信号子帧。Further, perform frequency domain transformation on each first digital sound signal subframe, such as Fourier transform, wavelet transform, etc., to obtain the frequency domain amplitude spectrum of each first digital sound signal subframe, and filter out the first digital sound signal The second digital sound signal sub-frame in the sub-frame whose time-domain characteristic amplitude is less than the environmental noise judgment threshold.
其中傅里叶变换例如采用短时加窗傅里叶变换。Among them, the Fourier transform uses, for example, a short-time windowed Fourier transform.
其中,时域特征幅值例如通过对每个第一数字声音信号子帧各个元素的幅值求平均值得到,或还可以根据第一数字声音信号子帧各个元素的幅值的中位值,或第一数字声音信号子帧各个元素的幅值的众数等,本申请对此并不限定。Wherein, the temporal characteristic amplitude can be obtained, for example, by averaging the amplitude of each element of each first digital sound signal subframe, or can also be based on the median value of the amplitude of each element of the first digital sound signal subframe, Or the mode of the amplitude of each element of the first digital sound signal subframe, which is not limited in this application.
在一实施例中,分别对K个子帧x k(n)中元素x(n,k,i)的绝对值求和再平均可以得到各个子帧x k(n)的时域特征幅值,例如可采用如下公式计算得到时域特征幅值: In an embodiment, the absolute values of the elements x(n,k,i) in the K subframes x k (n) are respectively summed and then averaged to obtain the temporal characteristic amplitude of each subframe x k (n), For example, the following formula can be used to calculate the time domain characteristic amplitude:
Figure PCTCN2019130348-appb-000002
Figure PCTCN2019130348-appb-000002
其中,环境噪声判断阈值可以根据K个第一数字声音信号子帧的时域特征幅值得到。Wherein, the environmental noise judgment threshold may be obtained according to the temporal characteristic amplitudes of the K first digital sound signal subframes.
进一步,根据各个第二数字声音信号子帧的频域幅值谱,提取当前工作周期的频域特征。Further, according to the frequency domain amplitude spectrum of each second digital sound signal subframe, the frequency domain characteristic of the current working period is extracted.
将K个子帧x k(n)进行频域变换,得到K个长度为N的频域谱向量X 1(n),…,X K(n);取绝对值操作得到各个子帧x k(n)的频域幅值谱|X 1(n)|,…,|X K(n)|。 Perform frequency domain transformation on K subframes x k (n) to obtain K frequency domain spectrum vectors X 1 (n),..., X K (n) with length N; take the absolute value operation to obtain each subframe x k ( The frequency domain amplitude spectrum of n) |X 1 (n)|,...,|X K (n)|.
在一实施例中,若一组数字声音信号包括多个第一数字声音信号子帧,则将第二数字声音信号子帧的频域幅值谱的均值,作为当前工作周期的频域特征;In an embodiment, if a group of digital sound signals includes a plurality of first digital sound signal subframes, the average value of the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current working cycle;
若一组数字声音信号包括一个第一数字声音信号子帧,则将第二数字声音信号子帧的频域幅值谱,作为当前周期的频域特征。If a group of digital sound signals includes a first digital sound signal subframe, the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current period.
若K大于1,计算K个子帧中时域特征幅值小于环境噪声判断阈值Nthr n中的P个第二数字声音信号子帧的频域幅值谱的平均值作为频域特征N n;例如可采用如下公式计算得到频域特征: If K is greater than 1, calculate the average value of the frequency domain amplitude spectrum of the P second digital sound signal subframes in the K subframes whose amplitudes in the time domain are less than the environmental noise judgment threshold Nthr n as the frequency domain characteristic N n ; for example The frequency domain characteristics can be calculated using the following formula:
Figure PCTCN2019130348-appb-000003
Figure PCTCN2019130348-appb-000003
其中Num(SegEng(k) n<Nthr n)代表时域特征幅值小于环境噪声判断阈值的第二数字声音信号子帧的数量,频域特征N n为长度为N的向量。 Wherein Num(SegEng(k) n <Nthr n ) represents the number of second digital sound signal sub-frames whose time domain feature amplitude is less than the environmental noise judgment threshold, and frequency domain feature N n is a vector of length N.
若K等于1,且该x k(n)的时域特征幅值小于环境噪声判断阈值,则对该子帧x k(n)进行频域变换,得到长度为N的频域谱向量X(n);计算X(n)的绝对值作为子帧x k(n)的频域特征,例如可采用如下公式计算得到频域特征: If K is equal to 1, and the time domain characteristic amplitude of x k (n) is less than the environmental noise judgment threshold, then frequency domain transformation is performed on the subframe x k (n) to obtain a frequency domain spectrum vector X( n); Calculate the absolute value of X(n) as the frequency domain feature of the subframe x k (n), for example, the following formula can be used to calculate the frequency domain feature:
N n=|X(n)| N n = |X(n)|
在一实施例中,若一组数字声音信号包括一个第一数字声音信号子帧,且第一数字声音信号子帧的幅值大于或等于环境噪声判断阈值,则根据当前工作周期前的历史工作周期提取的频域特征,确定当前工作周期的频域特征。In an embodiment, if a group of digital sound signals includes a first digital sound signal sub-frame, and the amplitude of the first digital sound signal sub-frame is greater than or equal to the environmental noise judgment threshold, then the historical work before the current work cycle The frequency domain feature extracted by the period determines the frequency domain feature of the current working period.
若K等于1,且该x k(n)的时域特征幅值大于或等于环境噪声判断阈值,则频域特征N n不做更新,可以根据历史工作周期提取的频域特征得到当前工作周期的频域特征,例如将当前工作周期的前一历史工作周期提取的频域特征,作为当前工作周期的频域特征,即设置N n=N n-1If K is equal to 1, and the time domain feature amplitude of x k (n) is greater than or equal to the environmental noise judgment threshold, the frequency domain feature N n will not be updated, and the current working cycle can be obtained from the frequency domain features extracted from the historical working cycle The frequency domain feature of, for example, the frequency domain feature extracted from the previous historical working cycle of the current working cycle is used as the frequency domain feature of the current working cycle, that is, N n =N n-1 is set.
可选的,可以对频域特征做平滑处理。Optionally, the frequency domain features can be smoothed.
Figure PCTCN2019130348-appb-000004
Figure PCTCN2019130348-appb-000004
上述中β,γ为平滑系数,取值范围为:0≤β,γ≤1。In the above, β and γ are smoothing coefficients, and the value range is: 0≤β, γ≤1.
进一步的,将提取的频域特征N n;与先验环境的频域特征(水上环境的频域特征N normal,水下环境的频域特征N Water)进行对比分析,判断设备所处的环境是否为水下环境。 Further, compare the extracted frequency domain features N n with the frequency domain features of the prior environment (the frequency domain features of the water environment N normal , the frequency domain features of the underwater environment N Water ) to determine the environment where the equipment is located Whether it is an underwater environment.
上述具体实施方式中,通过对环境声音信号的子帧进行频域变换,得到频域幅值谱,并从时域特征幅值小于环境噪声判断阈值的子帧中提取频域特征,即提取环境噪声的频域特征,依据该频域特征确定是否处于水下环境,准确性较高。In the above-mentioned specific embodiments, the frequency domain amplitude spectrum is obtained by performing frequency domain transformation on the subframes of the environmental sound signal, and the frequency domain characteristics are extracted from the subframes whose time domain characteristic amplitude is less than the environmental noise judgment threshold, that is, the environment is extracted. The frequency domain characteristics of the noise, based on the frequency domain characteristics to determine whether it is in an underwater environment, the accuracy is high.
在一实施例中,若一组数字声音信号包括多个第一数字声音信号子帧时,确定多个第一数字声音信号子帧中每一个子帧的时域特征幅值,根据多个第一数字声音信号子帧的时域特征幅值得到当前工作周期的环境噪声判断阈值;In an embodiment, if a group of digital sound signals includes a plurality of first digital sound signal sub-frames, the time domain characteristic amplitude of each sub-frame of the plurality of first digital sound signal sub-frames is determined, based on the plurality of first digital sound signal sub-frames. The time domain characteristic amplitude value of a digital sound signal subframe obtains the environmental noise judgment threshold value of the current working cycle;
若一组数字声音信号包括一个第一数字声音信号子帧时,确定一个第一数字声音信号子帧中的时域特征幅值和当前工作周期前的历史工作周期的第一数字信号子帧的时域特征幅值,根据一个第一数字声音信号子帧中的时域特征幅值和当前工作周期前的历史工作周期的第一数字信号子帧的时域特征幅值,得到当前工作周期的环境噪声判断阈值。If a group of digital sound signals includes a first digital sound signal sub-frame, determine the time domain characteristic amplitude in a first digital sound signal sub-frame and the first digital signal sub-frame of the historical working period before the current working period. The time-domain characteristic amplitude, based on the time-domain characteristic amplitude of a first digital sound signal sub-frame and the time-domain characteristic amplitude of the first digital signal sub-frame of the historical working period before the current working cycle, to obtain the current working cycle Environmental noise judgment threshold.
在一个可选的实施例中,对于多个第一数字声音信号子帧来说,可以确定多个第一数字声音信号子帧的最小时域特征幅值,并根据最小时域特征幅值得到当前工作周期的环境噪声判断阈值。In an optional embodiment, for a plurality of first digital sound signal subframes, the minimum time domain characteristic amplitude of the plurality of first digital sound signal subframes may be determined, and the minimum time domain characteristic amplitude can be obtained according to the minimum time domain characteristic amplitude. The environmental noise judgment threshold of the current working cycle.
在一个可选的实施例中,可以通过如下方式确定当前工作周期的环境噪声判断阈值:In an optional embodiment, the environmental noise judgment threshold of the current working cycle may be determined in the following manner:
Nthr n=μ1*min(SegEng(1) n,SegEng(2) n,…,SegEng(K) n) Nthr n = μ1*min(SegEng(1) n ,SegEng(2) n ,...,SegEng(K) n )
其中,μ1为调整参数,μ1≥1,min()为取最小值操作;Among them, μ1 is the adjustment parameter, μ1≥1, min() is the minimum value operation;
在一个可选的实施例中,对于一个第一数字声音信号子帧来说,可以确定该第一数字声音信号子帧中的时域特征幅值,以及当前工作周期前的历史工作周期的第一数字信号子帧的时域特征幅值中的最小时域特征幅值,并根据最小时域特征幅值得到当前工作周期的环境噪声判断阈值。In an optional embodiment, for a first digital sound signal sub-frame, the time domain characteristic amplitude in the first digital sound signal sub-frame and the first historical working period before the current working period can be determined. The minimum time-domain characteristic amplitude among the time-domain characteristic amplitudes of a digital signal subframe, and the environmental noise judgment threshold value of the current working cycle is obtained according to the minimum time-domain characteristic amplitude.
在一个可选的实施例中,可以通过如下方式确定当前工作周期的环境噪声判断阈值:In an optional embodiment, the environmental noise judgment threshold of the current working cycle may be determined in the following manner:
Nthr n=μ2*min(SegEng n,SegEng n-1,…SegEng n-K),其中μ为调整 参数,μ2≥1,min()为取最小值操作。 Nthr n = μ2*min(SegEng n , SegEng n-1 ,...SegEng nK ), where μ is the adjustment parameter, μ2≥1, min() is the minimum operation.
其中,SegEng n-1,…SegEng n-K为历史工作周期的时域特征幅值。 Among them, SegEng n-1 ,...SegEng nK are the time domain characteristic amplitudes of the historical work cycle.
其中,μ1和μ2可以相同或不同。Among them, μ1 and μ2 can be the same or different.
在一实施例中,对于环境噪声判断阈值,还可以进行平滑处理:In an embodiment, for the environmental noise judgment threshold, smoothing processing may also be performed:
Nthr n=α×Nthr n+(1-α)×Nthr n-1 Nthr n =α×Nthr n +(1-α)×Nthr n-1
其中α为调整参数,0≤α≤1;Nthr n-1为当前工作周期的前一工作周期的环境噪声判断阈值。 Among them, α is the adjustment parameter, 0≤α≤1; Nthr n-1 is the environmental noise judgment threshold value of the previous working cycle of the current working cycle.
在一种可能的实现方式中,如图5所示,步骤102可以通过如下几种方式实现:In a possible implementation manner, as shown in FIG. 5, step 102 can be implemented in the following ways:
一种实现方式:One way to achieve:
步骤1021a、获取环境频域特征阈值,其中,环境频域特征阈值是根据水下环境的频域特征阈值和水上环境的频域特征阈值中的至少一个确定的;Step 1021a: Obtain an environmental frequency domain characteristic threshold, where the environmental frequency domain characteristic threshold is determined according to at least one of the frequency domain characteristic threshold of the underwater environment and the frequency domain characteristic threshold of the aquatic environment;
步骤1022a、根据环境频域特征阈值和频域特征确定电子设备所处的环境是否为水下环境。Step 1022a: Determine whether the environment in which the electronic device is located is an underwater environment according to the environmental frequency domain characteristic threshold and the frequency domain characteristic.
具体的,可以将电子设备分别放置在水上环境和水下环境中,通过持续采集一段时间T的环境声音信号,得到不同环境下的环境声音信号的频域特征向量
Figure PCTCN2019130348-appb-000005
其中fs为采样率,L为采样间隔,n表示工作周期。将水上环境和水下环境下对应的先验环境声音信号的频域特征阈值记为N Normal和N water,其中N Normal和N water分别为长度为N的向量。
Specifically, the electronic equipment can be placed in the aquatic environment and the underwater environment respectively, and by continuously collecting the environmental sound signal for a period of time T, the frequency domain feature vector of the environmental sound signal in different environments can be obtained
Figure PCTCN2019130348-appb-000005
Among them, fs is the sampling rate, L is the sampling interval, and n is the working period. The frequency domain characteristic thresholds of the corresponding a priori environmental sound signals in the aquatic environment and the underwater environment are denoted as N Normal and N water , where N Normal and N water are vectors of length N respectively.
依据不同环境的环境声音信号的频域特征的差别,即通过水上环境的频域特征阈值和水下环境的频域特征阈值中的至少一个,确定该电子设备所处的环境是否为水下环境。According to the difference in the frequency domain characteristics of the environmental sound signals of different environments, that is, at least one of the frequency domain characteristic threshold of the aquatic environment and the frequency domain characteristic threshold of the underwater environment is used to determine whether the environment in which the electronic device is located is an underwater environment .
在一个可选的实施例中,计算当前工作周期获取的环境声音信号的频域特征,与水下环境的频域特征阈值的差值,若该差值小于预设阈值,则确定该电子设备所处的环境为水下环境。其中,差值可以通过欧式距离等计算方式得到。若该差值大于或等于预设阈值,则确定该电子设备所处的 环境不是水下环境。In an optional embodiment, the difference between the frequency domain characteristics of the environmental sound signal acquired in the current working cycle and the frequency domain characteristic threshold of the underwater environment is calculated, and if the difference is less than the preset threshold, the electronic device is determined The environment is underwater. Among them, the difference can be obtained by calculation methods such as Euclidean distance. If the difference is greater than or equal to the preset threshold, it is determined that the environment where the electronic device is located is not an underwater environment.
在一个可选的实施例中,计算当前工作周期获取的环境声音信号的频域特征,与水上环境的频域特征阈值的差值,若该差值大于预设阈值,则确定该电子设备所处的环境为水下环境。其中,差值可以通过欧式距离等计算方式得到。若该差值小于或等于预设阈值,则确定该电子设备所处的环境不是水下环境。In an optional embodiment, the difference between the frequency domain characteristics of the environmental sound signal acquired in the current working cycle and the frequency domain characteristic threshold of the marine environment is calculated, and if the difference is greater than the preset threshold, the location of the electronic device is determined. The environment is underwater. Among them, the difference can be obtained by calculation methods such as Euclidean distance. If the difference is less than or equal to the preset threshold, it is determined that the environment where the electronic device is located is not an underwater environment.
在一个可选的实施例中,分别计算当前工作周期获取的环境声音信号的频域特征,与水上环境的频域特征阈值和水下环境的频域特征阈值的差值,若某一差值的绝对值小于预设阈值,则可以将该差值对应的环境作为电子设备当前所处的环境,例如当前的频域特征与水下环境的频域特征阈值的差值的绝对值小于预设阈值,则确定电子设备当前所处的环境为水下环境。In an optional embodiment, the difference between the frequency domain characteristic of the environmental sound signal acquired in the current working cycle and the frequency domain characteristic threshold of the aquatic environment and the frequency domain characteristic threshold of the underwater environment is calculated separately, if a certain difference is If the absolute value of is less than the preset threshold, the environment corresponding to the difference can be regarded as the environment where the electronic device is currently located. For example, the absolute value of the difference between the current frequency domain feature and the frequency domain feature threshold of the underwater environment is less than the preset Threshold, it is determined that the environment in which the electronic device is currently located is an underwater environment.
若两个差值的绝对值均小于预设阈值,则可以进一步比较两个差值的绝对值的大小,将更小的差值的绝对值对应的环境,确定为电子设备当前所处的环境。If the absolute value of the two differences is less than the preset threshold, the absolute value of the two differences can be further compared, and the environment corresponding to the absolute value of the smaller difference is determined as the current environment of the electronic device .
在一个可选的实施例中,环境频域特征阈值包括水下环境的频域特征阈值和水上环境的频域特征阈值,该步骤102具体可以采用如下方式实现:In an optional embodiment, the environmental frequency domain characteristic threshold includes the frequency domain characteristic threshold of the underwater environment and the frequency domain characteristic threshold of the aquatic environment, and this step 102 may be implemented in the following manner:
确定第一频域特征差值,其中,第一频域特征差值是根据频域特征与水下环境的频域特征阈值之间的差值确定的;Determining a first frequency domain characteristic difference value, where the first frequency domain characteristic difference value is determined according to a difference between a frequency domain characteristic and a frequency domain characteristic threshold of the underwater environment;
确定第二频域特征差值,其中,第一频域特征差值是根据频域特征与水上环境的频域特征阈值之间的差值确定的;Determining a second frequency domain characteristic difference value, where the first frequency domain characteristic difference value is determined according to a difference between a frequency domain characteristic and a frequency domain characteristic threshold of the marine environment;
当第一频域特征差值小于或等于第二频域特征差值时,确定电子设备所处的环境为水下环境。When the first frequency domain characteristic difference value is less than or equal to the second frequency domain characteristic difference value, it is determined that the environment where the electronic device is located is an underwater environment.
具体的,对上述频域特征N n计算其与水上环境的频域特征阈值N Normal的距离dis_normal,其与水下环境的频域特征阈值N water的距离dis_water,如果dis_water小于dis_normal则认为目前处于水下环境,反之则处于水上环境,根据确定结果更新目前电子设备的状态。N n,N Normal和N water分别为长度为N的频域特征向量,距离可通过如下方式计算: Specifically, calculate the distance dis_normal between the frequency domain feature N n and the frequency domain feature threshold N Normal of the aquatic environment, and the distance dis_water from the frequency domain feature threshold N water of the underwater environment. If dis_water is less than dis_normal, it is considered that it is currently Underwater environment, otherwise it is in water environment, update the current electronic equipment status according to the determination result. N n , N Normal and N water are frequency domain feature vectors of length N respectively, and the distance can be calculated as follows:
Figure PCTCN2019130348-appb-000006
Figure PCTCN2019130348-appb-000006
Figure PCTCN2019130348-appb-000007
Figure PCTCN2019130348-appb-000007
其中,N n=(N n(1),N n(2),…N n(N));N Normal=(N Normal(1),N Normal(2),…N Normal(N);N water=(N water(1),N water(2),…N water(N))。 Among them, N n =(N n (1),N n (2),...N n (N)); N Normal =(N Normal (1),N Normal (2),...N Normal (N); N water = (N water (1), N water (2),...N water (N)).
在本实施例中采用了距离用来对所处环境进行分类,也可以使用其他方式对所处环境进行分类,其中包括聚类分析,自适应学习等方法进行分类。例如,对获取的频域特征、预先获取的水下环境的频域特征以及水上环境的频域特征,进行聚类处理,确定电子设备所处的环境是否为水下环境。In this embodiment, distance is used to classify the environment, and other methods can also be used to classify the environment, including cluster analysis, adaptive learning and other methods for classification. For example, clustering is performed on the acquired frequency domain features, the pre-acquired frequency domain features of the underwater environment, and the frequency domain features of the water environment to determine whether the environment in which the electronic device is located is an underwater environment.
上述方式中,方案实施容易,检测准确率高,检测速度快,鲁棒性好。In the above manner, the implementation of the solution is easy, the detection accuracy is high, the detection speed is fast, and the robustness is good.
另一种实现方式:Another way to achieve:
步骤1021b、将频域特征输入至预设的环境判别模型,以获取预设的环境判别模型输出的环境类型标签,其中,预设的环境判别模型是根据水下环境的频域特征和水上环境的频域特征优化得到的; Step 1021b: Input the frequency domain features into the preset environment discrimination model to obtain the environment type label output by the preset environment discrimination model, where the preset environment discrimination model is based on the frequency domain characteristics of the underwater environment and the water environment Optimized frequency domain characteristics;
步骤1022b、根据环境类型标签确定电子设备所处的环境是否为水下环境。Step 1022b: Determine whether the environment in which the electronic device is located is an underwater environment according to the environment type label.
具体的,可以通过水上环境的频域特征和水下环境的频域特征对预设的环境判别模型进行优化,即采集大量的不同情景下水上环境和水上环境的环境声音信号,提取出对应环境的频域特征,输入至预设的环境判别模型对该环境判别模型的参数进行优化。Specifically, the preset environment discrimination model can be optimized through the frequency domain characteristics of the aquatic environment and the frequency domain characteristics of the underwater environment, that is, collecting a large number of environmental sound signals of the aquatic environment and the aquatic environment in different scenarios, and extracting the corresponding environment The frequency domain characteristics of, input to the preset environment discrimination model to optimize the parameters of the environment discrimination model.
其中,环境判别模型可以基于神经网络、支持向量机分类算法模型、聚类算法等建立。Among them, the environment discrimination model can be established based on neural networks, support vector machine classification algorithm models, clustering algorithms, and so on.
将当前提取的电子设备的频域特征输入至优化得到的环境判别模型中,以获取输出的环境类型标签,进而根据该环境类型标签确定该电子设备所处的环境是否为水下环境。例如输出的环境类型标签为水下环境的标签,则确定该电子设备所处的环境为水下环境。Input the currently extracted frequency domain features of the electronic device into the optimized environment discrimination model to obtain the output environment type label, and then determine whether the environment in which the electronic device is located is an underwater environment according to the environment type label. For example, if the output environment type label is an underwater environment label, it is determined that the environment in which the electronic device is located is an underwater environment.
若输出的环境类型标签为水上环境的标签,则确定该电子设备所处的环境为水上环境。If the output environment type label is a water environment label, it is determined that the environment in which the electronic device is located is a water environment.
在其他实施例中,环境判别模型也可以输出环境类型的概率,例如根据概率的大小确定最终所处的环境。In other embodiments, the environment discrimination model may also output the probability of the environment type, for example, the final environment is determined according to the magnitude of the probability.
在一实施例中,预设的环境判别模型为神经网络模型,所述神经网络是由水下环境的频域特征和水上环境的频域特征训练得到的。In an embodiment, the preset environment discrimination model is a neural network model, and the neural network is trained on the frequency domain characteristics of the underwater environment and the frequency domain characteristics of the water environment.
在一实施例中,所述预设的环境判别模型为支持向量机分类算法模型。In an embodiment, the preset environment discrimination model is a support vector machine classification algorithm model.
具体的,预先多次将电子设备放置在不同的环境中,得到多组先验的环境声音信号的频域特征,水上环境的频域特征集合为A={N Normal(1),N Normal(2)…N Normal(l1)},集合A的标签为y i=+1,i∈[1,2,..,l1];水下环境的频域特征集合为B={N water(1),N water(2)…N water(l2)},集合B的标签为y j=-1,i∈[1,2,..,l2]。l1,l2一般设为均大于10,将所有数据随机混合,T={(x 1,y 1),(x 2,y 2),…,(x N,y N)},N=l1+l2,x i为指代N Normal(i)或者N water(i)。 Specifically, the electronic equipment is placed in different environments multiple times in advance to obtain multiple sets of priori frequency domain features of the environmental sound signal. The frequency domain feature set of the marine environment is A={N Normal (1), N Normal ( 2)...N Normal (l1)}, the label of the set A is y i =+1, i∈[1,2,..,l1]; the frequency domain feature set of the underwater environment is B={N water (1 ), N water (2)...N water (l2)}, the label of set B is y j = -1, i∈[1,2,..,l2]. l1,l2 are generally set to be greater than 10, and all data are randomly mixed, T={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x N ,y N )}, N=l1+ l2, x i refers to N Normal (i) or N water (i).
首先,选取适当的核函数K(例如核函数为高斯核函数)和适当参数C,构造并求解最优化问题:First, select an appropriate kernel function K (for example, the kernel function is a Gaussian kernel function) and appropriate parameters C, construct and solve the optimization problem:
Figure PCTCN2019130348-appb-000008
Figure PCTCN2019130348-appb-000008
求得最优解
Figure PCTCN2019130348-appb-000009
Find the optimal solution
Figure PCTCN2019130348-appb-000009
其次,选择α *的一个正分量0<α j<C,计算 Secondly, select a positive component of α * 0<α j <C, and calculate
Figure PCTCN2019130348-appb-000010
Figure PCTCN2019130348-appb-000010
再次,构造决策函数Again, construct the decision function
Figure PCTCN2019130348-appb-000011
Figure PCTCN2019130348-appb-000011
sign表示符号函数。sign represents a sign function.
最后,将当前工作周期提取的环境声音信号的频域特征,即作为x,输入上述决策函数f(x),输出为+1时,判断为水上环境,输出为-1时,判断为水下环境。Finally, take the frequency domain characteristics of the environmental sound signal extracted in the current working period as x, and input the above decision function f(x). When the output is +1, it is judged as an aquatic environment, and when the output is -1, it is judged as underwater surroundings.
本申请实施例的基于麦克风的入水检测方法,利用麦克风在水中和空气中的环境声音信号的频域特征(即环境噪声的频域特征)的明显差别进行对 比判别,确定电子设备所处的环境,采用该方案,可以复用大部分电子设备中所包含的麦克风,在不增加其他成本的情况下达到了快速入水检测的功能,具备实施容易,设备要求低,检测准确率高,检测速度快等优点。而且该方案的不同实施方式可以根据不同的电子设备,不同的软硬件平台进行部署实现。The microphone-based water entry detection method in the embodiment of the present application uses the obvious difference between the frequency domain characteristics of the environmental sound signal of the microphone in the water and the air (that is, the frequency domain characteristics of the environmental noise) for comparison and discrimination, and determines the environment in which the electronic device is located. , With this solution, the microphones contained in most electronic devices can be reused, and the function of rapid water entry detection is achieved without increasing other costs. It has easy implementation, low equipment requirements, high detection accuracy, and high detection speed. advantage. Moreover, different implementations of the solution can be deployed and implemented according to different electronic devices and different software and hardware platforms.
图6为本申请一实施例提供的电子设备的结构示意图。本实施例提供的电子设备,用于执行图2-图5任一所示实施例提供的入水检测方法。如图6所示,本实施例提供的电子设备,可以包括:麦克风61和处理器62。其中,麦克风61用于采集环境声音信号;处理器62配置为:FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the application. The electronic device provided in this embodiment is used to implement the water ingress detection method provided in any one of the embodiments shown in FIG. 2 to FIG. 5. As shown in FIG. 6, the electronic device provided in this embodiment may include: a microphone 61 and a processor 62. Among them, the microphone 61 is used to collect environmental sound signals; the processor 62 is configured as:
根据所述麦克风采集所述电子设备所处的环境的环境声音信号,提取所述环境声音信号的频域特征;Collecting, according to the microphone, the environmental sound signal of the environment in which the electronic device is located, and extracting the frequency domain characteristics of the environmental sound signal;
根据所述频域特征,确定所述电子设备所处的环境是否为水下环境。According to the frequency domain characteristics, it is determined whether the environment in which the electronic device is located is an underwater environment.
在一种可能的实现方式中,所述处理器62配置为:In a possible implementation manner, the processor 62 is configured to:
对所述环境声音信号进行采样处理,得到当前工作周期的一组数字声音信号,其中,所述一组数字声音信号包括至少一个第一数字声音信号子帧;Performing sampling processing on the environmental sound signal to obtain a group of digital sound signals of the current working cycle, wherein the group of digital sound signals includes at least one first digital sound signal subframe;
对各个所述第一数字声音信号子帧进行频域变换,得到各个所述第一数字声音信号子帧的频域幅值谱;Performing frequency domain transformation on each of the first digital sound signal subframes to obtain a frequency domain amplitude spectrum of each of the first digital sound signal subframes;
根据各个所述第二数字声音信号子帧的频域幅值谱,提取所述当前工作周期的频域特征,其中,所述第二数字声音信号子帧为所述第一数字声音信号子帧中时域特征幅值小于环境噪声判断阈值的数字声音信号子帧。According to the frequency domain amplitude spectrum of each of the second digital sound signal subframes, the frequency domain characteristics of the current working period are extracted, wherein the second digital sound signal subframe is the first digital sound signal subframe Digital sound signal sub-frames whose mid-time domain feature amplitude is less than the environmental noise judgment threshold.
在一种可能的实现方式中,所述处理器62配置为:In a possible implementation manner, the processor 62 is configured to:
若所述一组数字声音信号包括多个第一数字声音信号子帧,则将第二数字声音信号子帧的频域幅值谱的均值,作为所述当前工作周期的频域特征;If the set of digital sound signals includes a plurality of first digital sound signal subframes, the average value of the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current working period;
若所述一组数字声音信号包括一个第一数字声音信号子帧,则将所述第二数字声音信号子帧的频域幅值谱,作为所述当前周期的频域特征。If the set of digital sound signals includes a first digital sound signal subframe, the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current period.
在一种可能的实现方式中,所述处理器62配置为:In a possible implementation manner, the processor 62 is configured to:
若所述一组数字声音信号包括一个第一数字声音信号子帧,且所述第一数字声音信号子帧的幅值大于或等于所述环境噪声判断阈值,则根据所 述当前工作周期前的历史工作周期提取的频域特征,确定所述当前工作周期的频域特征。If the set of digital sound signals includes a first digital sound signal sub-frame, and the amplitude of the first digital sound signal sub-frame is greater than or equal to the environmental noise judgment threshold, then according to the current working period before The frequency domain feature extracted from the historical work cycle determines the frequency domain feature of the current work cycle.
在一种可能的实现方式中,所述处理器62配置为:In a possible implementation manner, the processor 62 is configured to:
若所述一组数字声音信号包括多个第一数字声音信号子帧时,确定多个第一数字声音信号子帧中每一个子帧的时域特征幅值,根据所述多个第一数字声音信号子帧的时域特征幅值得到所述当前工作周期的环境噪声判断阈值;If the set of digital sound signals includes a plurality of first digital sound signal subframes, the time domain characteristic amplitude of each subframe of the plurality of first digital sound signal subframes is determined, based on the plurality of first digital sound signal subframes. The time domain characteristic amplitude value of the sound signal subframe obtains the environmental noise judgment threshold value of the current working period;
若所述一组数字声音信号包括一个第一数字声音信号子帧时,确定所述一个第一数字声音信号子帧中的时域特征幅值和所述当前工作周期前的历史工作周期的第一数字信号子帧的时域特征幅值,根据所述一个第一数字声音信号子帧中的时域特征幅值和所述当前工作周期前的历史工作周期的第一数字信号子帧的时域特征幅值,得到所述当前工作周期的环境噪声判断阈值。If the set of digital sound signals includes a first digital sound signal sub-frame, determine the time domain characteristic amplitude in the one first digital sound signal sub-frame and the first historical working period before the current working period The time domain characteristic amplitude of a digital signal subframe is based on the time domain characteristic amplitude of the one first digital sound signal subframe and the time of the first digital signal subframe of the historical working period before the current working period The domain characteristic amplitude is used to obtain the environmental noise judgment threshold of the current working period.
在一种可能的实现方式中,所述处理器62配置为:In a possible implementation manner, the processor 62 is configured to:
获取环境频域特征阈值,其中,所述环境频域特征阈值是根据水下环境的频域特征阈值和水上环境的频域特征阈值中的至少一个确定的;Acquiring an environment frequency domain feature threshold, where the environment frequency domain feature threshold is determined according to at least one of the frequency domain feature threshold of the underwater environment and the frequency domain feature threshold of the aquatic environment;
根据所述环境频域特征阈值和所述频域特征确定所述电子设备所处的环境是否为水下环境。Determine whether the environment in which the electronic device is located is an underwater environment according to the environmental frequency domain characteristic threshold and the frequency domain characteristic.
在一种可能的实现方式中,所述环境频域特征阈值包括水下环境的频域特征阈值和水上环境的频域特征阈值,所述处理器62配置为:In a possible implementation, the environmental frequency domain characteristic threshold includes the frequency domain characteristic threshold of the underwater environment and the frequency domain characteristic threshold of the marine environment, and the processor 62 is configured to:
确定第一频域特征差值,其中,所述第一频域特征差值是根据所述频域特征与所述水下环境的频域特征阈值之间的差值确定的;Determining a first frequency domain characteristic difference value, wherein the first frequency domain characteristic difference value is determined according to a difference value between the frequency domain characteristic and a frequency domain characteristic threshold value of the underwater environment;
确定第二频域特征差值,其中,所述第一频域特征差值是根据所述频域特征与所述水上环境的频域特征阈值之间的差值确定的;Determining a second frequency domain characteristic difference value, wherein the first frequency domain characteristic difference value is determined according to a difference value between the frequency domain characteristic and the frequency domain characteristic threshold of the marine environment;
当所述第一频域特征差值小于或等于所述第二频域特征差值时,确定所述电子设备所处的环境为所述水下环境。When the first frequency domain characteristic difference value is less than or equal to the second frequency domain characteristic difference value, it is determined that the environment where the electronic device is located is the underwater environment.
在一种可能的实现方式中,所述处理器62配置为:In a possible implementation manner, the processor 62 is configured to:
将所述频域特征输入至预设的环境判别模型,以获取预设的环境判别模型输出的环境类型标签,其中,所述预设的环境判别模型是根据水下环境的频域特征和水上环境的频域特征优化得到的;Input the frequency domain features into a preset environment discrimination model to obtain the environment type label output by the preset environment discrimination model, wherein the preset environment discrimination model is based on the frequency domain characteristics of the underwater environment and the water Optimized the frequency domain characteristics of the environment;
根据所述环境类型标签确定所述电子设备所处的环境是否为水下环 境。Determine whether the environment in which the electronic device is located is an underwater environment according to the environment type label.
在一种可能的实现方式中,所述预设的环境判别模型为神经网络模型。In a possible implementation manner, the preset environment discrimination model is a neural network model.
在一种可能的实现方式中,所述预设的环境判别模型为支持向量机分类算法模型。In a possible implementation manner, the preset environment discrimination model is a support vector machine classification algorithm model.
在一种可能的实现方式中,如图7所示,该电子设备还可以包括成像组件63,用于拍摄图像或视频,可选的,还可以包括存储器用于存储处理器可执行的指令,和/或成像组件拍摄的图像或视频数据。处理器62配置为:In a possible implementation manner, as shown in FIG. 7, the electronic device may further include an imaging component 63 for shooting images or videos, and optionally, a memory for storing instructions executable by the processor. And/or image or video data captured by the imaging component. The processor 62 is configured as:
当确定所述成像组件处于水下环境时,调节所述成像组件的成像参数。When it is determined that the imaging component is in an underwater environment, the imaging parameters of the imaging component are adjusted.
本实施例提供的电子设备,用于执行图2-图5任一实施例提供的入水检测方法,技术原理和技术效果相似,此处不再赘述。The electronic device provided in this embodiment is used to implement the water ingress detection method provided in any of the embodiments in FIG. 2 to FIG. 5. The technical principles and technical effects are similar, and will not be repeated here.
本申请实施例中还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现前述方法实施例中对应的方法,其具体实施过程可以参见前述方法实施例,其实现原理和技术效果类似,此处不再赘述。The embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the corresponding method in the foregoing method embodiment is implemented. For the specific implementation process, please refer to the foregoing method implementation. For example, the implementation principles and technical effects are similar, so I won’t repeat them here.
本申请实施例中还提供一种程序产品,该程序产品包括计算机程序(即执行指令),该计算机程序存储在可读存储介质中。处理器可以从可读存储介质读取该计算机程序,处理器执行该计算机程序用于执行前述方法实施例中任一实施方式提供的入水检测方法。The embodiments of the present application also provide a program product. The program product includes a computer program (that is, an execution instruction), and the computer program is stored in a readable storage medium. The processor can read the computer program from a readable storage medium, and the processor executes the computer program to execute the water entry detection method provided by any one of the foregoing method embodiments.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A person of ordinary skill in the art can understand that all or part of the steps in the foregoing method embodiments can be implemented by a program instructing relevant hardware. The aforementioned program can be stored in a computer readable storage medium. When the program is executed, it executes the steps including the foregoing method embodiments; and the foregoing storage medium includes: ROM, RAM, magnetic disk, or optical disk and other media that can store program codes.
最后应说明的是:以上各实施例仅用以说明本申请实施例的技术方案,而非对其限制;尽管参照前述各实施例对本申请实施例进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, not to limit them; although the embodiments of the present application are described in detail with reference to the foregoing embodiments, those of ordinary skill in the art It should be understood that: it can still modify the technical solutions described in the foregoing embodiments, or equivalently replace some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the embodiments of this application. The scope of the technical solution.

Claims (23)

  1. 一种入水检测方法,其特征在于,应用于电子设备,所述电子设备设置有麦克风,所述方法包括:A water ingress detection method, characterized in that it is applied to an electronic device, the electronic device is provided with a microphone, and the method includes:
    根据所述麦克风采集的所述电子设备所处的环境的环境声音信号,提取所述环境声音信号的频域特征;Extracting the frequency domain characteristics of the environmental sound signal according to the environmental sound signal of the environment in which the electronic device is located collected by the microphone;
    根据所述频域特征,确定所述电子设备所处的环境是否为水下环境。According to the frequency domain characteristics, it is determined whether the environment in which the electronic device is located is an underwater environment.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述麦克风采集所述电子设备所处的环境的环境声音信号,提取所述环境声音信号的频域特征,包括:The method according to claim 1, wherein the collecting, according to the microphone, the environmental sound signal of the environment in which the electronic device is located, and extracting the frequency domain characteristics of the environmental sound signal, comprises:
    对所述环境声音信号进行采样处理,得到当前工作周期的一组数字声音信号,其中,所述一组数字声音信号包括至少一个第一数字声音信号子帧;Performing sampling processing on the environmental sound signal to obtain a group of digital sound signals of the current working cycle, wherein the group of digital sound signals includes at least one first digital sound signal subframe;
    对各个所述第一数字声音信号子帧进行频域变换,得到各个所述第一数字声音信号子帧的频域幅值谱;Performing frequency domain transformation on each of the first digital sound signal subframes to obtain a frequency domain amplitude spectrum of each of the first digital sound signal subframes;
    根据各个第二数字声音信号子帧的频域幅值谱,提取所述当前工作周期的频域特征,其中,所述第二数字声音信号子帧为所述第一数字声音信号子帧中时域特征幅值小于环境噪声判断阈值的数字声音信号子帧。According to the frequency domain amplitude spectrum of each second digital sound signal subframe, the frequency domain characteristics of the current working cycle are extracted, wherein the second digital sound signal subframe is the time in the first digital sound signal subframe. The sub-frame of the digital sound signal whose domain feature amplitude is less than the environmental noise judgment threshold.
  3. 根据权利要求2所述的方法,其特征在于,所述根据第二数字声音信号子帧的频域幅值谱,提取所述当前工作周期的频域特征,包括:The method according to claim 2, wherein the extracting the frequency domain characteristic of the current working period according to the frequency domain amplitude spectrum of the second digital sound signal subframe comprises:
    若所述一组数字声音信号包括多个第一数字声音信号子帧,则将第二数字声音信号子帧的频域幅值谱的均值,作为所述当前工作周期的频域特征;If the set of digital sound signals includes a plurality of first digital sound signal subframes, the average value of the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current working period;
    若所述一组数字声音信号包括一个第一数字声音信号子帧,则将所述第二数字声音信号子帧的频域幅值谱,作为所述当前周期的频域特征。If the set of digital sound signals includes a first digital sound signal subframe, the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current period.
  4. 根据权利要求3所述的方法,其特征在于,还包括:The method according to claim 3, further comprising:
    若所述一组数字声音信号包括一个第一数字声音信号子帧,且所述第一数字声音信号子帧的幅值大于或等于所述环境噪声判断阈值,则根据所述当前工作周期前的历史工作周期提取的频域特征,确定所述当前工作周期的频域特征。If the set of digital sound signals includes a first digital sound signal sub-frame, and the amplitude of the first digital sound signal sub-frame is greater than or equal to the environmental noise judgment threshold, then according to the current working period before The frequency domain feature extracted from the historical duty cycle determines the frequency domain feature of the current duty cycle.
  5. 根据权利要求2-4任一项所述的方法,其特征在于,还包括:The method according to any one of claims 2-4, further comprising:
    若所述一组数字声音信号包括多个第一数字声音信号子帧时,确定多个第一数字声音信号子帧中每一个子帧的时域特征幅值,根据所述多个第一数字声音信号子帧的时域特征幅值得到所述当前工作周期的环境噪声判断阈值;If the set of digital sound signals includes a plurality of first digital sound signal subframes, the time domain characteristic amplitude of each subframe of the plurality of first digital sound signal subframes is determined, based on the plurality of first digital sound signal subframes. The time domain characteristic amplitude value of the sound signal subframe obtains the environmental noise judgment threshold value of the current working period;
    若所述一组数字声音信号包括一个第一数字声音信号子帧时,确定所述一个第一数字声音信号子帧中的时域特征幅值和所述当前工作周期前的历史工作周期的第一数字信号子帧的时域特征幅值,根据所述一个第一数字声音信号子帧中的时域特征幅值和所述当前工作周期前的历史工作周期的第一数字信号子帧的时域特征幅值,得到所述当前工作周期的环境噪声判断阈值。If the set of digital sound signals includes a first digital sound signal sub-frame, determine the time domain characteristic amplitude in the one first digital sound signal sub-frame and the first historical working period before the current working period The time domain characteristic amplitude of a digital signal subframe is based on the time domain characteristic amplitude of the one first digital sound signal subframe and the time of the first digital signal subframe of the historical working period before the current working period The domain characteristic amplitude is used to obtain the environmental noise judgment threshold of the current working period.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述根据所述频域特征,确定所述电子设备所处的环境是否为水下环境,包括:The method according to any one of claims 1 to 5, wherein the determining whether the environment in which the electronic device is located is an underwater environment according to the frequency domain characteristics comprises:
    获取环境频域特征阈值,其中,所述环境频域特征阈值是根据水下环境的频域特征阈值和水上环境的频域特征阈值中的至少一个确定的;Acquiring an environment frequency domain feature threshold, where the environment frequency domain feature threshold is determined according to at least one of the frequency domain feature threshold of the underwater environment and the frequency domain feature threshold of the aquatic environment;
    根据所述环境频域特征阈值和所述频域特征确定所述电子设备所处的环境是否为水下环境。Determine whether the environment in which the electronic device is located is an underwater environment according to the environmental frequency domain characteristic threshold and the frequency domain characteristic.
  7. 根据权利要求6所述的方法,其特征在于,所述环境频域特征阈值包括水下环境的频域特征阈值和水上环境的频域特征阈值,其中,所述根据所述环境频域特征阈值和所述频域特征确定所述电子设备所处的环境是否为水下环境,包括:The method according to claim 6, wherein the environmental frequency domain characteristic threshold includes a frequency domain characteristic threshold of an underwater environment and a frequency domain characteristic threshold of an aquatic environment, wherein the threshold is based on the frequency domain characteristic of the environment And the frequency domain characteristics to determine whether the environment in which the electronic device is located is an underwater environment, including:
    确定第一频域特征差值,其中,所述第一频域特征差值是根据所述频域特征与所述水下环境的频域特征阈值之间的差值确定的;Determining a first frequency domain characteristic difference value, wherein the first frequency domain characteristic difference value is determined according to a difference value between the frequency domain characteristic and a frequency domain characteristic threshold value of the underwater environment;
    确定第二频域特征差值,其中,所述第一频域特征差值是根据所述频域特征与所述水上环境的频域特征阈值之间的差值确定的;Determining a second frequency domain characteristic difference value, wherein the first frequency domain characteristic difference value is determined according to a difference value between the frequency domain characteristic and the frequency domain characteristic threshold of the marine environment;
    当所述第一频域特征差值小于或等于所述第二频域特征差值时,确定所述电子设备所处的环境为所述水下环境。When the first frequency domain characteristic difference value is less than or equal to the second frequency domain characteristic difference value, it is determined that the environment where the electronic device is located is the underwater environment.
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述根据所述频域特征,确定所述电子设备所处的环境是否为水下环境,包括:The method according to any one of claims 1 to 7, wherein the determining whether the environment in which the electronic device is located is an underwater environment according to the frequency domain characteristics comprises:
    将所述频域特征输入至预设的环境判别模型,以获取预设的环境判别模型输出的环境类型标签,其中,所述预设的环境判别模型是根据水下环境的频域特征和水上环境的频域特征优化得到的;Input the frequency domain features into a preset environment discrimination model to obtain the environment type label output by the preset environment discrimination model, wherein the preset environment discrimination model is based on the frequency domain characteristics of the underwater environment and the water Optimized the frequency domain characteristics of the environment;
    根据所述环境类型标签确定所述电子设备所处的环境是否为水下环境。Determine whether the environment in which the electronic device is located is an underwater environment according to the environment type tag.
  9. 根据权利要求8所述的方法,其特征在于,所述预设的环境判别模型为神经网络模型。The method according to claim 8, wherein the preset environment discrimination model is a neural network model.
  10. 根据权利要求8所述的方法,其特征在于,所述预设的环境判别模型为支持向量机分类算法模型。The method according to claim 8, wherein the preset environment discrimination model is a support vector machine classification algorithm model.
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述电子设备包括成像组件,所述方法还包括:The method according to any one of claims 1-10, wherein the electronic device comprises an imaging component, and the method further comprises:
    当确定所述成像组件处于水下环境时,调节所述成像组件的成像参数。When it is determined that the imaging component is in an underwater environment, the imaging parameters of the imaging component are adjusted.
  12. 一种电子设备,其特征在于,包括:麦克风、处理器;An electronic device, characterized by comprising: a microphone and a processor;
    所述麦克风,用于采集环境声音信号;The microphone is used to collect environmental sound signals;
    所述处理器配置为:The processor is configured as:
    根据所述麦克风采集所述电子设备所处的环境的环境声音信号,提取所述环境声音信号的频域特征;Collecting, according to the microphone, the environmental sound signal of the environment in which the electronic device is located, and extracting the frequency domain characteristics of the environmental sound signal;
    根据所述频域特征,确定所述电子设备所处的环境是否为水下环境。According to the frequency domain characteristics, it is determined whether the environment in which the electronic device is located is an underwater environment.
  13. 根据权利要求12所述的电子设备,其特征在于,所述处理器配置为:The electronic device according to claim 12, wherein the processor is configured to:
    对所述环境声音信号进行采样处理,得到当前工作周期的一组数字声音信号,其中,所述一组数字声音信号包括至少一个第一数字声音信号子帧;Performing sampling processing on the environmental sound signal to obtain a group of digital sound signals of the current working cycle, wherein the group of digital sound signals includes at least one first digital sound signal subframe;
    对各个所述第一数字声音信号子帧进行频域变换,得到各个所述第一数字声音信号子帧的频域幅值谱;Performing frequency domain transformation on each of the first digital sound signal subframes to obtain a frequency domain amplitude spectrum of each of the first digital sound signal subframes;
    根据各个第二数字声音信号子帧的频域幅值谱,提取所述当前工作周期的频域特征,其中,所述第二数字声音信号子帧为所述第一数字声音信号子帧中时域特征幅值小于环境噪声判断阈值的数字声音信号子帧。According to the frequency domain amplitude spectrum of each second digital sound signal subframe, the frequency domain characteristics of the current working cycle are extracted, wherein the second digital sound signal subframe is the time in the first digital sound signal subframe. The sub-frame of the digital sound signal whose domain feature amplitude is less than the environmental noise judgment threshold.
  14. 根据权利要求13所述的电子设备,其特征在于,所述处理器配置为:The electronic device according to claim 13, wherein the processor is configured to:
    若所述一组数字声音信号包括多个第一数字声音信号子帧,则将第二数字声音信号子帧的频域幅值谱的均值,作为所述当前工作周期的频域特征;If the set of digital sound signals includes a plurality of first digital sound signal subframes, the average value of the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current working period;
    若所述一组数字声音信号包括一个第一数字声音信号子帧,则将所述第二数字声音信号子帧的频域幅值谱,作为所述当前周期的频域特征。If the set of digital sound signals includes a first digital sound signal subframe, the frequency domain amplitude spectrum of the second digital sound signal subframe is used as the frequency domain characteristic of the current period.
  15. 根据权利要求14所述的电子设备,其特征在于,所述处理器配置为:The electronic device according to claim 14, wherein the processor is configured to:
    若所述一组数字声音信号包括一个第一数字声音信号子帧,且所述第一数字声音信号子帧的幅值大于或等于所述环境噪声判断阈值,则根据所述当前工作周期前的历史工作周期提取的频域特征,确定所述当前工作周期的频域特征。If the set of digital sound signals includes a first digital sound signal sub-frame, and the amplitude of the first digital sound signal sub-frame is greater than or equal to the environmental noise judgment threshold, then according to the current working period before The frequency domain feature extracted from the historical work cycle determines the frequency domain feature of the current work cycle.
  16. 根据权利要求13-15任一项所述的电子设备,其特征在于,所述处理器配置为:The electronic device according to any one of claims 13-15, wherein the processor is configured to:
    若所述一组数字声音信号包括多个第一数字声音信号子帧时,确定多个第一数字声音信号子帧中每一个子帧的时域特征幅值,根据所述多个第一数字声音信号子帧的时域特征幅值得到所述当前工作周期的环境噪声判断阈值;If the set of digital sound signals includes a plurality of first digital sound signal subframes, the time domain characteristic amplitude of each subframe of the plurality of first digital sound signal subframes is determined, based on the plurality of first digital sound signal subframes. The time domain characteristic amplitude value of the sound signal subframe obtains the environmental noise judgment threshold value of the current working period;
    若所述一组数字声音信号包括一个第一数字声音信号子帧时,确定所述一个第一数字声音信号子帧中的时域特征幅值和所述当前工作周期前的历史工作周期的第一数字信号子帧的时域特征幅值,根据所述一个第一数字声音信号子帧中的时域特征幅值和所述当前工作周期前的历史工作周期的第一数字信号子帧的时域特征幅值,得到所述当前工作周期的环境噪声判断阈值。If the set of digital sound signals includes a first digital sound signal sub-frame, determine the time domain characteristic amplitude in the one first digital sound signal sub-frame and the first historical working period before the current working period The time domain characteristic amplitude of a digital signal subframe is based on the time domain characteristic amplitude of the one first digital sound signal subframe and the time of the first digital signal subframe of the historical working period before the current working period The domain characteristic amplitude is used to obtain the environmental noise judgment threshold of the current working period.
  17. 根据权利要求12-16任一项所述的电子设备,其特征在于,所述处理器配置为:The electronic device according to any one of claims 12-16, wherein the processor is configured to:
    获取环境频域特征阈值,其中,所述环境频域特征阈值是根据水下环境的频域特征阈值和水上环境的频域特征阈值中的至少一个确定的;Acquiring an environment frequency domain feature threshold, where the environment frequency domain feature threshold is determined according to at least one of the frequency domain feature threshold of the underwater environment and the frequency domain feature threshold of the aquatic environment;
    根据所述环境频域特征阈值和所述频域特征确定所述电子设备所处的环境是否为水下环境。Determine whether the environment in which the electronic device is located is an underwater environment according to the environmental frequency domain characteristic threshold and the frequency domain characteristic.
  18. 根据权利要求17所述的电子设备,其特征在于,所述环境频域特征阈值包括水下环境的频域特征阈值和水上环境的频域特征阈值,所述处理器配置为:The electronic device according to claim 17, wherein the environmental frequency domain characteristic threshold includes a frequency domain characteristic threshold of an underwater environment and a frequency domain characteristic threshold of an aquatic environment, and the processor is configured to:
    确定第一频域特征差值,其中,所述第一频域特征差值是根据所述频域特征与所述水下环境的频域特征阈值之间的差值确定的;Determining a first frequency domain characteristic difference value, wherein the first frequency domain characteristic difference value is determined according to a difference value between the frequency domain characteristic and a frequency domain characteristic threshold value of the underwater environment;
    确定第二频域特征差值,其中,所述第一频域特征差值是根据所述频域特征与所述水上环境的频域特征阈值之间的差值确定的;Determining a second frequency domain characteristic difference value, wherein the first frequency domain characteristic difference value is determined according to a difference value between the frequency domain characteristic and the frequency domain characteristic threshold of the marine environment;
    当所述第一频域特征差值小于或等于所述第二频域特征差值时,确定所述电子设备所处的环境为所述水下环境。When the first frequency domain characteristic difference value is less than or equal to the second frequency domain characteristic difference value, it is determined that the environment where the electronic device is located is the underwater environment.
  19. 根据权利要求12-18任一项所述的电子设备,其特征在于,所述处理器配置为:The electronic device according to any one of claims 12-18, wherein the processor is configured to:
    将所述频域特征输入至预设的环境判别模型,以获取预设的环境判别模型输出的环境类型标签,其中,所述预设的环境判别模型是根据水下环境的频域特征和水上环境的频域特征优化得到的;Input the frequency domain features into a preset environment discrimination model to obtain the environment type label output by the preset environment discrimination model, wherein the preset environment discrimination model is based on the frequency domain characteristics of the underwater environment and the water Optimized the frequency domain characteristics of the environment;
    根据所述环境类型标签确定所述电子设备所处的环境是否为水下环境。Determine whether the environment in which the electronic device is located is an underwater environment according to the environment type tag.
  20. 根据权利要求19所述的电子设备,其特征在于,所述预设的环境判别模型为神经网络模型。The electronic device according to claim 19, wherein the preset environment discrimination model is a neural network model.
  21. 根据权利要求19所述的电子设备,其特征在于,所述预设的环境判别模型为支持向量机分类算法模型。The electronic device according to claim 19, wherein the preset environment discrimination model is a support vector machine classification algorithm model.
  22. 根据权利要求12-21任一项所述的电子设备,其特征在于,所述电子设备包括成像组件,所述处理器配置为:The electronic device according to any one of claims 12-21, wherein the electronic device comprises an imaging component, and the processor is configured to:
    当确定所述成像组件处于水下环境时,调节所述成像组件的成像参数。When it is determined that the imaging component is in an underwater environment, the imaging parameters of the imaging component are adjusted.
  23. 一种存储介质,其特征在于,包括:可读存储介质和计算机程序,所述计算机程序用于实现如权利要求1-11中任一项所述的入水检测方法。A storage medium, comprising: a readable storage medium and a computer program, the computer program being used to implement the water entry detection method according to any one of claims 1-11.
PCT/CN2019/130348 2019-12-31 2019-12-31 Underwater detection method, device, and storage medium WO2021134409A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/130348 WO2021134409A1 (en) 2019-12-31 2019-12-31 Underwater detection method, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/130348 WO2021134409A1 (en) 2019-12-31 2019-12-31 Underwater detection method, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021134409A1 true WO2021134409A1 (en) 2021-07-08

Family

ID=76686326

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/130348 WO2021134409A1 (en) 2019-12-31 2019-12-31 Underwater detection method, device, and storage medium

Country Status (1)

Country Link
WO (1) WO2021134409A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101403636A (en) * 2008-10-21 2009-04-08 杭州电子科技大学 River tidal surge detection method based on audio characteristic recognition
US20120194345A1 (en) * 2011-01-27 2012-08-02 Icom Incorporated Portable electronic device
CN105899965A (en) * 2014-08-29 2016-08-24 深圳市大疆创新科技有限公司 Unmanned aerial vehicle (UAV) for collecting audio data
CN106357935A (en) * 2016-11-29 2017-01-25 维沃移动通信有限公司 Mobile terminal mode switching method and mobile terminal
CN106873716A (en) * 2017-02-28 2017-06-20 上海斐讯数据通信技术有限公司 A kind of wearable device enters water detection means and method and a kind of wearable device
CN107181854A (en) * 2017-02-27 2017-09-19 惠州Tcl移动通信有限公司 Mobile terminal accurately judges whether into water and the method for opening marine mode automatically
CN109212612A (en) * 2017-07-07 2019-01-15 三星电子株式会社 Water identifying system, the electronic equipment including the system and the method for thus identifying water
CN109655921A (en) * 2018-11-30 2019-04-19 歌尔股份有限公司 A kind of electronic equipment and its enter water detection method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101403636A (en) * 2008-10-21 2009-04-08 杭州电子科技大学 River tidal surge detection method based on audio characteristic recognition
US20120194345A1 (en) * 2011-01-27 2012-08-02 Icom Incorporated Portable electronic device
CN105899965A (en) * 2014-08-29 2016-08-24 深圳市大疆创新科技有限公司 Unmanned aerial vehicle (UAV) for collecting audio data
CN106357935A (en) * 2016-11-29 2017-01-25 维沃移动通信有限公司 Mobile terminal mode switching method and mobile terminal
CN107181854A (en) * 2017-02-27 2017-09-19 惠州Tcl移动通信有限公司 Mobile terminal accurately judges whether into water and the method for opening marine mode automatically
CN106873716A (en) * 2017-02-28 2017-06-20 上海斐讯数据通信技术有限公司 A kind of wearable device enters water detection means and method and a kind of wearable device
CN109212612A (en) * 2017-07-07 2019-01-15 三星电子株式会社 Water identifying system, the electronic equipment including the system and the method for thus identifying water
CN109655921A (en) * 2018-11-30 2019-04-19 歌尔股份有限公司 A kind of electronic equipment and its enter water detection method

Similar Documents

Publication Publication Date Title
WO2021184894A1 (en) Deblurred face recognition method and system and inspection robot
WO2022127180A1 (en) Target tracking method and apparatus, and electronic device and storage medium
WO2019233263A1 (en) Method for video processing, electronic device and computer-readable storage medium
CN109788190B (en) Image processing method and device, mobile terminal and storage medium
WO2014201971A1 (en) Object detection method and device for online training
WO2021082921A1 (en) Back cover appearance defect detection method for electronic apparatus, and apparatus
CN111462185A (en) Tracker assisted image capture
WO2021047408A1 (en) Image processing method and apparatus, storage medium, and electronic device
JP2016015045A (en) Image recognition device, image recognition method, and program
CN113034384A (en) Video processing method, video processing device, electronic equipment and storage medium
CN110837758B (en) Keyword input method and device and electronic equipment
CN112150457A (en) Video detection method, device and computer readable storage medium
US11373277B2 (en) Motion detection method and image processing device for motion detection
WO2021134409A1 (en) Underwater detection method, device, and storage medium
CN113011433B (en) Filtering parameter adjusting method and device
CN112289337A (en) Method and device for filtering residual noise after machine learning voice enhancement
CN112884147A (en) Neural network training method, image processing method, device and electronic equipment
US11875800B2 (en) Talker prediction method, talker prediction device, and communication system
US20220148193A1 (en) Adaptive object recognition apparatus and method in fixed closed circuit television edge terminal using network
US11322137B2 (en) Video camera
KR20180041072A (en) Device and method for audio frame processing
CN110336943B (en) Scene recognition method and device
CN112653979A (en) Adaptive dereverberation method and device
CN113810610A (en) Object snapshot method and device
CN109087351B (en) Method and device for carrying out closed-loop detection on scene picture based on depth information

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19958443

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19958443

Country of ref document: EP

Kind code of ref document: A1