Method, device and equipment for detecting a dual-tone multi-frequency signal and storage medium

CN122715733BActive Publication Date: 2026-10-30SHENZHEN DINSTAR TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611218103.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-10-30
Estimated Expiration
2046-08-12

AI Technical Summary

Technical Problem

[0004]本申请的主要目的在于提供一种双音多频信号的检测方法、装置、设备以及存储介质,旨在解决如何提高双音多频信号检测的准确性的技术问题

Benefits of technology

[0016]本申请提供了一种双音多频信号的检测方法,本申请获取会话边界控制器输出的多路双音多频信号音频流;对所述多路双音多频信号音频进行时间同步与特征提取,得到每路双音多频信号音频流的特征序列;对所述特征序列执行自注意力计算,生成中间特征序列;对所述中间特征序列执行连接时序分类解码处理,生成每路音频流的按键符号序列,并输出所述按键符号序列;实时计算每路双音多频信号音频流的信号噪声比;根据所述信号噪声比确定置信度阈值;获取所述按键符号序列中每个符号的置信度分数;将所述置信度分数低于所述置信度阈值的符号从所述按键符号序列中滤除,得到过滤后的按键符号序列。本申请采用的是自注意力计算与分类解码处理,能够捕捉信号的全局特征,减低环境噪音的干扰,从而提高双音多频信号检测的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122715733B_ABST
    Figure CN122715733B_ABST
Patent Text Reader

Abstract

The application discloses a dual-tone multi-frequency signal detection method, device and equipment and a storage medium, relates to the technical field of signal detection, and comprises the following steps: acquiring a multi-channel dual-tone multi-frequency signal audio stream output by a session border controller; performing time synchronization and feature extraction on the multi-channel dual-tone multi-frequency signal audio to obtain a feature sequence of each channel of the dual-tone multi-frequency signal audio stream; performing self-attention calculation on the feature sequence to generate an intermediate feature sequence; performing connection time sequence classification decoding processing on the intermediate feature sequence to generate a key symbol sequence of each channel of the audio stream, and outputting the key symbol sequence; acquiring a confidence score of each symbol in the key symbol sequence; filtering out symbols with a confidence score lower than a confidence threshold from the key symbol sequence to obtain a filtered key symbol sequence. The application can improve the accuracy of dual-tone multi-frequency signal detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of signal detection technology, and in particular to a method, apparatus, device, and storage medium for detecting dual-tone multi-frequency signals. Background Technology

[0002] Dual-Tone Multi-Frequency (DTMF) signal detection technology is widely used in customer service systems, remote communication, and smart terminal control. As a crucial carrier of user interaction commands, the accuracy of DTMF signal detection directly impacts communication quality. Currently, DTMF signal detection suffers from weak anti-interference capabilities. In high-concurrency scenarios, factors such as the superposition of multiple audio streams, environmental noise, and network transmission distortion can reduce the signal-to-noise ratio, leading to low detection accuracy. Therefore, improving the accuracy of DTMF signal detection remains a challenge.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this application is to provide a method, apparatus, device, and storage medium for detecting dual-tone multi-frequency (DTMF) signals, aiming to solve the technical problem of how to improve the accuracy of DTMF signal detection.

[0005] To achieve the above objectives, this application proposes a method for detecting dual-tone multi-frequency (DTMF) signals, the method comprising: Acquire the multi-channel dual-tone multi-frequency (DTMF) audio stream output from the session boundary controller; Time synchronization and feature extraction are performed on the multi-channel dual-tone multi-frequency (DTMF) audio signals to obtain the feature sequence of each DTMF audio stream. Perform self-attention computation on the feature sequence to generate an intermediate feature sequence; Perform connection timing classification decoding processing on the intermediate feature sequence to generate a key symbol sequence for each audio stream, and output the key symbol sequence; Real-time calculation of the signal-to-noise ratio of each dual-tone multi-frequency (DTMF) audio stream; The confidence threshold is determined based on the signal-to-noise ratio. Obtain the confidence score for each symbol in the key symbol sequence; Symbols with confidence scores lower than the confidence threshold are filtered out from the key symbol sequence to obtain a filtered key symbol sequence.

[0006] In one embodiment, the step of performing time synchronization and feature extraction on the multi-channel dual-tone multi-frequency (DTMF) audio signals to obtain a feature sequence for each DTMF audio stream includes: The timestamp information of each dual-tone multi-frequency signal audio stream is obtained, and the multiple audio streams are aligned to the same time axis according to the timestamp information to obtain a synchronized audio stream; The synchronous audio stream is segmented into frames to obtain multiple consecutive audio frames, and Mel frequency cepstral coefficient features are extracted from each of the audio frames. The first-order and second-order differences of the Mel frequency cepstral coefficient features are calculated to generate a difference feature vector; The Mel frequency cepstral coefficient features are concatenated with the difference feature vector to obtain a multidimensional feature vector; The multidimensional feature vectors of multiple consecutive frames are concatenated in chronological order to obtain the feature sequence of each dual-tone multi-frequency signal audio stream.

[0007] In one embodiment, the step of performing self-attention computation on the feature sequence to generate an intermediate feature sequence includes: The feature sequence is linearly transformed and mapped to an embedding vector, and positional encoding is added to the embedding vector to obtain a temporal embedding sequence; A multi-head self-attention layer is used to perform global dependency modeling on the temporal embedding sequence to obtain an attention feature sequence; The attention feature sequence is nonlinearly transformed using a feedforward network to obtain an intermediate feature sequence.

[0008] In one embodiment, the step of performing connection timing classification decoding processing on the intermediate feature sequence to generate a key symbol sequence for each audio stream includes: The intermediate feature sequence is mapped to a probability vector for each frame, and each component in the probability vector corresponds to the probability of a dual-tone multi-frequency symbol category; The component with the highest probability in the probability vector of each frame is determined as the output label, thus obtaining a frame-level label sequence; The frame-level tag sequence is compressed to generate a key symbol sequence.

