Voice anti-counterfeiting attack detection method, device and equipment
By using coding sub-models connected in series with multiple coding blocks in the speech recognition model for voice anti-counterfeiting attack detection, the security risks brought about by forged sounds or synthetic speech are solved, and effective identification of voice data and risk avoidance are achieved.
Patent Information
- Application Number
- CN202411217063.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-20
AI Technical Summary
In the era of generative artificial intelligence, the security risks brought by forged sounds or synthesized voices, including the dissemination of false information, discriminatory bias, user privacy leakage and disruption of social trust, are difficult to effectively avoid these risks in the existing technology.
By obtaining the voice data to be detected, it is input into the first coding sub-model composed of multiple coding blocks in series, the speech encoding information output by each coding block is obtained, and the speech processing sub-model in the speech recognition model is used to perform anti-counterfeiting attacks. Detection to determine whether the voice data is forged or synthesized.
Effectively avoid risks such as dissemination of false information, discriminatory prejudice, user privacy leakage and disruption of social trust, protect the security of personal privacy data, prevent attacks on forged voices or synthetic voices, and prevent the abuse of artificial intelligence technology.
Smart Images

Figure CN119170051A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of computer technology, and in particular to a method, device and equipment for detecting voice anti-counterfeiting attacks. Background Art
[0002] At present, artificial intelligence generated content (AIGC) is an artificial intelligence technology that can autonomously learn and generate new content (including images, sounds, text, etc.) from data. Therefore, forged sounds or synthesized voices also pose security risks in the AIGC era. The potential risks that forged sounds or synthesized voices may bring include the spread of false information, discrimination and bias, user privacy leakage, and the destruction of social trust. Therefore, it is necessary to provide a voice anti-counterfeiting attack detection solution that can effectively avoid the above potential risks, so as to protect the security of personal privacy data, prevent attacks with forged sounds or synthesized voices, and prevent the abuse of the above artificial intelligence technologies. Summary of the invention
[0003] The purpose of the embodiments of this specification is to provide a voice anti-counterfeiting attack detection solution that can effectively avoid the above-mentioned potential risks, so as to protect the security of personal privacy data, prevent attacks with forged sounds or synthesized voices, and prevent the abuse of the above-mentioned artificial intelligence technology.
[0004] In order to implement the above technical solution, the embodiments of this specification are implemented as follows:
[0005] An embodiment of the present specification provides a method for detecting speech anti-counterfeiting attacks, the method comprising: obtaining speech data to be detected. Inputting the speech data into a first coding sub-model composed of a plurality of coding blocks connected in series in a speech anti-counterfeiting attack detection model, and obtaining speech coding information output by each coding block. Based on the speech coding information output by each coding block in the plurality of coding blocks, the speech data is subjected to anti-counterfeiting attack detection processing by the speech processing sub-model in the speech recognition model, and a detection result corresponding to the speech data is obtained.
[0006] The embodiment of the present specification provides a device for detecting speech anti-counterfeiting attacks, the device comprising: a data acquisition module for acquiring speech data to be detected; a coding module for inputting the speech data into a first coding sub-model composed of a plurality of coding blocks connected in series in a speech anti-counterfeiting attack detection model, and obtaining speech coding information output by each coding block; an anti-counterfeiting detection module for performing anti-counterfeiting attack detection processing on the speech data through a speech processing sub-model in the speech recognition model based on the speech coding information output by each coding block in the plurality of coding blocks, and obtaining a detection result corresponding to the speech data.
[0007] The embodiment of the present specification provides a voice anti-counterfeiting attack detection device, the voice anti-counterfeiting attack detection device comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to: obtain voice data to be detected. The voice data is input into a first coding sub-model composed of a plurality of coding blocks connected in series in a voice anti-counterfeiting attack detection model, and the voice coding information output by each coding block is obtained. Based on the voice coding information output by each of the plurality of coding blocks, the voice data is subjected to anti-counterfeiting attack detection processing by the voice processing sub-model in the voice recognition model, and a detection result corresponding to the voice data is obtained.
[0008] The embodiments of this specification also provide a storage medium for storing computer executable instructions, which implement the following process when executed by a processor: obtain the voice data to be detected. Input the voice data into a first coding sub-model composed of a plurality of coding blocks connected in series in a voice anti-counterfeiting attack detection model, and obtain the voice coding information output by each coding block. Based on the voice coding information output by each coding block in the plurality of coding blocks, perform anti-counterfeiting attack detection processing on the voice data through the voice processing sub-model in the voice recognition model to obtain the detection result corresponding to the voice data.
[0009] The embodiments of this specification also provide a computer program product, including a computer program, which implements the following process when executed by a processor: obtain voice data to be detected. Input the voice data into a first coding sub-model composed of a plurality of coding blocks in series in a voice anti-counterfeiting attack detection model, and obtain the voice coding information output by each coding block. Based on the voice coding information output by each coding block in the plurality of coding blocks, perform anti-counterfeiting attack detection processing on the voice data through the voice processing sub-model in the voice recognition model to obtain a detection result corresponding to the voice data. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
[0011] Figure 1 This is an embodiment of a voice anti-counterfeiting attack detection method of this specification;
[0012] Figure 2 This is a schematic diagram of a voice anti-counterfeiting attack detection process in this manual;
[0013] Figure 3 This is a schematic diagram of another voice anti-counterfeiting attack detection process in this manual;
[0014] Figure 4 This is another embodiment of a voice anti-counterfeiting attack detection method of this specification;
[0015] Figure 5 This is a schematic diagram of another voice anti-counterfeiting attack detection process of this specification;
[0016] Figure 6 This is another embodiment of a voice anti-counterfeiting attack detection method of this specification;
[0017] Figure 7 This is an embodiment of a voice anti-counterfeiting attack detection device of this specification;
[0018] Figure 8 This is an embodiment of a voice anti-counterfeiting attack detection device in this specification. DETAILED DESCRIPTION
[0019] The embodiments of this specification provide a method, device and equipment for detecting voice counterfeiting attacks.
[0020] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0021] The embodiments of this specification provide an anti-counterfeiting attack detection mechanism for voice. Currently, generative artificial intelligence (AIGC) is an artificial intelligence technology that can autonomously learn and generate new content (including images, sounds, text, etc.) from data. Therefore, forged sounds or synthesized voices also pose security risks in the AIGC era. The potential risks that may be brought about by forged sounds or synthesized voices include the spread of false information, discrimination bias, user privacy leakage, and destruction of social trust. For this reason, it is necessary to provide a voice anti-counterfeiting attack detection solution that can effectively avoid the above potential risks, so as to protect the security of personal privacy data, prevent attacks with forged sounds or synthesized voices, and prevent the abuse of the above artificial intelligence technology. For specific processing, please refer to the specific content in the following embodiments.
[0022] like Figure 1As shown, an embodiment of this specification provides a method for detecting voice anti-counterfeiting attacks. The execution subject of the method may be a terminal device or a server, etc., wherein the terminal device may be a mobile terminal device such as a mobile phone, a tablet computer, or a computer device such as a laptop or a desktop computer, or an IoT device (specifically a smart watch, a vehicle-mounted device, etc.), etc., wherein the server may be an independent server, or a server cluster composed of multiple servers, etc. The server may be a background server for a financial service or an online shopping service, or a background server for an application, etc. In this embodiment, a detailed description is given by taking the execution subject as a server as an example. For the case where the execution subject is a terminal device, please refer to the following server case processing, which will not be repeated here. The method may specifically include the following steps:
[0023] In step S102, voice data to be detected is obtained.
[0024] Among them, the voice data can be data of any voice content, the voice data can be voice data of a certain preset natural language category, for example, the voice data can be Chinese voice data, or the voice data can be English voice data, etc. The voice data can be voice data of multiple different preset natural language categories, etc., and can be set specifically according to actual conditions.
[0025] In implementation, the voice data to be tested can be obtained in a variety of different ways. For example, before using certain voice data or processing certain voice data, the voice data can be first subjected to anti-counterfeiting detection to determine whether the voice data is forged or synthesized. At this time, the person requiring the detection can provide the voice data to be tested, thereby obtaining the voice data to be tested. For another example, when it is necessary to perform anti-counterfeiting detection on voice data input into a certain model (such as a large language model, a generative model, a biometric model, an identity recognition model, etc.), the voice data input into the above-mentioned model can be intercepted, and the voice data can be used as the voice data to be tested, etc. The specific settings can be based on actual conditions.
[0026] It should be noted that the voice data to be detected can be voice data consisting of sentences directly spoken by the user, or it can be data obtained after preprocessing the above voice data (such as voice error correction, voice cutting, etc.). It can be set specifically according to actual conditions, and the embodiments of this specification do not limit this.
[0027] In step S104, the above-mentioned voice data is input into a first coding sub-model composed of a plurality of coding blocks connected in series in a voice anti-counterfeiting attack detection model to obtain voice coding information output by each coding block.
[0028] Among them, the voice anti-counterfeiting attack detection model can be a model for anti-counterfeiting detection of voice data. Through the voice anti-counterfeiting attack detection model, it can be determined whether a certain voice data is forged voice data or synthesized voice data. The voice anti-counterfeiting attack detection model can be constructed by a variety of different algorithms or networks. For example, the voice anti-counterfeiting attack detection model can be constructed by a neural network, or the voice anti-counterfeiting attack detection model can be constructed by a feature extraction algorithm, a classification algorithm, etc., or the voice anti-counterfeiting attack detection model can be constructed by one or more Transformer blocks, or the voice anti-counterfeiting attack detection model can also be constructed by one or more different algorithms and combined with one or more networks, etc., which can be set according to actual conditions, and the embodiments of this specification do not limit this. The first coding sub-model can be a sub-model for encoding and processing voice data. The input voice data can be encoded by the first coding sub-model, so that the voice data is converted into specified data (such as a matrix or vector, etc.). The first coding sub-model can be constructed by a variety of different algorithms or networks. For example, the first coding sub-model can be constructed by a neural network, the first coding sub-model can also be constructed by one or more Transformer blocks, the first coding sub-model can also be constructed by a feature extraction algorithm, etc., the first coding sub-model can also be constructed by a specified encoder, which can be set according to actual conditions. A coding block can be a basic coding unit, and the coding block can encode the input data. In order to obtain a better coding effect, multiple coding blocks can be stacked and connected in series. For example, the multiple coding blocks include coding block 1, coding block 2 and coding block 3. The output end of coding block 1 can be connected to the input end of coding block 2, and the output end of coding block 2 can be connected to the input end of coding block 3. The input end of coding block 1 can be used to receive the input data of the first coding sub-model, and the output end of coding block 3 can be used to output the final encoding result of the above input data.
[0029] In practice, in order to perform anti-counterfeiting detection on voice data, the following method can be used: Figure 2 The model architecture shown in the figure sets up a voice anti-counterfeiting attack detection model, which may include a plurality of encoding blocks (i.e. Figure 2The first coding sub-model and speech processing sub-model are composed of coding blocks 1, coding block 2, coding block 3 and coding block 4 in series. The specific processing process can be: input the above-mentioned speech data into the first coding sub-model composed of multiple coding blocks in series in the speech anti-counterfeiting attack detection model, and obtain the speech coding information output by the first coding sub-model (that is, the speech coding information output by coding block 4), and then input the speech coding information output by the first coding sub-model into the speech processing sub-model to obtain the detection result corresponding to the speech data. However, the above method only considers the coding information finally output by multiple coding blocks, and in addition to the above information, other features or coding information that need to be paid attention to may also be included, such as the relationship between the coding information output by different coding blocks and other preferred features adapted to the specific task corresponding to the speech data, etc., so that the generalization ability of the model is limited and the accuracy of the detection result is poor. For this reason, the above processing can be improved, such as Figure 3 As shown, the specific processing can be as follows:
[0030] The voice anti-counterfeiting attack detection model can be constructed in a variety of different ways. The voice anti-counterfeiting attack detection model may include a first encoding sub-model for encoding the input voice data. In order to realize the encoding process, an encoding block can be set in the first encoding sub-model, and a first encoding sub-model with better effect can be constructed through multiple encoding blocks. In addition to encoding the voice data, the voice anti-counterfeiting attack detection model also needs to perform anti-counterfeiting detection on the voice data. For this purpose, a voice processing sub-model can also be set in the voice anti-counterfeiting attack detection model. Based on the above model architecture, a complete voice anti-counterfeiting attack detection model can be constructed, and then the specified training samples can be obtained, and the training samples can be used to train the voice anti-counterfeiting attack detection model constructed above, until the detection accuracy of the trained voice anti-counterfeiting attack detection model is higher than the preset threshold, and finally a voice anti-counterfeiting attack detection model that can be applied to actual business can be obtained.
[0031] The above-mentioned voice data can be input into the voice anti-counterfeiting attack detection model. The voice anti-counterfeiting attack detection model first provides the voice data to the first coding sub-model. The first coding sub-model can input the voice data into a structure in which multiple coding blocks are connected in series. The multiple coding blocks process the input data respectively, and the output result of each coding block can be obtained. For example, as in the above example, the output end of coding block 1 is connected to the input end of coding block 2, and the output end of coding block 2 is connected to the input end of coding block 3. The voice data can be input into coding block 1, and coding block 1 can encode the voice data to obtain a first intermediate result. Then, the first intermediate result can be input into coding block 2, and coding block 2 can encode the first intermediate result to obtain a second intermediate result. After that, the second intermediate result can be input into coding block 3, and coding block 3 can encode the second intermediate result to obtain the final encoding result of the above-mentioned input data. The output result of each coding block can be used as voice encoding information, so that the voice encoding information output by each coding block can be obtained. For example, based on the above example, the first intermediate result, the second intermediate result and the final encoding result are the voice encoding information output by each coding block.
[0032] It should be noted that the above-mentioned speech coding information not only encodes the speech data, but also includes the coding information of the speech features in the speech data, that is, the first coding sub-model can encode the speech data from audio data into specified data, and can perform feature extraction based on the encoded data to obtain the coding information containing the speech features in the speech data.
[0033] In step S106, based on the speech coding information output by each coding block in the multiple coding blocks, the speech data is subjected to anti-counterfeiting attack detection processing by the speech processing sub-model in the speech recognition model to obtain a detection result corresponding to the speech data.
[0034] Among them, the speech processing sub-model can be a sub-model used to perform anti-counterfeiting detection on the encoded speech data. The speech processing sub-model can specifically be a classification model. The speech processing sub-model can be used to determine whether the speech data is forged speech data or synthesized speech data. The speech processing sub-model can be constructed through a variety of different algorithms or networks. For example, the speech processing sub-model can be constructed through a neural network. The speech processing sub-model can also be constructed through a classification algorithm, etc., which can be set specifically according to actual conditions.
[0035] In implementation, Figure 3As shown, the speech coding information output by each coding block in the multiple coding blocks can be input into the speech processing sub-model in the speech recognition model. The speech coding information output by each coding block is processed by the speech processing sub-model to obtain a processing result that can determine whether the speech data is forged speech data or synthesized speech data. Specifically, the processing result can be the probability that the speech data is forged speech data or synthesized speech data, or the processing result can be a certain value or a specified character. At this time, a mapping relationship between the specified value or the specified character and the detection result can be pre-set, which can be set according to the actual situation. In this way, instead of using only the last output data of the first coding sub-model in common practice, the speech coding information output by each coding block in the multiple coding blocks in the first coding sub-model is extracted separately, and these speech coding information will be input into the speech processing sub-model in parallel, so that the information captured at different abstract levels can be fully utilized, so that the final detection result is more accurate.
[0036] The detection result corresponding to the voice data can be determined based on the processing result. Finally, the voice processing sub-model can output the detection result. Specifically, for example, the processing result can be the probability that the voice data is forged voice data or synthesized voice data. The probability can be compared with a preset probability threshold. If the probability is greater than the preset probability threshold, it can be determined that the voice data is forged voice data or synthesized voice data. At this time, subsequent processing can be rejected. If the probability is less than the preset probability threshold, it can be determined that the voice data is not forged voice data or synthesized voice data. At this time, subsequent processing can be continued (such as releasing the interception of the voice data so that the voice data enters the specified model or notifying the detection demand personnel that the voice data is risk-free and can be used or processed subsequently, etc.); the processing result can be a certain value or a specified character. The detection result corresponding to the value or the specified character can be found from the above-mentioned mapping relationship. If the obtained detection result indicates that the voice data is forged voice data or synthesized voice data, the subsequent processing can be rejected. If the obtained detection result indicates that the voice data is not forged voice data or synthesized voice data, the subsequent processing can be continued.
[0037] It should be noted that the specific processing of the above step S106 is only an optional processing method. In practical applications, multiple processing methods may be included, which can be set according to actual conditions. The embodiments of this specification do not limit this.
[0038] The embodiment of the present specification provides a method for detecting speech anti-counterfeiting attacks. The method obtains speech data to be detected, and then inputs the speech data into a first coding sub-model composed of a plurality of coding blocks connected in series in a speech anti-counterfeiting attack detection model to obtain speech coding information output by each coding block. Finally, based on the speech coding information output by each coding block in the plurality of coding blocks, the speech data can be processed for anti-counterfeiting attack detection by a speech processing sub-model in a speech recognition model to obtain a detection result corresponding to the speech data. In this way, the speech coding information output by each coding block in the plurality of coding blocks in the first coding sub-model is extracted respectively, and these features are input into the speech processing sub-model in parallel, thereby utilizing the coding information captured in different coding blocks, so that the speech anti-counterfeiting attack detection model can more accurately extract features with strong discrimination for anti-counterfeiting detection tasks, thereby improving the accuracy of detecting real speech and forged speech, and effectively avoiding potential risks such as the spread of false information, discrimination bias, leakage of user privacy, and destruction of social trust, protecting the security of personal privacy data, and preventing attacks with forged sounds or synthesized speech, and preventing the abuse of artificial intelligence technology.
[0039] In practical applications, in order to simplify the data processing process and save resources, the first encoding sub-model can be built based on the Whisper model. The Whisper model is a deep learning model for automatic speech recognition (ASR) (a large multi-task speech model). It is a model based on a deep Transformer network structure. The core of the model architecture of the Whisper model is the Transformer block, which can be specifically composed of multiple Transformer blocks stacked together. The Whisper model can specifically include an encoding part and a decoding part, both of which are constructed by Transformer blocks. A certain amount of sample data can be used to pre-train the Whisper model to obtain a pre-trained Whisper model. The pre-trained Whisper model can encode and decode the voice data. Based on this, the encoding part in the pre-trained Whisper model can be used to construct the first encoding sub-model in the voice anti-counterfeiting attack detection model. In this way, using the first encoding sub-model to encode the voice data is to use the encoding part in the pre-trained Whisper model to encode the voice data. Since the Whisper model is composed of a plurality of Transformer blocks stacked in series, the encoding part in the pre-trained Whisper model is also composed of a plurality of Transformer blocks stacked in series. Based on this, the first encoding sub-model is composed of a plurality of Transformer blocks stacked in series, and each of the plurality of encoding blocks in the first encoding sub-model is composed of a Transformer block. The Transformer block may include an attention layer and a feedforward neural network layer. In practical applications, the Transformer block may include a plurality of attention layers and a plurality of feedforward neural network layers, wherein the attention layer may be set with a plurality of different attention algorithms, for example, the attention layer may be set with a self-attention algorithm, a multi-head self-attention algorithm, etc., which may be specifically set according to actual conditions. A feed-forward neural network may be provided in the feed-forward neural network layer, and the specific hierarchical structure of multiple attention layers and multiple feed-forward neural network layers may be set according to actual conditions, and the embodiments of this specification do not limit this. Similarly, the speech processing sub-model may also be composed of multiple decoding blocks connected in series, and each decoding block in the multiple decoding blocks is composed of a Transformer block.
[0040] In order to facilitate the application of the above processing mechanism to actual business scenarios, a relatively smaller version of the Whisper model can be selected. For example, the Whisper model can be Whisper Tiny including 4 Transformer blocks, that is, the first coding sub-model includes 4 coding blocks, and the speech coding information of each of the 4 coding blocks can be extracted. The extracted features can be represented as Z, and its dimensions can be (B, L, T, dim), where B represents the batch size (i.e., Batch Size), L represents the number of coding blocks, and this value is set to 4 in the above example, T represents the length of the speech data, and the length value can include multiple values, for example, the length value can be a fixed value (5, 10, 20, 30), and dim represents the dimension of the speech coding information of each coding block, and its value can include multiple values, for example, the value can be 384, etc.
[0041] The specific processing methods of the above step S106 can be varied. An optional processing method is provided below. Figure 4 As shown, please refer to the processing of the following steps S1062 and S1064 for details.
[0042] In step S1062, the speech coding information output by each coding block in the multiple coding blocks is input into the feature processing module in the speech processing sub-model to obtain a first speech feature, wherein the first speech feature includes a feature whose correlation with the result of anti-counterfeiting attack detection of the speech data is higher than a preset correlation threshold.
[0043] Among them, the feature processing module can be a model for extracting or constructing features from the input data, the correlation between which is higher than a preset correlation threshold value and the result of the anti-counterfeiting attack detection of the voice data. The feature processing module can be constructed by a variety of different algorithms or networks. For example, the feature processing module can be constructed by a neural network, or the feature processing module can be constructed by a feature extraction algorithm, or the feature processing module can be constructed by one or more Transformer blocks, or the feature processing module can also be constructed by one or more different algorithms and in combination with one or more networks, etc. It can be set according to the actual situation, and the embodiments of this specification do not limit this. The correlation threshold can be set according to the actual situation, such as 90% or 95%.
[0044] In implementation, in order to more effectively apply the speech coding information output by the coding part in the pre-trained Whisper model (i.e., the speech coding information output by each coding block in the multiple coding blocks) to the speech anti-counterfeiting detection task, the speech coding information of the extracted multiple coding blocks can be improved so that it can more effectively extract information suitable for subsequent speech anti-counterfeiting detection tasks. To this end, a feature processing module can be set in the speech processing sub-model, and the speech processing sub-model including the feature processing module can be model trained through specified samples to obtain the trained feature processing module. The speech coding information output by each coding block in the multiple coding blocks is input in parallel into the feature processing module in the speech processing sub-model, and the feature with a high correlation (i.e., higher than a preset correlation threshold) with the result of the anti-counterfeiting attack detection of the speech data is extracted from the speech coding information output by each coding block through the feature processing module. Finally, a first speech feature including the above-mentioned feature can be obtained.
[0045] In step S1064, the first speech feature is input into the attack detection module in the speech processing sub-model to obtain a detection result corresponding to the speech data.
[0046] In implementation, since the first voice feature contains features that have a high correlation with the results of anti-counterfeiting attack detection of voice data (it can also be a feature that can more accurately have a stronger discriminant power for voice anti-counterfeiting detection tasks), after the first voice feature is input into the attack detection module in the voice processing sub-model, the attack detection module can accurately judge the voice data by combining the above features, and the final detection result will be more accurate.
[0047] In practical applications, considering that features with a high correlation with the results of anti-counterfeiting attack detection of voice data may involve multiple dimensions, among which the correlation between features of the time dimension and / or features of the network layer dimension and the results of anti-counterfeiting attack detection of voice data is more prominent, therefore, feature extraction can be performed from the time dimension and / or network layer dimension. Based on this, the feature processing module can be a feature processing module for time series data. At this time, the feature whose correlation with the results of anti-counterfeiting attack detection of voice data is higher than the preset correlation threshold may include a time feature whose correlation with the results of anti-counterfeiting attack detection of voice data is higher than the preset correlation threshold; and / or, the feature processing module can be a feature processing module for data between different network layers. At this time, the feature whose correlation with the results of anti-counterfeiting attack detection of voice data is higher than the preset correlation threshold includes a hierarchical correlation feature whose correlation with the results of anti-counterfeiting attack detection of voice data is higher than the preset correlation threshold (i.e., the correlation relationship feature between voice coding information output by different coding blocks in multiple coding blocks). In this way, the feature processing module for time series data helps the first encoding sub-model capture subtle time patterns that may indicate that the voice data has been tampered with, and the feature processing module for data between different network layers helps capture information at different network levels, thereby improving the accuracy of anti-counterfeiting attack detection.
[0048] In practical applications, the feature processing module can also be constructed by a Transformer block. The specific structure of the Transformer block can be varied. The Transformer block in the feature processing module can be different from the Transformer block in the first encoding sub-model. Specifically, Figure 5 As shown, the feature processing module includes multiple ( Figure 4 In the example, there are N feature processing modules connected in series. Each feature processing module includes a normalization layer, a multi-head self-attention layer, and a multi-layer perceptron layer. In order to simplify the processing process, the feature processing module can also include one (i.e. Figure 5 The specific structure of the feature processing module can be found in Figure 5 shown.
[0049] In practical applications, based on the model architecture of the above-mentioned voice anti-counterfeiting attack detection model, the voice anti-counterfeiting attack detection model can be trained in the following manner, and specifically refer to the processing of the following steps A02 to A12.
[0050] In step A02, a speech data sample is obtained.
[0051] In implementation, voice data samples can be obtained in a variety of ways. For example, historical voice data that meets preset conditions or preset requirements can be obtained from a specified database, and the obtained historical voice data can be used as a voice data sample. Alternatively, voice data that meets preset conditions or preset requirements can be crawled from the Internet by a web crawler, and the crawled voice data can be used as a voice data sample. Alternatively, voice data constructed by different users can be obtained from the users, and the voice data constructed by the users can be used as a voice data sample, etc. The specific settings can be based on actual conditions.
[0052] In step A04, the speech data sample is input into the first coding sub-model composed of a plurality of coding blocks connected in series in the speech anti-counterfeiting attack detection model, and the sample coding information output by each coding block is obtained.
[0053] In implementation, in order to simplify the data processing process and save resources, the first coding sub-model can be constructed based on the Whisper model, that is, the coding part in the pre-trained Whisper model can be used to construct the first coding sub-model in the voice anti-counterfeiting attack detection model, or the first coding sub-model can also be constructed by a variety of different algorithms or networks, which can be set according to actual conditions. The specific processing of the above step A04 can refer to the above-mentioned related content, which will not be repeated here.
[0054] In step A06, the sample coding information output by each coding block in the multiple coding blocks is input into the feature processing module for time series data in the speech processing sub-model in the speech anti-counterfeiting attack detection model to obtain the sample time feature whose correlation with the result of anti-counterfeiting attack detection of the speech data sample is higher than the preset correlation threshold.
[0055] In step A08, the sample coding information output by each coding block in the multiple coding blocks is input into the feature processing module for data between different network layers in the speech processing sub-model in the speech anti-counterfeiting attack detection model, so as to obtain sample-level correlation features whose correlation with the results of anti-counterfeiting attack detection of the speech data sample is higher than a preset correlation threshold.
[0056] In step A10, the first speech feature including the sample time feature and the sample level association feature is input into the attack detection module in the speech processing sub-model to obtain the detection result corresponding to the speech data sample.
[0057] The specific processing of the above steps A06 to A10 can refer to the above-mentioned related content and will not be repeated here. Through the above processing, the feature processing module for time series data helps the first coding sub-model to capture subtle time patterns that may indicate that the voice data sample has been tampered with, and the feature processing module for data between different network layers helps to capture information at different network levels, thereby improving the performance of the voice anti-counterfeiting attack detection model in anti-counterfeiting attack detection. Moreover, the voice anti-counterfeiting attack detection model can more accurately extract features with strong discriminative power for anti-counterfeiting detection tasks, thereby improving the generalization ability of the voice anti-counterfeiting attack detection model in anti-counterfeiting attack detection in unknown fields.
[0058] In step A12, based on the detection results corresponding to the voice data samples and a preset loss function, the first encoding sub-model and the voice processing sub-model are jointly trained to obtain a trained voice anti-counterfeiting attack detection model.
[0059] Among them, the loss function may include multiple types, such as mean square error loss function, cross entropy loss function, etc., which can be set according to actual conditions, and the embodiments of this specification do not limit this.
[0060] In implementation, the corresponding loss information can be calculated based on the detection results corresponding to the speech data samples using a preset loss function, and the model parameters in the first coding sub-model and the speech processing sub-model can be adjusted based on the loss information to obtain the first coding sub-model after the model parameters are adjusted and the speech processing sub-model after the model parameters are adjusted. Then, the corresponding loss information can be obtained through the above processing process, and the model parameters in the first coding sub-model and the speech processing sub-model can be adjusted based on the loss information, so as to iteratively train the first coding sub-model and the speech processing sub-model, and finally obtain the trained first coding sub-model and the trained speech processing sub-model, and then obtain the trained speech anti-counterfeiting attack detection model.
[0061] In practical applications, there are various specific processing methods for the above step A02. An optional processing method is provided below. For details, please refer to the processing of the following steps A022 to A026.
[0062] In step A022, a plurality of initial historical voice data are obtained.
[0063] In implementation, the initial historical voice data can be obtained in a variety of ways. For example, historical voice data that meets preset conditions or preset requirements can be obtained from a specified database, and the obtained historical voice data can be used as the initial historical voice data. Alternatively, voice data that meets preset conditions or preset requirements can be crawled from the Internet through a web crawler, and the crawled voice data can be used as the initial historical voice data. Alternatively, voice data constructed by different users can be obtained from the users, and the voice data constructed by the users can be used as the initial historical voice data, etc. The specific settings can be based on actual conditions.
[0064] In step A024, multiple initial historical voice data are filtered and processed using preset data filtering rules to obtain filtered initial historical voice data. The data filtering rules include one or more of rules for deleting initial historical voice data that does not belong to a preset natural language category, rules for deleting initial historical voice data with errors, and rules for deleting duplicate initial historical voice data.
[0065] The rule for deleting the initial historical voice data that does not belong to the preset natural language category is specifically, for example, a rule for deleting the initial historical voice data that does not belong to English, or a rule for deleting the initial historical voice data that does not belong to Chinese, etc. The rule for deleting the initial historical voice data with errors is specifically, for example, a rule for deleting the initial historical voice data with grammatical or sentence errors, etc.
[0066] In step A026, a speech data sample is constructed based on the filtered initial historical speech data.
[0067] In practical applications, there are various specific processing methods for the above step S102. An optional processing method is provided below, such as Figure 6 As shown, please refer to the processing of the following steps S1022 to S1026 for details.
[0068] In step S1022, first voice data input by a user is received.
[0069] In step S1024, the first speech data is converted into corresponding spectrogram data, and the spectrogram data is subjected to audio feature extraction processing and / or time series compression processing to obtain processed first speech data.
[0070] The spectrogram data may include multiple types, such as mel-spectrogram data, speech spectrogram data, cepstrum data, etc., which may be specifically set according to actual conditions.
[0071] In implementation, the first voice data can be converted from time domain data to corresponding Mel-spectrogram data, and the above conversion process can be implemented through a pre-trained model (such as a neural network model or a specified large model, etc.), or the above conversion process can also be implemented through a preset time-frequency conversion algorithm (such as Fourier transform, etc.), which can be set according to actual conditions. Then, the spectrogram data can be subjected to audio feature extraction processing and / or time series compression processing to obtain the processed first voice data, which can be implemented through a pre-trained model (such as a neural network model or a specified pre-trained large model, etc.), or it can be implemented through a preset algorithm (such as a feature extraction algorithm, a compression algorithm, etc.), which can be set according to actual conditions.
[0072] In step S1026, the processed first voice data is used as voice data to be detected.
[0073] The embodiment of the present specification provides a method for detecting speech anti-counterfeiting attacks. The method obtains speech data to be detected, and then inputs the speech data into a first coding sub-model composed of a plurality of coding blocks connected in series in a speech anti-counterfeiting attack detection model to obtain speech coding information output by each coding block. Finally, based on the speech coding information output by each coding block in the plurality of coding blocks, the speech data can be processed for anti-counterfeiting attack detection by a speech processing sub-model in a speech recognition model to obtain a detection result corresponding to the speech data. In this way, the speech coding information output by each coding block in the plurality of coding blocks in the first coding sub-model is extracted respectively, and these features are input into the speech processing sub-model in parallel, thereby utilizing the coding information captured in different coding blocks, so that the speech anti-counterfeiting attack detection model can more accurately extract features with strong discrimination for anti-counterfeiting detection tasks, thereby improving the accuracy of detecting real speech and forged speech, and effectively avoiding potential risks such as the spread of false information, discrimination bias, leakage of user privacy, and destruction of social trust, protecting the security of personal privacy data, and preventing attacks with forged sounds or synthesized speech, and preventing the abuse of artificial intelligence technology.
[0074] In addition, the feature processing module for time series data helps the first encoding sub-model capture subtle time patterns that may indicate that the voice data has been tampered with, and the feature processing module for data between different network layers helps capture information at different network levels, thereby improving the accuracy of anti-counterfeiting attack detection.
[0075] The above is a voice anti-counterfeiting attack detection method provided by the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a voice anti-counterfeiting attack detection device, such as Figure 7 shown.
[0076] The voice anti-counterfeiting attack detection device comprises: a data acquisition module 701, an encoding module 702 and an anti-counterfeiting detection module 703, wherein:
[0077] The data acquisition module 701 acquires the voice data to be detected;
[0078] The encoding module 702 inputs the voice data into a first encoding sub-model composed of a plurality of encoding blocks connected in series in the voice anti-counterfeiting attack detection model, and obtains voice encoding information output by each encoding block;
[0079] The anti-counterfeiting detection module 703 performs anti-counterfeiting attack detection processing on the voice data through the voice processing sub-model in the voice recognition model based on the voice coding information output by each coding block in the multiple coding blocks, and obtains the detection result corresponding to the voice data.
[0080] In an embodiment of the present specification, each of the multiple encoding blocks is composed of a Transformer block, the Transformer block includes an attention layer and a feedforward neural network layer, the speech processing sub-model is composed of a plurality of decoding blocks connected in series, and each of the multiple decoding blocks is composed of a Transformer block.
[0081] In the embodiment of this specification, the anti-counterfeiting detection module 703 includes:
[0082] a feature processing unit, inputting speech coding information output by each coding block in the plurality of coding blocks into a feature processing module in the speech processing submodel to obtain a first speech feature, wherein the first speech feature includes a feature whose correlation with a result of anti-counterfeiting attack detection of the speech data is higher than a preset correlation threshold;
[0083] The anti-counterfeiting detection unit inputs the first voice feature into the attack detection module in the voice processing sub-model to obtain a detection result corresponding to the voice data.
[0084] In an embodiment of the present specification, the feature processing module is a feature processing module for time series data, and the feature whose correlation with the result of the anti-counterfeiting attack detection on the voice data is higher than a preset correlation threshold includes a time feature whose correlation with the result of the anti-counterfeiting attack detection on the voice data is higher than the preset correlation threshold; and / or, the feature processing module is a feature processing module for data between different network layers, and the feature whose correlation with the result of the anti-counterfeiting attack detection on the voice data is higher than the preset correlation threshold includes a hierarchical correlation feature whose correlation with the result of the anti-counterfeiting attack detection on the voice data is higher than the preset correlation threshold.
[0085] In the embodiment of this specification, the feature processing module includes multiple feature processing modules, and the multiple feature processing modules are connected in series, and each feature processing module includes a normalization layer, a multi-head self-attention layer and a multi-layer perceptron layer.
[0086] In the embodiment of this specification, the device further includes:
[0087] A sample acquisition module, which acquires speech data samples;
[0088] A sample encoding module, inputting the voice data sample into a first encoding sub-model composed of the plurality of encoding blocks connected in series in the voice anti-counterfeiting attack detection model, and obtaining sample encoding information output by each encoding block;
[0089] A first feature extraction module, inputting the sample encoding information output by each encoding block in the plurality of encoding blocks into a feature processing module for time series data in a speech processing sub-model in the speech anti-counterfeiting attack detection model, and obtaining a sample time feature whose correlation with the result of the anti-counterfeiting attack detection of the speech data sample is higher than a preset correlation threshold;
[0090] A second feature extraction module inputs the sample encoding information output by each encoding block in the multiple encoding blocks into a feature processing module for data between different network layers in a speech processing submodel in the speech anti-counterfeiting attack detection model, and obtains a sample-level correlation feature whose correlation with the result of the anti-counterfeiting attack detection of the speech data sample is higher than a preset correlation threshold;
[0091] A sample anti-counterfeiting detection module, which inputs the first voice feature including the sample time feature and the sample level association feature into the attack detection module in the voice processing sub-model to obtain a detection result corresponding to the voice data sample;
[0092] The training module jointly trains the first encoding sub-model and the speech processing sub-model based on the detection results corresponding to the speech data samples and a preset loss function to obtain a trained speech anti-counterfeiting attack detection model.
[0093] In the embodiment of this specification, the sample acquisition module includes:
[0094] A historical data acquisition unit, which acquires a plurality of initial historical voice data;
[0095] A screening unit, which screens the plurality of initial historical voice data using a preset data screening rule to obtain screened initial historical voice data, wherein the data screening rule includes one or more of a rule for deleting initial historical voice data that does not belong to a preset natural language category, a rule for deleting initial historical voice data with errors, and a rule for deleting duplicate initial historical voice data;
[0096] The sample construction unit constructs the speech data sample based on the screened initial historical speech data.
[0097] In the embodiment of this specification, the data acquisition module 701 includes:
[0098] A voice receiving unit, receiving first voice data input by a user;
[0099] a speech processing unit, which converts the first speech data into corresponding spectrogram data, and performs audio feature extraction processing and / or time series compression processing on the spectrogram data to obtain processed first speech data;
[0100] The data determination unit uses the processed first voice data as voice data to be detected.
[0101] The embodiment of the present specification provides a voice anti-counterfeiting attack detection device, which obtains voice data to be detected, and then inputs the voice data into a first coding sub-model composed of a plurality of coding blocks connected in series in a voice anti-counterfeiting attack detection model to obtain voice coding information output by each coding block. Finally, based on the voice coding information output by each coding block in the plurality of coding blocks, the voice data can be processed for anti-counterfeiting attack detection by a voice processing sub-model in a voice recognition model to obtain a detection result corresponding to the voice data. In this way, the voice coding information output by each coding block in the plurality of coding blocks in the first coding sub-model is extracted respectively, and these features are input into the voice processing sub-model in parallel, thereby utilizing the coding information captured in different coding blocks, so that the voice anti-counterfeiting attack detection model can more accurately extract features with strong discrimination for anti-counterfeiting detection tasks, thereby improving the accuracy of detecting real voice and forged voice, and can not only effectively avoid potential risks such as the spread of false information, discrimination bias, user privacy leakage, and destruction of social trust, protect the security of personal privacy data, and prevent attacks with forged sounds or synthesized voices, but also prevent the abuse of artificial intelligence technology.
[0102] In addition, the feature processing module for time series data helps the first encoding sub-model capture subtle time patterns that may indicate that the voice data has been tampered with, and the feature processing module for data between different network layers helps capture information at different network levels, thereby improving the accuracy of anti-counterfeiting attack detection.
[0103] The above is a voice anti-counterfeiting attack detection device provided in the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a voice anti-counterfeiting attack detection device, such as Figure 8 shown.
[0104] The voice anti-counterfeiting attack detection device may provide a terminal device or a server, etc. for the above embodiment.
[0105] The anti-counterfeiting attack detection device for voice may have relatively large differences due to different configurations or performances, and may include one or more processors 801 and memory 802, and one or more storage applications or data may be stored in the memory 802. Among them, the memory 802 may be a short-term storage or a permanent storage. The application stored in the memory 802 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the anti-counterfeiting attack detection device for voice. Furthermore, the processor 801 may be configured to communicate with the memory 802, and execute a series of computer executable instructions in the memory 802 on the anti-counterfeiting attack detection device for voice. The anti-counterfeiting attack detection device for voice may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input and output interfaces 805, and one or more keyboards 806.
[0106] Specifically, in this embodiment, the voice anti-counterfeiting attack detection device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the voice anti-counterfeiting attack detection device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:
[0107] Acquire the voice data to be detected;
[0108] Inputting the voice data into a first coding sub-model composed of a plurality of coding blocks connected in series in a voice anti-counterfeiting attack detection model, and obtaining voice coding information output by each coding block;
[0109] Based on the speech coding information output by each coding block in the multiple coding blocks, anti-counterfeiting attack detection processing is performed on the speech data through the speech processing sub-model in the speech recognition model to obtain a detection result corresponding to the speech data.
[0110] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the voice anti-counterfeiting attack detection device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0111] The embodiment of the present specification provides a voice anti-counterfeiting attack detection device, which obtains voice data to be detected, and then can input the voice data into a first coding sub-model composed of multiple coding blocks connected in series in a voice anti-counterfeiting attack detection model to obtain voice coding information output by each coding block. Finally, based on the voice coding information output by each coding block in the multiple coding blocks, the voice data can be processed for anti-counterfeiting attack detection by a voice processing sub-model in a voice recognition model to obtain a detection result corresponding to the voice data. In this way, by extracting the voice coding information output by each coding block in the multiple coding blocks in the first coding sub-model respectively, these features will be input into the voice processing sub-model in parallel, thereby utilizing the coding information captured in different coding blocks, so that the voice anti-counterfeiting attack detection model can more accurately extract features with strong discrimination for anti-counterfeiting detection tasks, thereby improving the accuracy of detecting real voice and forged voice, and can not only effectively avoid potential risks such as the spread of false information, discrimination bias, user privacy leakage, and destruction of social trust, protect the security of personal privacy data, and prevent attacks with forged sounds or synthesized voices, but also prevent the abuse of artificial intelligence technology.
[0112] Furthermore, based on the above Figures 1 to 6 In one embodiment, the present specification further provides a storage medium for storing computer executable instruction information. In a specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc. When the computer executable instruction information stored in the storage medium is executed by the processor, the following process can be implemented:
[0113] Acquire the voice data to be detected;
[0114] Inputting the voice data into a first coding sub-model composed of a plurality of coding blocks connected in series in a voice anti-counterfeiting attack detection model, and obtaining voice coding information output by each coding block;
[0115] Based on the speech coding information output by each coding block in the multiple coding blocks, anti-counterfeiting attack detection processing is performed on the speech data through the speech processing sub-model in the speech recognition model to obtain a detection result corresponding to the speech data.
[0116] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the above-mentioned storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0117] The embodiment of the present specification provides a storage medium, by acquiring voice data to be detected, and then the voice data can be input into a first coding sub-model composed of multiple coding blocks connected in series in a voice anti-counterfeiting attack detection model to obtain voice coding information output by each coding block, and finally, based on the voice coding information output by each coding block in the multiple coding blocks, the voice data can be processed for anti-counterfeiting attack detection by a voice processing sub-model in a voice recognition model to obtain a detection result corresponding to the voice data, so that the voice coding information output by each coding block in the multiple coding blocks in the first coding sub-model is extracted respectively, and these features will be input into the voice processing sub-model in parallel, so as to utilize the coding information captured in different coding blocks, so that the voice anti-counterfeiting attack detection model can more accurately extract features with strong discrimination for anti-counterfeiting detection tasks, thereby improving the accuracy of detecting real voice and forged voice, and can not only effectively avoid potential risks such as the spread of false information, discrimination bias, user privacy leakage, and destruction of social trust, protect the security of personal privacy data, and prevent attacks with forged sounds or synthesized voices, but also prevent the abuse of artificial intelligence technology.
[0118] Furthermore, based on the above Figures 1 to 6 In one or more embodiments of the present specification, a computer program product is provided, including a computer program. When the computer program in the computer program product is executed by a processor, the following process can be implemented:
[0119] Acquire the voice data to be detected;
[0120] Inputting the voice data into a first coding sub-model composed of a plurality of coding blocks connected in series in a voice anti-counterfeiting attack detection model, and obtaining voice coding information output by each coding block;
[0121] Based on the speech coding information output by each coding block in the multiple coding blocks, anti-counterfeiting attack detection processing is performed on the speech data through the speech processing sub-model in the speech recognition model to obtain a detection result corresponding to the speech data.
[0122] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the above-mentioned computer program product embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0123] The embodiment of the present specification provides a computer program product, which obtains voice data to be detected, and then inputs the voice data into a first coding sub-model composed of multiple coding blocks connected in series in a voice anti-counterfeiting attack detection model to obtain voice coding information output by each coding block. Finally, based on the voice coding information output by each coding block in the multiple coding blocks, the voice data can be processed for anti-counterfeiting attack detection by a voice processing sub-model in a voice recognition model to obtain a detection result corresponding to the voice data. In this way, by extracting the voice coding information output by each coding block in the multiple coding blocks in the first coding sub-model respectively, these features will be input into the voice processing sub-model in parallel, thereby utilizing the coding information captured in different coding blocks, so that the voice anti-counterfeiting attack detection model can more accurately extract features with strong discrimination for anti-counterfeiting detection tasks, thereby improving the accuracy of detecting real voice and forged voice, and can not only effectively avoid potential risks such as the spread of false information, discrimination bias, user privacy leakage, and destruction of social trust, protect the security of personal privacy data, and prevent attacks with forged sounds or synthesized voices, but also prevent the abuse of artificial intelligence technology.
[0124] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0125] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0126] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0127] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0128] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0129] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0130] The embodiments of this specification are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable fraud case serial and parallel device to produce a machine, so that the instructions executed by the processor of the computer or other programmable fraud case serial and parallel device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0131] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable fraud case serial and parallel device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0132] These computer program instructions may also be loaded onto a computer or other programmable device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0133] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0134] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0135] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0136] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0137] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0138] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0139] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0140] The above description is only an embodiment of this specification and is not intended to limit this document. For those skilled in the art, this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims of this specification.
Claims
1. A voice anti-counterfeiting attack detection method, the method comprising: Acquire the voice data to be detected; Inputting the voice data into a first coding sub-model composed of a plurality of coding blocks connected in series in a voice anti-counterfeiting attack detection model, and obtaining voice coding information output by each coding block; Based on the speech coding information output by each coding block in the multiple coding blocks, anti-counterfeiting attack detection processing is performed on the speech data through the speech processing sub-model in the speech recognition model to obtain a detection result corresponding to the speech data.
2. According to the method of claim 1, each of the multiple encoding blocks is composed of a Transformer block, the Transformer block includes an attention layer and a feedforward neural network layer, the speech processing sub-model is composed of a plurality of decoding blocks connected in series, and each of the multiple decoding blocks is composed of a Transformer block.
3. The method according to claim 2, wherein based on the speech coding information output by each coding block in the plurality of coding blocks, the speech data is subjected to anti-counterfeiting attack detection processing by a speech processing sub-model in the speech recognition model to obtain a detection result corresponding to the speech data, comprising: Inputting speech coding information output by each coding block in the plurality of coding blocks into a feature processing module in the speech processing sub-model to obtain a first speech feature, wherein the first speech feature includes a feature whose correlation with a result of anti-counterfeiting attack detection of the speech data is higher than a preset correlation threshold; The first speech feature is input into the attack detection module in the speech processing sub-model to obtain a detection result corresponding to the speech data.
4. According to the method according to claim 3, the feature processing module is a feature processing module for time series data, and the feature whose correlation with the result of the anti-counterfeiting attack detection of the voice data is higher than the preset correlation threshold includes a time feature whose correlation with the result of the anti-counterfeiting attack detection of the voice data is higher than the preset correlation threshold; and / or, the feature processing module is a feature processing module for data between different network layers, and the feature whose correlation with the result of the anti-counterfeiting attack detection of the voice data is higher than the preset correlation threshold includes a hierarchical correlation feature whose correlation with the result of the anti-counterfeiting attack detection of the voice data is higher than the preset correlation threshold.
5. According to the method described in claim 3, the feature processing module comprises a plurality of feature processing modules, and the plurality of feature processing modules are connected in series, and each of the feature processing modules comprises a normalization layer, a multi-head self-attention layer and a multi-layer perceptron layer.
6. The method according to claim 4, further comprising: Obtaining voice data samples; Inputting the voice data sample into the first coding sub-model composed of the plurality of coding blocks connected in series in the voice anti-counterfeiting attack detection model, and obtaining sample coding information output by each coding block; Inputting the sample encoding information output by each of the plurality of encoding blocks into a feature processing module for time series data in a speech processing submodel in the speech anti-counterfeiting attack detection model, and obtaining a sample time feature whose correlation with the result of the anti-counterfeiting attack detection of the speech data sample is higher than a preset correlation threshold; Inputting the sample encoding information output by each encoding block in the plurality of encoding blocks into a feature processing module for data between different network layers in a speech processing submodel in the speech anti-counterfeiting attack detection model, and obtaining a sample-level correlation feature whose correlation with the result of the anti-counterfeiting attack detection of the speech data sample is higher than a preset correlation threshold; Inputting the first speech feature including the sample time feature and the sample level association feature into the attack detection module in the speech processing sub-model to obtain a detection result corresponding to the speech data sample; Based on the detection results corresponding to the voice data samples and a preset loss function, the first encoding sub-model and the voice processing sub-model are jointly trained to obtain a trained voice anti-counterfeiting attack detection model.
7. The method according to claim 6, wherein obtaining the voice data sample comprises: Acquire multiple initial historical voice data; The plurality of initial historical voice data are screened and processed by a preset data screening rule to obtain screened initial historical voice data, wherein the data screening rule includes one or more of a rule for deleting initial historical voice data that does not belong to a preset natural language category, a rule for deleting initial historical voice data with errors, and a rule for deleting duplicate initial historical voice data; The speech data sample is constructed based on the filtered initial historical speech data.
8. The method according to claim 1, wherein obtaining the voice data to be detected comprises: Receiving first voice data input by a user; Converting the first speech data into corresponding spectrogram data, and performing audio feature extraction processing and / or time series compression processing on the spectrogram data to obtain processed first speech data; The processed first voice data is used as voice data to be detected.
9. A voice anti-counterfeiting attack detection device, the device comprising: A data acquisition module, which acquires the voice data to be detected; The encoding module inputs the voice data into a first encoding sub-model composed of a plurality of encoding blocks connected in series in the voice anti-counterfeiting attack detection model, and obtains the voice encoding information output by each encoding block; The anti-counterfeiting detection module performs anti-counterfeiting attack detection processing on the voice data through the voice processing sub-model in the voice recognition model based on the voice coding information output by each coding block in the multiple coding blocks, and obtains the detection result corresponding to the voice data.
10. A voice anti-counterfeiting attack detection device, the voice anti-counterfeiting attack detection device comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: Acquire the voice data to be detected; Inputting the voice data into a first coding sub-model composed of a plurality of coding blocks connected in series in a voice anti-counterfeiting attack detection model, and obtaining voice coding information output by each coding block; Based on the speech coding information output by each coding block in the multiple coding blocks, anti-counterfeiting attack detection processing is performed on the speech data through the speech processing sub-model in the speech recognition model to obtain a detection result corresponding to the speech data.