[0009] In one embodiment, the step of performing sequence compression processing on the frame-level tag sequence to generate a key symbol sequence includes: Merge the identical tags that appear consecutively in the frame-level tag sequence into one tag; Delete whitespace tags from the frame-level tag sequence; The merged and deleted label sequence is determined as the key symbol sequence.

[0010] In one embodiment, the step of determining the confidence threshold based on the signal-to-noise ratio includes: The signal-to-noise ratio is compared with a first preset threshold and a second preset threshold, wherein the first preset threshold is greater than the second preset threshold; When the signal-to-noise ratio is greater than or equal to the first preset threshold, the first preset confidence threshold is determined as the confidence threshold. When the signal-to-noise ratio is less than the second preset threshold, the second preset confidence threshold is determined as the confidence threshold, and the first preset confidence threshold is greater than the second preset confidence threshold; When the signal-to-noise ratio is greater than or equal to the second preset threshold and less than the first preset threshold, linear interpolation is performed on the first preset confidence threshold and the second preset confidence threshold based on the signal-to-noise ratio to obtain the interpolation result, and the interpolation result is determined as the confidence threshold.

[0011] In one embodiment, prior to the step of performing self-attention computation on the feature sequence, the method further includes: According to a preset frame shift step size, multiple fixed-length subsequences are extracted sequentially from the feature sequence; The multiple subsequences are used as input data for the self-attention calculation operation.

[0012] Furthermore, to achieve the above objectives, this application also proposes a dual-tone multi-frequency (DTMF) signal detection device, which includes: The acquisition module is used to acquire the multi-channel dual-tone multi-frequency (DTMF) audio stream output by the session boundary controller. The extraction module is used to perform time synchronization and feature extraction on the multi-channel dual-tone multi-frequency signal audio to obtain the feature sequence of each dual-tone multi-frequency signal audio stream; The calculation module is used to perform self-attention calculation on the feature sequence to generate an intermediate feature sequence; The output module is used to perform connection timing classification decoding processing on the intermediate feature sequence, generate a key symbol sequence for each audio stream, and output the key symbol sequence. The real-time module is used to calculate the signal-to-noise ratio of each dual-tone multi-frequency (DTMF) audio stream in real time. The determination module is used to determine a confidence threshold based on the signal-to-noise ratio; The confidence module is used to obtain the confidence score of each symbol in the key symbol sequence; A filtering module is used to filter out symbols with confidence scores lower than the confidence threshold from the key symbol sequence to obtain a filtered key symbol sequence.

[0013] In addition, to achieve the above objectives, this application also proposes a dual-tone multi-frequency (DTMF) signal detection device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the DTMF signal detection method described above.

[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the dual-tone multi-frequency signal detection method described above.

[0015] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the dual-tone multi-frequency signal detection method described above.

[0016] This application provides a method for detecting dual-tone multi-frequency (DTMF) signals. The method involves acquiring multiple DTMF audio streams output by a session boundary controller; performing time synchronization and feature extraction on the multiple DTMF audio streams to obtain a feature sequence for each stream; performing self-attention calculation on the feature sequences to generate an intermediate feature sequence; performing connection timing classification decoding on the intermediate feature sequences to generate a key symbol sequence for each audio stream and outputting the key symbol sequence; calculating the signal-to-noise ratio (SNR) of each DTMF audio stream in real time; determining a confidence threshold based on the SNR; obtaining a confidence score for each symbol in the key symbol sequence; and filtering out symbols with confidence scores lower than the confidence threshold from the key symbol sequence to obtain a filtered key symbol sequence. This application employs self-attention calculation and classification decoding, which can capture global features of the signal and reduce environmental noise interference, thereby improving the accuracy of DTMF signal detection. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating an embodiment of the dual-tone multi-frequency (DTMF) signal detection method of this application. Figure 2 This is a flowchart illustrating Embodiment 2 of the method for detecting dual-tone multi-frequency signals according to this application. Figure 3 A simplified flowchart illustrating the dual-tone multi-frequency signal detection method provided in Embodiment 1 of this application; Figure 4 This is a schematic diagram of the module structure of the dual-tone multi-frequency signal detection device according to an embodiment of this application; Figure 5 This is a schematic diagram of the hardware operating environment involved in the dual-tone multi-frequency signal detection method in the embodiments of this application.

[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0023] This application acquires multiple dual-tone multi-frequency (DTMF) audio streams output by a session boundary controller; performs time synchronization and feature extraction on the multiple DTMF audio streams to obtain a feature sequence for each DTMF audio stream; performs self-attention calculation on the feature sequences to generate an intermediate feature sequence; performs connection timing classification decoding on the intermediate feature sequence to generate a key symbol sequence for each audio stream, and outputs the key symbol sequence; calculates the signal-to-noise ratio (SNR) of each DTMF audio stream in real time; determines a confidence threshold based on the SNR; obtains a confidence score for each symbol in the key symbol sequence; and filters out symbols with confidence scores lower than the confidence threshold from the key symbol sequence to obtain a filtered key symbol sequence.

[0024] Currently, DTMF signal detection has weak anti-interference capabilities. In high-concurrency scenarios, factors such as the superposition of multiple audio streams, environmental noise, and network transmission distortion can reduce the signal-to-noise ratio, leading to low signal detection accuracy. Therefore, improving the accuracy of DTMF signal detection remains a problem that needs to be solved.

[0025] This application employs self-attention computation and classification decoding processing, which can capture the global features of the signal, reduce the interference of environmental noise, and thus improve the accuracy of dual-tone multi-frequency signal detection.

[0026] All user-related data involved in this application were obtained with the user's permission or consent; that is, when this application is applied to specific products or technologies, user permission is required to obtain and process the relevant data, and the processing of the relevant data must comply with the relevant laws, regulations and regulatory standards of the relevant countries and regions.

[0027] Based on this, embodiments of this application provide a method for detecting dual-tone multi-frequency signals, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the dual-tone multi-frequency signal detection method of this application.

[0028] In this embodiment, the method for detecting dual-tone multi-frequency signals includes steps S10 to S80: Step S10: Acquire the multi-channel dual-tone multi-frequency (DTMF) audio stream output by the session boundary controller; It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, a dual-tone multi-frequency (DTMF) signal detection device, etc. The following description uses a DTMF signal detection device as an example to illustrate this embodiment and the subsequent embodiments.

[0029] It's important to note that a Session Border Controller (SBC) is a core network device used for media stream conversion, bandwidth control, and concurrency management in Voice over Internet Protocol (VoIP) communication. Located between two networks, it can simultaneously handle dozens to hundreds of calls. The SBC receives signaling and media streams from Web Real-Time Communication (WebRTC) or Session Initiation Protocol (SIP) protocols, performs protocol conversion and media processing, and then outputs a unified Real-Time Transport Protocol (RTP) audio stream. The RTP audio stream contains Dual Tone Multiple Frequency (DTMF) signals. A DTMF signal audio stream refers to the audio data stream corresponding to the signals generated when a user presses a key on a telephone keypad. DTMF signals are composed of two superimposed sine waves of different frequencies, with each key corresponding to a unique pair of frequencies.

[0030] Step S20: Perform time synchronization and feature extraction on the multi-channel dual-tone multi-frequency signal audio to obtain the feature sequence of each dual-tone multi-frequency signal audio stream; It should be noted that since the arrival times of the various RTP data packets differ, time-axis alignment can be performed on multiple asynchronous audio streams. Specifically, this can be achieved by parsing the timestamp information of each audio stream and aligning the timelines of the multiple signals accordingly, ensuring timing consistency during subsequent batch processing, supporting up to 100 concurrent audio streams. Then, feature extraction is performed on each aligned synchronous audio stream to obtain the feature sequence of each dual-tone multi-frequency (DTMF) audio stream. Extraction methods can include Mel-frequency cepstral coefficient analysis, linear predictive cepstral coefficient analysis, filter bank energy analysis, etc.

[0031] It should be noted that, to improve the efficiency of concurrent processing of multiple audio streams, engineering optimizations can be performed. Specifically, the feature sequences of multiple audio streams can be batch-packaged before being sent to the self-attention calculation module. Specifically, the system maintains a dynamic batch processing queue, collecting feature sequences from different audio streams within the same time window according to a preset batch size (e.g., 32 or 64). After collecting a preset number of feature sequences, the system stacks these sequences along the batch dimension to form a batch input tensor with dimensions of [batch size, sequence length, feature dimension]. This fully utilizes the parallel computing capabilities of the graphics processing unit (GPU) or central processing unit (CPU), merging the inference calculations of multiple audio streams into a single forward propagation, thereby distributing the waiting time of a single inference stream across the entire batch and significantly improving the overall throughput of the system. In batch inference mode, a single GPU can support concurrent detection of 100 audio streams, and a CPU (8 cores, 16GB memory) can support concurrent detection of 30 streams, meeting the high concurrency requirements of the session boundary controller.

[0032] In one feasible approach, the step of time-synchronizing and feature-extracting the multiple dual-tone multi-frequency (DTMF) audio signals to obtain a feature sequence for each DTMF audio stream includes: acquiring timestamp information for each DTMF audio stream and aligning the multiple audio streams to the same time axis based on the timestamp information to obtain a synchronized audio stream; performing frame segmentation on the synchronized audio stream to obtain multiple consecutive audio frames, and extracting Mel-frequency cepstral coefficient features from each frame; performing first-order and second-order difference calculations on the Mel-frequency cepstral coefficient features to generate a difference feature vector; concatenating the Mel-frequency cepstral coefficient features with the difference feature vector to obtain a multidimensional feature vector; and concatenating the multidimensional feature vectors of multiple consecutive frames in chronological order to obtain a feature sequence for each DTMF audio stream.

[0033] It should be noted that the real-time transmission protocol timestamp of each audio stream can be parsed. Using the timeline of one stream as a reference, the audio data of the remaining streams can be aligned to the same time coordinate through interpolation or resampling, ensuring the temporal consistency of multiple audio streams and obtaining a synchronized audio stream. This also avoids misalignment caused by different arrival times of multiple data streams due to network jitter. During feature extraction, frame segmentation can be performed first. The purpose of frame segmentation is to divide the continuous audio signal into short, stationary segments, because the frequency components of DTMF signals can be considered stable over a short period of time, facilitating spectrum analysis. Frame segmentation uses a preset frame length, such as 25ms, and a preset frame shift, such as a 10ms Hamming window strategy, with 60% overlap between adjacent frames (15ms). When the sampling rate is 8kHz, each frame contains 200 sampling points. By applying a Hamming window to each frame signal, the discontinuity caused by signal truncation at both ends of the frame can be eliminated.

[0034] Subsequently, for each frame of signal, the specific process of extracting Mel-Frequency Cepstral Coefficients (MFCCs) is as follows: First, a Hamming window is applied to eliminate spectral leakage. Then, a short-time Fourier transform is performed to obtain the power spectrum. A set of Mel filters covering the 0-8kHz frequency band can be used to map the linear frequencies to the Mel scale. The logarithmic energy of each filter is taken. Finally, a discrete cosine transform is performed on the logarithmic energy sequence, and the first 13 coefficients are taken to obtain the 13-dimensional MFCC eigenvector. This can compress the data dimensionality while preserving the spectral structure that is sensitive to the human ear, effectively distinguishing DTMF signals from noise.

[0035] Next, let C_t be the 13-dimensional MFCC feature vector of the t-th frame, and its first-order difference be:

[0036] The second-order difference is:

[0037] and This is the differential eigenvector. Differential features can reflect the dynamic changes of the signal, providing the model with the trend of the spectrum changing over time.

[0038] Finally, the obtained 13-dimensional MFCC features are concatenated with the 13-dimensional first-order difference and the 13-dimensional second-order difference along the feature dimensions to form a 39-dimensional multi-dimensional feature vector. The 39-dimensional multi-dimensional feature vectors from 10 consecutive frames (each frame corresponding to an audio duration of 25ms, covering 115ms) are then arranged in frame order to form a 10×39 feature sequence. If the total number of frames in the audio stream exceeds 10, a sliding window processing method is used: the overlap between adjacent windows is 5 frames (window step size 5 frames, corresponding to 50ms).

[0039] Step S30: Perform self-attention calculation on the feature sequence to generate an intermediate feature sequence; It's important to note that the model performing self-attention computation can be a lightweight Transformer model. The core of a lightweight Transformer model is the self-attention mechanism. Self-attention dynamically calculates the association weights between each time frame in the input sequence and all other time frames in the sequence, thus achieving global feature modeling. Unlike traditional recurrent neural networks or convolutional neural networks, the self-attention mechanism does not rely on recursion or local windows, directly capturing the dependencies between any two positions in the sequence and effectively handling long-range dependencies of DTMF signals on the time axis. Even if a frame is heavily contaminated with noise, the model can still infer the correct frequency combination from information from the clean frames before and after it.

[0040] It should be noted that engineering optimizations can be performed before the specific lightweight Transformer model, that is, the TensorRT inference engine can be used to optimize the model, including layer fusion, precision calibration, etc., which can reduce the inference latency of a single audio stream to ≤20ms, ensuring the interactive response speed in real-time communication scenarios.

[0041] In one feasible approach, before performing self-attention computation on the feature sequence, the method further includes: sequentially extracting multiple fixed-length sub-sequences from the feature sequence according to a preset frame shift step size; and using the multiple sub-sequences as input data for the self-attention computation operation.

[0042] It should be noted that before performing self-attention calculation, the feature sequence (length N×39, where N is the total number of frames) generated for each audio stream can be sequentially divided into multiple sub-sequences using a sliding window method according to a preset window length L and step size S. In this embodiment, the window length L = 10 frames (with a frame length of 25ms and a frame shift of 10ms, the coverage time is approximately 115ms), the window step size S = 5 frames (corresponding to 50ms), and adjacent windows overlap by 5 frames (overlap rate 50%). If the total number of frames is N, then the number of extracted sub-sequences is: K = floor((NL) / S) + 1 Where N is the total number of frames in the feature sequence, L is the fixed length of each window, S is the step size of each window slide, and floor is the floor function to ensure that the calculation result is an integer.

[0043] Each subsequence has a dimension of 10×39. The advantage of sliding window extraction is that it divides long sequences into multiple fixed-length analysis units, enabling the model to process continuous audio streams in real time in a streaming manner. The overlapping design ensures that DTMF signals crossing window boundaries are not missed due to window cutting. Each extracted subsequence can be used independently as input data for a self-attention calculation operation. The advantage of this is that it achieves real-time streaming processing, outputting the result of one window as soon as one step of data is received, without waiting for the entire audio stream to end, thus meeting the low latency requirements of SBC in high-concurrency scenarios.

[0044] In one feasible approach, the step of performing self-attention computation on the feature sequence to generate an intermediate feature sequence includes: linearly transforming the feature sequence into an embedding vector and adding positional encoding to the embedding vector to obtain a temporal embedding sequence; performing global dependency modeling on the temporal embedding sequence using a multi-head self-attention layer to obtain an attention feature sequence; and performing a nonlinear transformation on the attention feature sequence using a feedforward network to obtain an intermediate feature sequence.

[0045] It should be noted that the lightweight Transformer model in this embodiment adopts a single-layer multi-head self-attention structure, which contains 4 attention heads, each with a feature dimension of 16.

[0046] First, the feature sequence is mapped to a 64-dimensional embedding vector through a linear transformation, and a positional encoding is added to each position to represent the temporal order relationship between frames in the sequence. The addition of positional encoding enables the model to perceive the sequential order of frames, avoiding the loss of positional information caused by the self-attention permutation invariance. Then, a multi-head self-attention layer is used to calculate the dependency weights between frames in the sequence, accurately capturing the dual-tone frequency combination features of dual-tone multi-frequency signals, while suppressing local invalid features introduced by noise. The multi-head mechanism allows the model to learn features from multiple different subspaces, enhancing the diversity of expression. Finally, a feedforward network is used to perform a nonlinear transformation on the features output by the attention layer to obtain a deep feature sequence, which is output as an intermediate feature sequence. The feedforward network consists of two fully connected layers (dimension 64→128→64) and a ReLU activation function.

[0047] Step S40: Perform connection timing classification decoding processing on the intermediate feature sequence to generate the key symbol sequence for each audio stream, and output the key symbol sequence.

[0048] It should be noted that classifying and decoding the intermediate feature sequence can map the intermediate feature sequence into the final key symbol sequence.

[0049] In one feasible approach, the step of performing connection-time classification decoding on the intermediate feature sequence to generate a key symbol sequence for each audio stream includes: mapping the intermediate feature sequence to a probability vector for each frame, where each component in the probability vector corresponds to a probability of a dual-tone multi-frequency symbol category; determining the component with the highest probability in the probability vector of each frame as the output label to obtain a frame-level label sequence; and performing sequence compression processing on the frame-level label sequence to generate a key symbol sequence.

[0050] It should be noted that this embodiment uses the Connectionist Temporal Classification (CTC) decoding algorithm. Specifically, the intermediate feature sequence can be set to a dimension of 10×64. Through a trainable linear classification layer and a softmax activation function, the intermediate feature sequence is mapped to a 13-dimensional probability vector for each frame. The 13 categories include: 12 valid DTMF symbols (0-9, ...). The probability vector consists of 1 character (#) and 1 blank token. For frame t, the probability vector is: P_t = softmax(F_t·W_cls) Where F_t represents the feature vector of frame t, and W_cls is the weight matrix of the classification layer. The softmax function transforms this vector into a probability distribution such that all components have values ​​between 0 and 1 and sum to 1.

[0051] For each frame's probability vector, the category index corresponding to the component with the highest probability is taken as the output label for that frame. For example, for an input sequence of length 10, the output will be a frame-level label sequence of length 10, where each label belongs to the set {0-9,} , #, blank}.

[0052] Finally, the frame-level label sequence can be compressed. This includes merging consecutively repeating labels, i.e., combining consecutively occurring identical labels in the frame-level label sequence into one; and removing whitespace characters, i.e., removing all whitespace characters from the sequence. Through compression, a compact key symbol sequence is generated, which can merge temporally consecutive and identical frame-level outputs into one key. At the same time, by removing whitespace characters, non-key frames are skipped, thus solving the timing misalignment problem between frame-level labels and the final output.

[0053] In one feasible approach, the step of performing sequence compression processing on the frame-level tag sequence to generate a key symbol sequence includes: merging identical tags that appear consecutively in the frame-level tag sequence into one tag; deleting blank tags in the frame-level tag sequence; and determining the tag sequence after merging and deleting as the key symbol sequence.

[0054] It should be noted that each tag in the frame-level tag sequence corresponds to the classification result of each frame in the audio stream, and the tag type includes 12 valid DTMF symbols (0-9, ...). 、#) and 1 space character.

[0055] Next, a merging operation is performed on the frame-level tag sequence: traversing the frame-level tag sequence, merging consecutively repeating identical tags into one tag. For example, if the frame-level tag sequence is [1,1,1,2,2,3,3,3,3], then merging consecutively repeating tags yields [1,2,3]. This step is useful because DTMF key presses typically last for several frames; the merging operation can combine multiple consecutive frames corresponding to the same key press into a single key symbol, preventing the same key from being repeatedly output. Then, a deletion operation is performed on the merged tag sequence: removing all blank characters from the sequence. Blank characters are used in CTC decoding to represent frames with "no key press output," and deleting blank characters yields a clean key symbol sequence. For example, if the merged sequence is [1, blank, 2, blank, blank, 3], deleting blank characters yields [1,2,3]. Finally, the tag sequence after merging and deletion is determined as the final key symbol sequence. Through the above sequence compression process, time-continuous and identical frame-level outputs can be merged into a single key. At the same time, by removing whitespace characters and skipping non-key frames, the timing misalignment problem between frame-level labels and the final output can be solved, and the correct conversion from frame-level classification results to a compact key symbol sequence can be achieved.

[0056] Step S50: Calculate the signal-to-noise ratio of each dual-tone multi-frequency (DTMF) audio stream in real time; It should be noted that the key symbol sequence generated for each audio stream can also be optimized through adaptive threshold adjustment. Specifically, a sliding energy method can be used to estimate the signal-to-noise ratio (SNR) in real time. For example, for a current analysis window of 200ms, its short-term energy E_current is calculated; simultaneously, a long-term sliding energy window (e.g., 2 seconds) is maintained, and the minimum energy value E_noise within this window is taken as the estimate of the noise energy. The formula for calculating the SNR (in dB) of the current window is:

[0057] Where E_current is the signal energy of the current audio window (including the total energy of valid signal and noise), and E_noise is the estimated noise energy.

[0058] Step S60: Determine the confidence threshold based on the signal-to-noise ratio; It should be noted that the system can preset a mapping function from SNR to a confidence threshold. Generally, when the SNR is high, a higher confidence threshold is used to reduce the false positive rate; when the SNR is low, a lower confidence threshold is used to reduce the false negative rate. The advantage of dynamically adjusting the threshold is that it allows the system to adapt to different noise environments.

[0059] In one feasible approach, the step of determining the confidence threshold based on the signal-to-noise ratio includes: comparing the signal-to-noise ratio with a first preset threshold and a second preset threshold, wherein the first preset threshold is greater than the second preset threshold; when the signal-to-noise ratio is greater than or equal to the first preset threshold, determining a first preset confidence threshold as the confidence threshold; when the signal-to-noise ratio is less than the second preset threshold, determining a second preset confidence threshold as the confidence threshold, wherein the first preset confidence threshold is greater than the second preset confidence threshold; when the signal-to-noise ratio is greater than or equal to the second preset threshold and less than the first preset threshold, performing linear interpolation calculation on the first preset confidence threshold and the second preset confidence threshold based on the signal-to-noise ratio to obtain an interpolation result, and determining the interpolation result as the confidence threshold.

[0060] It should be noted that two boundary values ​​for the pre-defined SNR segments are obtained, denoted as the first preset threshold T_high (e.g., 10dB) and the second preset threshold T_low (e.g., 5dB). Simultaneously, two preset confidence baseline values ​​corresponding to the SNR segments are obtained, denoted as the first preset confidence threshold C_high (corresponding to high SNR scenarios, e.g., 0.8) and the second preset confidence threshold C_low (corresponding to low SNR scenarios, e.g., 0.5), where C_high > C_low.

[0061] The calculated SNR is then compared with T_high and T_low, respectively, dividing the environmental noise into three typical regions. Specifically, if SNR ≥ 10dB, indicating a high signal-to-noise ratio and low noise level, C_high = 0.8 is used as the current confidence threshold. This avoids misclassifying extremely weak circuit noise or crosstalk as DTMF signals. If SNR < 5dB, indicating a low signal-to-noise ratio and high noise level, C_low = 0.5 is used as the current confidence threshold. The advantage of a low threshold is that in noisy environments, it ensures that genuine button presses are not missed, as missing a button press could cause the interaction process to freeze, while occasional false positives can be corrected by the upper-layer retry mechanism.

[0062] When the SNR is in the intermediate transition range between 5dB and 10dB, a linear interpolation method is used to calculate the confidence threshold, achieving a smooth transition between the two endpoints. Specifically, if the current SNR value is s, the formula for calculating the confidence threshold C(s) is: C(s) = C_low + [(s - T_low) / (T_high - T_low)] × (C_high - C_low) Wherein, C_low is the second preset reliability threshold, s is the current SNR value, T_low is the second preset threshold, T_high is the first preset threshold, and C_high is the first preset reliability threshold.

[0063] Step S70: Obtain the confidence score of each symbol in the key symbol sequence; It should be noted that for each key symbol output after decoding, the Softmax output probability value of that symbol in the corresponding frame is obtained as the confidence score of that symbol.

[0064] Step S80: Filter out symbols with confidence scores lower than the confidence threshold from the key symbol sequence to obtain a filtered key symbol sequence.

[0065] It should be noted that for the generated key symbol sequence of each audio stream, each key symbol in the sequence can be traversed symbol by symbol. If the confidence score of a symbol is lower than the confidence threshold, the symbol is deleted from the sequence; if the confidence score of a symbol is greater than or equal to the threshold, it is retained. The final filtered key symbol sequence is then obtained and used as the key symbol sequence to be output. The filtering step can eliminate erroneous outputs generated by the model under uncertain conditions, improving the reliability of the detection results.

[0066] This embodiment acquires multiple dual-tone multi-frequency (DTMF) audio streams output by a session boundary controller; performs time synchronization and feature extraction on the multiple DTMF audio streams to obtain a feature sequence for each DTMF audio stream; performs self-attention calculation on the feature sequences to generate an intermediate feature sequence; performs connection timing classification decoding processing on the intermediate feature sequences to generate a key symbol sequence for each audio stream, and outputs the key symbol sequence; calculates the signal-to-noise ratio (SNR) of each DTMF audio stream in real time; determines a confidence threshold based on the SNR; obtains a confidence score for each symbol in the key symbol sequence; and filters out symbols with confidence scores lower than the confidence threshold from the key symbol sequence to obtain a filtered key symbol sequence. This embodiment uses self-attention calculation and classification decoding processing, which can capture global features of the signal, reduce environmental noise interference, and thus improve the accuracy of DTMF signal detection.

[0067] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Before step S30, the method for detecting dual-tone multi-frequency signals further includes steps S301 to S302: Step S301: Extract multiple fixed-length subsequences sequentially from the feature sequence according to a preset frame shift step size; It should be noted that before performing self-attention calculation, the feature sequence (length N×39, where N is the total number of frames) generated for each audio stream can be sequentially divided into multiple sub-sequences using a sliding window method according to a preset window length L and step size S. In this embodiment, the window length L = 10 frames (with a frame length of 25ms and a frame shift of 10ms, the coverage time is approximately 115ms), the window step size S = 5 frames (corresponding to 50ms), and adjacent windows overlap by 5 frames (overlap rate 50%). If the total number of frames is N, then the number of extracted sub-sequences is: K = floor((NL) / S) + 1 Where N is the total number of frames in the feature sequence, L is the fixed length of each window, S is the step size of each window slide, and floor is the floor function to ensure that the calculation result is an integer.

[0068] Step S302: Use the multiple subsequences as input data for the self-attention calculation operation.

[0069] It should be noted that each subsequence has a dimension of 10×39. The advantage of sliding window extraction is that it divides long sequences into multiple fixed-length analysis units, enabling the model to process continuous audio streams in real time in a streaming manner; the overlapping design ensures that DTMF signals crossing window boundaries are not missed due to window segmentation. Each extracted subsequence can be used independently as input data for a self-attention calculation operation. The advantage of this is that it achieves real-time streaming processing, outputting the result of one window as soon as one step of data is received, without waiting for the entire audio stream to end, thus meeting the low latency requirements of SBC in high-concurrency scenarios.

[0070] In this embodiment, multiple fixed-length subsequences are extracted sequentially from the feature sequence according to a preset frame shift step size; these subsequences are then used as input data for the self-attention calculation operation. This embodiment employs a sliding window approach to extract fixed-length subsequences from the feature sequence. On one hand, this allows for window-by-window output of recognition results without waiting for the entire audio segment to finish, meeting the real-time streaming processing requirements of high-concurrency scenarios. On the other hand, by setting overlapping intervals between adjacent windows, it ensures that DTMF signals crossing window boundaries are not truncated or omitted, guaranteeing the integrity of cross-boundary signal recognition. Simultaneously, it normalizes variable-length sequences into fixed-length inputs, adapting to the standard data format requirements of the self-attention calculation module.

[0071] For example, to help understand the implementation flow of the dual-tone multi-frequency signal detection method obtained by combining this embodiment with the above embodiment one, please refer to... Figure 3 , Figure 3 A simplified flowchart of a dual-tone multi-frequency (DTMF) signal detection method is provided, specifically: multiple audio stream inputs; signal preprocessing; multi-channel synchronization: timestamp alignment; feature enhancement: generating feature vectors; sequence construction: concatenating continuous feature vectors to generate an input sequence; inputting the input sequence to a lightweight transformer detection model; input layer: mapping the feature vector of each audio frame to a high-dimensional embedding vector and superimposing positional encoding; self-attention layer: calculating inter-frame dependencies through the self-attention layer to focus on the dual-tone frequency region; feedforward network: enhancing nonlinear feature representation; output layer: connecting temporal classification and decoding to solve temporal alignment and outputting key press results; engineering optimization module, including batch inference: batch input of multiple feature sequences to improve efficiency, accelerate deployment, reduce single-channel inference latency, and adaptive threshold adjustment: dynamically optimizing the recognition threshold based on real-time noise intensity; finally, outputting the key press detection results.

[0072] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the detection method of dual-tone multi-frequency signals in this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0073] This application also provides a dual-tone multi-frequency (DTMF) signal detection device, please refer to... Figure 4 The dual-tone multi-frequency signal detection device includes: Acquisition module 10 is used to acquire the multi-channel dual-tone multi-frequency signal audio stream output by the session boundary controller; Extraction module 20 is used to perform time synchronization and feature extraction on the multi-channel dual-tone multi-frequency signal audio to obtain the feature sequence of each dual-tone multi-frequency signal audio stream; Calculation module 30 is used to perform self-attention calculation on the feature sequence to generate an intermediate feature sequence; Output module 40 is used to perform connection timing classification decoding processing on the intermediate feature sequence, generate key symbol sequence for each audio stream, and output the key symbol sequence; Real-time module 50 is used to calculate the signal-to-noise ratio of each dual-tone multi-frequency (DTMF) audio stream in real time. Determining module 60 is used to determine a confidence threshold based on the signal-to-noise ratio; Confidence module 70 is used to obtain the confidence score of each symbol in the key symbol sequence; The filtering module 80 is used to filter out symbols with confidence scores lower than the confidence threshold from the key symbol sequence to obtain a filtered key symbol sequence.

[0074] This application acquires multiple dual-tone multi-frequency (DTMF) audio streams output by a session boundary controller; performs time synchronization and feature extraction on the multiple DTMF audio streams to obtain a feature sequence for each DTMF audio stream; performs self-attention calculation on the feature sequences to generate an intermediate feature sequence; performs connection timing classification decoding processing on the intermediate feature sequences to generate a key symbol sequence for each audio stream, and outputs the key symbol sequence; calculates the signal-to-noise ratio (SNR) of each DTMF audio stream in real time; determines a confidence threshold based on the SNR; obtains a confidence score for each symbol in the key symbol sequence; and filters out symbols with confidence scores lower than the confidence threshold from the key symbol sequence to obtain a filtered key symbol sequence. This application employs self-attention calculation and classification decoding processing, which can capture global features of the signal, reduce environmental noise interference, and thus improve the accuracy of DTMF signal detection.

[0075] In one embodiment, the extraction module 20 is further configured to acquire timestamp information of each dual-tone multi-frequency (DTMF) audio stream, and align multiple audio streams to the same time axis according to the timestamp information to obtain a synchronized audio stream; perform frame segmentation on the synchronized audio stream to obtain multiple consecutive audio frames, and extract Mel-frequency cepstral coefficient features from each of the audio frames; perform first-order and second-order difference calculations on the Mel-frequency cepstral coefficient features to generate a difference feature vector; concatenate the Mel-frequency cepstral coefficient features with the difference feature vector to obtain a multidimensional feature vector; and concatenate the multidimensional feature vectors of multiple consecutive frames in chronological order to obtain a feature sequence of each DTMF audio stream.

[0076] In one embodiment, the computing module 30 is further configured to linearly transform the feature sequence into an embedding vector and add position encoding to the embedding vector to obtain a temporal embedding sequence; use a multi-head self-attention layer to perform global dependency modeling on the temporal embedding sequence to obtain an attention feature sequence; and use a feedforward network to perform nonlinear transformation on the attention feature sequence to obtain an intermediate feature sequence.

[0077] In one embodiment, the output module 40 is further configured to map the intermediate feature sequence into a probability vector for each frame, wherein each component in the probability vector corresponds to the probability of a dual-tone multi-frequency symbol category; determine the component with the highest probability in the probability vector of each frame as the output label to obtain a frame-level label sequence; and perform sequence compression processing on the frame-level label sequence to generate a key symbol sequence.

[0078] In one embodiment, the output module 40 is further configured to merge identical tags that appear consecutively in the frame-level tag sequence into one tag; delete blank tags in the frame-level tag sequence; and determine the tag sequence after merging and deleting as a key symbol sequence.

[0079] In one embodiment, the output module 40 is further configured to compare the signal-to-noise ratio with a first preset threshold and a second preset threshold, wherein the first preset threshold is greater than the second preset threshold; when the signal-to-noise ratio is greater than or equal to the first preset threshold, a first preset confidence threshold is determined as a confidence threshold; when the signal-to-noise ratio is less than the second preset threshold, a second preset confidence threshold is determined as a confidence threshold, wherein the first preset confidence threshold is greater than the second preset confidence threshold; when the signal-to-noise ratio is greater than or equal to the second preset threshold and less than the first preset threshold, linear interpolation is performed on the first preset confidence threshold and the second preset confidence threshold based on the signal-to-noise ratio to obtain an interpolation result, and the interpolation result is determined as a confidence threshold.

[0080] In one embodiment, the calculation module 30 is further configured to extract multiple fixed-length subsequences sequentially from the feature sequence according to a preset frame shift step size; and to use the multiple subsequences as input data for the self-attention calculation operation.

[0081] The dual-tone multi-frequency (DTMF) signal detection device provided in this application, employing the DTMF signal detection method described in the above embodiments, can solve the technical problem of how to improve the accuracy of DTMF signal detection. Compared with the prior art, the beneficial effects of the DTMF signal detection device provided in this application are the same as those of the DTMF signal detection method provided in the above embodiments, and other technical features in the DTMF signal detection device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0082] This application provides a dual-tone multi-frequency (DTMF) signal detection device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the dual-tone multi-frequency signal detection method in the first embodiment described above.

[0083] The following is for reference. Figure 5 This document illustrates a schematic diagram of a dual-tone multi-frequency (DTMF) signal detection device suitable for implementing embodiments of this application. The DTMF signal detection device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The dual-tone multi-frequency signal detection device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0084] like Figure 5As shown, the dual-tone multi-frequency (DTMF) signal detection device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the DTMF signal detection device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the dual-tone multi-frequency (DTMF) signal detection device to communicate wirelessly or wiredly with other devices to exchange data. Although DTMF signal detection devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all of the systems shown. More or fewer systems may be implemented alternatively.

[0085] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0086] The dual-tone multi-frequency (DTMF) signal detection device provided in this application, employing the DTMF signal detection method described in the above embodiments, can solve the technical problem of how to improve the accuracy of DTMF signal detection. Compared with the prior art, the beneficial effects of the DTMF signal detection device provided in this application are the same as those of the DTMF signal detection method provided in the above embodiments, and other technical features in this DTMF signal detection device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0087] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0088] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0089] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the dual-tone multi-frequency signal detection method in the above embodiments.

[0090] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0091] The aforementioned computer-readable storage medium may be included in a dual-tone multi-frequency (DTMF) signal detection device; or it may exist independently and not be assembled into a DTMF signal detection device.

[0092] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a dual-tone multi-frequency (DTMF) signal detection device, the DTMF signal detection device performs the following actions: acquires multiple DTMF signal audio streams output by a session boundary controller; performs time synchronization and feature extraction on the multiple DTMF signal audio streams to obtain a feature sequence for each DTMF signal audio stream; performs self-attention calculation on the feature sequences to generate an intermediate feature sequence; performs connection timing classification decoding processing on the intermediate feature sequences to generate a key symbol sequence for each audio stream and outputs the key symbol sequence; calculates the signal-to-noise ratio (SNR) of each DTMF signal audio stream in real time; determines a confidence threshold based on the SNR; acquires a confidence score for each symbol in the key symbol sequence; and filters out symbols with confidence scores lower than the confidence threshold from the key symbol sequence to obtain a filtered key symbol sequence.

[0093] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0095] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0096] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described dual-tone multi-frequency (DTMF) signal detection method, thereby solving the technical problem of how to improve the accuracy of DTMF signal detection. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the DTMF signal detection method provided in the above embodiments, and will not be repeated here.

[0097] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the dual-tone multi-frequency signal detection method described above.

[0098] The computer program product provided in this application can solve the technical problem of how to improve the accuracy of dual-tone multi-frequency (DTMF) signal detection. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the DTMF signal detection method provided in the above embodiments, and will not be repeated here.

[0099] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for detecting dual-tone multi-frequency signals, characterized in that, The method includes: Acquire the multi-channel dual-tone multi-frequency (DTMF) audio stream output from the session boundary controller; Time synchronization and feature extraction are performed on the multi-channel dual-tone multi-frequency (DTMF) audio signals to obtain the feature sequence of each DTMF audio stream. Perform self-attention computation on the feature sequence to generate an intermediate feature sequence; Perform connection timing classification decoding processing on the intermediate feature sequence to generate a key symbol sequence for each audio stream, and output the key symbol sequence; Real-time calculation of the signal-to-noise ratio of each dual-tone multi-frequency (DTMF) audio stream; The confidence threshold is determined based on the signal-to-noise ratio. Obtain the confidence score for each symbol in the key symbol sequence; Symbols with confidence scores lower than the confidence threshold are filtered out from the key symbol sequence to obtain a filtered key symbol sequence.

2. The method as described in claim 1, characterized in that, The step of performing time synchronization and feature extraction on the multi-channel dual-tone multi-frequency (DTMF) audio signals to obtain the feature sequence of each DTMF audio stream includes: The timestamp information of each dual-tone multi-frequency signal audio stream is obtained, and the multiple audio streams are aligned to the same time axis according to the timestamp information to obtain a synchronized audio stream; The synchronous audio stream is segmented into frames to obtain multiple consecutive audio frames, and Mel frequency cepstral coefficient features are extracted from each of the audio frames. The first-order and second-order differences of the Mel frequency cepstral coefficient features are calculated to generate a difference feature vector; The Mel frequency cepstral coefficient features are concatenated with the difference feature vector to obtain a multidimensional feature vector; The multidimensional feature vectors of multiple consecutive frames are concatenated in chronological order to obtain the feature sequence of each dual-tone multi-frequency signal audio stream.

3. The method as described in claim 1, characterized in that, The step of performing self-attention computation on the feature sequence to generate an intermediate feature sequence includes: The feature sequence is linearly transformed and mapped to an embedding vector, and positional encoding is added to the embedding vector to obtain a temporal embedding sequence; A multi-head self-attention layer is used to perform global dependency modeling on the temporal embedding sequence to obtain an attention feature sequence; The attention feature sequence is nonlinearly transformed using a feedforward network to obtain an intermediate feature sequence.

4. The method as described in claim 1, characterized in that, The step of performing connection timing classification decoding on the intermediate feature sequence to generate the key symbol sequence for each audio stream includes: The intermediate feature sequence is mapped to a probability vector for each frame, and each component in the probability vector corresponds to the probability of a dual-tone multi-frequency symbol category; The component with the highest probability in the probability vector of each frame is determined as the output label, thus obtaining a frame-level label sequence; The frame-level tag sequence is compressed to generate a key symbol sequence.

5. The method as described in claim 4, characterized in that, The step of performing sequence compression processing on the frame-level tag sequence to generate a key symbol sequence includes: Merge the identical tags that appear consecutively in the frame-level tag sequence into one tag; Delete whitespace tags from the frame-level tag sequence; The merged and deleted label sequence is determined as the key symbol sequence.

6. The method as described in claim 1, characterized in that, The step of determining the confidence threshold based on the signal-to-noise ratio includes: The signal-to-noise ratio is compared with a first preset threshold and a second preset threshold, wherein the first preset threshold is greater than the second preset threshold; When the signal-to-noise ratio is greater than or equal to the first preset threshold, the first preset confidence threshold is determined as the confidence threshold. When the signal-to-noise ratio is less than the second preset threshold, the second preset confidence threshold is determined as the confidence threshold, and the first preset confidence threshold is greater than the second preset confidence threshold; When the signal-to-noise ratio is greater than or equal to the second preset threshold and less than the first preset threshold, linear interpolation is performed on the first preset confidence threshold and the second preset confidence threshold based on the signal-to-noise ratio to obtain the interpolation result, and the interpolation result is determined as the confidence threshold.

7. The method as described in claim 1, characterized in that, Before the step of performing self-attention computation on the feature sequence, the method further includes: According to a preset frame shift step size, multiple fixed-length subsequences are extracted sequentially from the feature sequence; The multiple fixed-length subsequences are used as input data for the self-attention calculation operation.

8. A detection device for dual-tone multi-frequency signals, characterized in that, The device includes: The acquisition module is used to acquire the multi-channel dual-tone multi-frequency (DTMF) audio stream output by the session boundary controller. The extraction module is used to perform time synchronization and feature extraction on the multi-channel dual-tone multi-frequency signal audio to obtain the feature sequence of each dual-tone multi-frequency signal audio stream; The calculation module is used to perform self-attention calculation on the feature sequence to generate an intermediate feature sequence; The output module is used to perform connection timing classification decoding processing on the intermediate feature sequence, generate a key symbol sequence for each audio stream, and output the key symbol sequence. The real-time module is used to calculate the signal-to-noise ratio of each dual-tone multi-frequency (DTMF) audio stream in real time. The determination module is used to determine a confidence threshold based on the signal-to-noise ratio; The confidence module is used to obtain the confidence score of each symbol in the key symbol sequence; A filtering module is used to filter out symbols with confidence scores lower than the confidence threshold from the key symbol sequence to obtain a filtered key symbol sequence.

9. A detection device for dual-tone multi-frequency signals, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the method for detecting dual-tone multi-frequency signals as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the method for detecting dual-tone multi-frequency signals as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Streaming speech recognition method based on attention re-scoring

    CN115240645A

  • Outbound call method, device, equipment, medium and product

    CN122496585A