An audio detection method, device, electronic equipment and computer readable storage medium

By combining audio type recognition and text information matching with trie technology, the system automatically detects whether audio files violate regulations, solving the problems of high cost and low efficiency of manual review and achieving efficient and accurate audio violation detection.

CN114420129BActive Publication Date: 2026-03-31SHANGHAI ZHENGDA XIMALAYA NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-20
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, violation detection of audio files relies on manual review, which is costly and inefficient. Furthermore, it only reviews the text of the audio file from a single perspective, resulting in low accuracy.

Method used

By acquiring the audio to be detected, determining its type, and converting it into text information, the system automatically detects whether the audio violates regulations by using a sensitive word database and trie matching technology in conjunction with the audio type, and conducts review based on both audio and text dimensions.

Benefits of technology

It improves the accuracy and efficiency of audio detection, realizes automated multi-dimensional violation detection, and reduces labor costs and time consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114420129B_ABST
    Figure CN114420129B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an audio detection method, device, electronic equipment and computer readable storage medium, the method comprises: obtaining audio to be detected, determining the type of audio to be detected, determining the text information corresponding to the audio to be detected, matching the text information with each sensitive word in the sensitive word library to obtain a matching result, and determining whether the audio to be detected is target audio based on the type of audio to be detected and the matching result. Combining two dimensions of audio detection and text detection, automatically detecting whether the audio is illegal, improving the accuracy and efficiency of audio detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of audio processing, and more specifically, to an audio detection method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] With the booming development of audio live streaming services, uploaded audio files are converted into text through speech recognition, and then the converted text is reviewed by humans to determine whether the audio file violates regulations.

[0003] Judging whether audio is in violation based on manual review is costly and inefficient. It only reviews the text of the audio file, resulting in low accuracy. Summary of the Invention

[0004] The purpose of this invention is to provide an audio detection method, apparatus, electronic device, and computer-readable storage medium that can improve the accuracy and efficiency of audio detection.

[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0006] In a first aspect, embodiments of this application provide an audio detection method, the method comprising:

[0007] Obtain the audio to be detected;

[0008] Determine the type of the audio to be detected;

[0009] Determine the text information corresponding to the audio to be detected;

[0010] The text information is matched with each sensitive word in the sensitive word database to obtain the matching results;

[0011] Based on the type of the audio to be detected and the matching result, it is determined whether the audio to be detected is the target audio.

[0012] In an optional implementation, the step of matching the text information with each sensitive word in the sensitive word database to obtain a matching result includes:

[0013] The text information is segmented to obtain multiple segments, each segment consisting of N characters, with the (N-1)th character serving as a prefix for the Nth character;

[0014] The first character in the first group of segments, which consists of the first character of the text information, is matched with a trie in a sensitive word library, wherein the trie is composed of sensitive words;

[0015] If a node matching the first character exists in the trie, the second character in the first group segment is matched against the trie.

[0016] If no node matching the second character exists in the trie, it is determined that the text information does not match any sensitive words in the sensitive word database.

[0017] In an optional implementation, the method further includes:

[0018] If a node matching the second character exists in the trie, each target character is matched with a node in the trie in the order of the multiple target characters in the first group segment, excluding the first character and the second character.

[0019] If a node matching the terminal character exists in the trie, it is determined that the text information contains a sensitive word, wherein multiple target characters include the terminal character.

[0020] In an optional implementation, the step of determining whether the audio to be detected is the target audio based on the type of the audio to be detected and the matching result includes:

[0021] If the type of the audio to be detected is a violation type and the matching result is a sensitive word, then the audio to be detected is determined to be the target audio.

[0022] If the type of the audio to be detected is a violation type and the matching result is a non-sensitive word, then the audio to be detected is determined to be the target audio.

[0023] If the type of the audio to be detected is non-violation and the matching result is a sensitive word, then the audio to be detected is determined to be the target audio.

[0024] If the type of the audio to be detected is non-violation type and the matching result is non-sensitive word, the audio to be detected is determined to be normal audio.

[0025] In an optional implementation, the step of determining the type of the audio to be detected includes:

[0026] The audio to be detected is input into the audio detection model to determine the type of the audio.

[0027] In an optional implementation, the audio detection model includes a CNN model and a residual module.

[0028] Secondly, embodiments of this application provide an audio detection device, the device comprising:

[0029] Acquisition module and processing module;

[0030] The acquisition module is used to acquire the audio to be detected;

[0031] The processing module is used to determine the type of the audio to be detected; determine the text information corresponding to the audio to be detected; match the text information with each sensitive word in the sensitive word library to obtain a matching result; and determine whether the audio to be detected is the target audio based on the type of the audio to be detected and the matching result.

[0032] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the audio detection method.

[0033] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the audio detection method.

[0034] This application has the following beneficial effects:

[0035] This application acquires the audio to be detected, determines its type, identifies the corresponding text information, matches the text information against sensitive words in a sensitive word database, obtains the matching results, and determines whether the audio is the target audio based on its type and the matching results. By combining audio detection and text detection, it automatically detects whether audio violates regulations, improving the accuracy and efficiency of audio detection. Attached Figure Description

[0036] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 A block diagram of an electronic device provided in an embodiment of the present invention;

[0038] Figure 2 This is one of the flowcharts of an audio detection method provided in an embodiment of the present invention;

[0039] Figure 3 This is the second flowchart of an audio detection method provided in an embodiment of the present invention;

[0040] Figure 4 A schematic diagram of a trie provided for an embodiment of the present invention;

[0041] Figure 5 This is a structural block diagram of an audio detection device provided in an embodiment of the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0043] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0044] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0045] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0046] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0047] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "set up," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0048] Through extensive research, the inventors discovered that for uploaded audio files, speech recognition converts the audio into text, and then manual review of the converted text is used to determine whether the audio file violates regulations. However, manual review is costly and inefficient, relying solely on the text for a single-dimensional review, resulting in low accuracy.

[0049] In view of the above-mentioned problems, this embodiment provides an audio detection method, apparatus, electronic device, and computer-readable storage medium, which can improve the accuracy and efficiency of audio detection. The solution provided in this embodiment will be described in detail below.

[0050] This embodiment provides an electronic device capable of detecting audio. In one possible implementation, the electronic device can be a user terminal, such as, but not limited to, a server, smartphone, personal computer (PC), tablet computer, personal digital assistant (PDA), mobile internet device (MID), etc.

[0051] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application. The electronic device 100 may further include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.

[0052] The electronic device 100 includes an audio detection device 110, a memory 120, and a processor 130.

[0053] The components of the memory 120 and processor 130 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The audio detection device 110 includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or embedded in the operating system (OS) of the electronic device 100. The processor 130 is used to execute the executable modules stored in the memory 120, such as the software function modules and computer programs included in the audio detection device 110.

[0054] The memory 120 may be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 120 is used to store programs, and the processor 130 executes the programs after receiving execution instructions.

[0055] Please refer to Figure 2 , Figure 2 For application Figure 1 The flowchart below shows an audio detection method for an electronic device 100, and the method includes a detailed description of each step.

[0056] Step 201: Obtain the audio to be detected.

[0057] Step 202: Determine the type of audio to be detected.

[0058] Step 203: Determine the text information corresponding to the audio to be detected.

[0059] Step 204: Match the text information with each sensitive word in the sensitive word database to obtain the matching results.

[0060] Step 205: Based on the type of the audio to be detected and the matching results, determine whether the audio to be detected is the target audio.

[0061] The audio to be detected can be obtained from historical audio files or from real-time recorded audio. The audio to be detected can also be an audio file uploaded by the user to a third-party application. This application embodiment does not specifically limit the method of obtaining the audio to be detected.

[0062] When uploading audio to be tested to a third-party application, the uploaded audio needs to be tested. If there is illegal content in the audio, the audio cannot be uploaded.

[0063] For the detection of the audio to be detected, the type of the audio to be detected is determined. The type of audio to be detected can be such as moaning, chanting, noise, reading aloud, singing, etc. Among them, moaning, chanting, and noise are illegal types, while reading aloud and singing are non-illegal types.

[0064] There are several ways to determine the type of audio to be detected. In one example, the type of audio to be detected can be determined by inputting the audio to be detected into an audio detection model and outputting the type of the audio detection model. In another example, preset audio features of the audio to be detected are identified. When the audio to be detected contains preset audio features, the type of audio to be detected is determined based on the matching preset audio features. These preset audio features include moaning sounds, chanting sounds, and noise sounds, among others.

[0065] The audio detection model includes a CNN model and a residual module.

[0066] CNN models can include LeNet models, VGG models, etc., and residual modules can solve the problem of difficult deep training of networks.

[0067] In addition to determining the type of audio to be detected, it is also necessary to check whether the recorded audio content in the audio to be detected violates regulations.

[0068] In one example, to determine whether the audio recorded in the audio to be detected violates regulations, it is necessary to first convert the audio to be detected into text information, identify whether there are sensitive words in the text information, and determine that the text information of the audio to be detected violates regulations if sensitive words are identified in the text information.

[0069] It should be noted that there are no specific restrictions on the order of detecting the type of audio to be detected first or detecting whether there are sensitive words in the text information of the audio to be detected first.

[0070] If the type of the audio to be detected is a violation and the matching result is a sensitive word, the audio to be detected is determined to be the target audio; if the type of the audio to be detected is a violation and the matching result is a non-sensitive word, the audio to be detected is determined to be the target audio; if the type of the audio to be detected is a non-violation and the matching result is a sensitive word, the audio to be detected is determined to be the target audio; if the type of the audio to be detected is a non-violation and the matching result is a non-sensitive word, the audio to be detected is determined to be normal audio.

[0071] Optionally, when the type of the audio to be detected is detected as moaning, chanting, or noise, it is not necessary to convert the audio to be detected into text information and detect whether there is sensitive information in the text type. Instead, the audio to be detected is directly output as the target audio, where the target audio indicates that the audio to be detected violates regulations.

[0072] Optionally, when the type of the audio to be detected is normal, that is, the type of the audio to be detected is reading, singing, etc., it is necessary to convert the audio to be detected into text information and match the text information of the audio to be detected with each sensitive word in the sensitive word library. If the text information contains sensitive words, the audio to be detected is determined to be the target audio, that is, the audio to be detected is determined to be in violation.

[0073] Optionally, if the type of the audio to be detected is normal and the text information of the audio to be detected does not contain any sensitive information, the audio to be detected is determined to be non-target audio. Here, non-target audio indicates that the audio to be detected is normal audio, and the audio to be detected is allowed to be uploaded to a third-party application.

[0074] This application acquires the audio to be detected, determines its type, identifies the corresponding text information, matches the text information against sensitive words in a sensitive word database, obtains the matching results, and determines whether the audio is the target audio based on its type and the matching results. By combining audio detection and text detection, it automatically detects whether audio violates regulations, improving the accuracy and efficiency of audio detection.

[0075] To determine whether the text information of the audio to be detected contains sensitive words, regarding step 204 above, in another embodiment of this application, such as... Figure 3 As shown, an audio measurement method is provided, which specifically includes the following steps:

[0076] Step 204-1: Segment the text information to obtain multiple segments.

[0077] Each segment consists of N characters, with the (N-1)th character serving as a prefix for the Nth character.

[0078] Step 204-2: Match the first character of the first group segment consisting of the first character of the text information with the trie in the sensitive word database.

[0079] The trie is composed of sensitive words.

[0080] Step 204-3: If a node matching the first character exists in the trie, match the second character in the first group segment with the trie.

[0081] Step 204-4: If no node matching the second character exists in the trie, determine that the text information does not match any sensitive words in the sensitive word database.

[0082] Step 204-5: If a node matching the second character exists in the trie, match each target character with a node in the trie in the order of the multiple target characters in the first group segment, excluding the first and second characters.

[0083] Step 204-6: If a node matching the terminal character exists in the trie, determine that the text information contains sensitive words.

[0084] Among them, multiple target characters include terminal characters.

[0085] The sensitive word database contains a trie, where the dictionary is constructed from the sensitive words. For example, in the sensitive word "ABCD", the first three characters form the intermediate nodes, and the last character forms the leaf nodes. Each character of each sensitive word is a node, and the last character is a leaf node. A characteristic of the trie is that traversing a path from the root node to a leaf node represents one sensitive word; obviously, N sensitive words will have N paths. However, there is only one node for each character. Figure 4 The node for "B" was shared by two sensitive words. Secondly, the order from the root node to the leaf node, and from root to leaf, is consistent with the order of the sensitive words. During the matching process, if a mismatch is found in an intermediate node, the matching can be terminated early, without having to traverse the entire path. That is, if a prefix of a word is in the trie, matching continues until the entire word is matched; however, if a prefix is ​​not in the trie, matching stops.

[0086] For example, refer to Figure 4 A diagram of a trie. Figure 4 The dataset contains three sensitive words: ABCD, ABEF, and GH. A trie is constructed based on ABCD, ABEF, and GH. The text information of the audio to be detected is determined to be ABJK. After segmenting the text information, the first group of segments is obtained as: A character, AB character, ABJ character, and ABJK character. The A character is a prefix of the AB character, the AB character is a prefix of the ABJ character, and the ABJ character is a prefix of the ABJK character. The first character A in the first group of segments is matched, but A is not a leaf node, so the sensitive word is not matched. Figure 4 The trie contains a node that matches the character A. The second character of the first segment, i.e., AB, is matched, but B is not a leaf node, so the sensitive word is not matched. Figure 4 The Chinese trie contains a node that matches the characters AB. The third character in the first segment, i.e., ABJ, is matched, but... Figure 4 In the trie, node B only has nodes C and E below it, but not J. Therefore, the node containing the character ABJ does not match, and the sensitive word is not detected. Since ABJ is a prefix of ABJK, and the prefix of ABJK does not match any nodes in the trie, ABJK does not need to be matched. At this point, the matching process for each character in the first group of segments ends.

[0087] After segmenting the text information, we get the following segments: the second segment is composed of the characters B, BJ, and BJK; the third segment is composed of the characters J and JK; the fourth segment is composed of the characters J and JK; and the fifth segment is composed of the character K. We attempt to match the first character (B) in the second segment. However, since there is no node for B at the beginning of the trie, the sensitive word is not matched. Therefore, the characters BJ and BJK do not need to be matched either, as B is a prefix of BJ and BJK. Similarly, for the segments starting with J and K, we only match the first character. If the first character does not match the sensitive word, subsequent characters do not need to be matched either.

[0088] For example, if a node matching the second character exists in the trie, each target character in the first group of segments (excluding the first and second characters) is matched against the nodes in the trie in sequence. If a node matching the last character exists in the trie, the text information is determined to contain a sensitive word, where multiple target characters include the last character. For example, if the text information is ABCD, after segmenting the text information, the first group of segments is: A, AB, ABC, and ABCD; the second group of segments is: B, BC, and BCD; the third group of segments is: C and CD; and the fourth group of segments is D. The first character A in the first group of segments is matched, but A is not a leaf node, so no sensitive word is matched. Figure 4 The trie contains a node that matches the character A. The second character of the first segment, i.e., AB, is matched, but B is not a leaf node, so the sensitive word is not matched. Figure 4 The Chinese trie contains a node that matches the characters AB. The third character in the first segment, namely the characters ABC, is matched. However, C is not a leaf node, so the sensitive word is not matched. The fourth character in the first segment, namely the characters ABCD, is matched. D is a leaf node. Therefore, the text information ABCD is a sensitive word. At this time, the characters ABCD are the end characters.

[0089] In another example, the text information is ABGH. After segmenting the text information, the first group of segments is: A, AB, ABG, and ABGH; the second group of segments is: B, BG, and BGH; the third group of segments is: G and GH; and the fourth group of segments is: G. The first character in the first group of segments, i.e., the character A, is selected for matching. Figure 4In the trie, A is not a leaf node, so A does not match the sensitive word. The second character of the second segment in the first group, AB, is matched. B is not a leaf node, so AB does not match the sensitive word. The third character of the first segment, ABG, is then matched, but... Figure 4 In the trie, node B only has nodes C and E below it, but no G. Therefore, the node containing the characters ABG does not match, and the sensitive word is not detected. Since ABG is a prefix of ABGH, and there is no corresponding node for ABG in the trie, there is no need to match ABGH. Taking the characters from the second group of segments and matching them against the trie in the same way as the first group of segments, we can see that there is no node for B at the beginning of the trie, so the sensitive word is not detected, and there is no need to match B, BG, or BGH.

[0090] Extract characters from the third segment, matching the 'G' character. Figure 4 In the text, the character G is not a leaf node, so the character G does not match the sensitive word. The second character GH in the third segment is then matched. The character H is a leaf node. Therefore, the text information ABGH matches the keyword GH, and thus the text information AHGH contains the sensitive word.

[0091] The trie-based method for sensitive word matching of text information in the audio to be detected reduces the overall complexity and difficulty of sensitive word matching compared to existing technologies that match each word with each word in the sensitive word database.

[0092] When performing sensitive word matching on the text information of the audio to be tested based on a trie, if a sensitive word is matched, the audio to be tested is determined to have violated sensitive word rules. When performing sensitive word matching on the text information of the audio to be tested based on a trie, if no sensitive word is matched, the audio to be tested is determined to have not violated sensitive word rules.

[0093] Besides matching the text information of the audio to be detected against a trie in a sensitive word database to determine the matching result, other methods for detecting the audio to be detected include:

[0094] The text information of the audio to be detected is determined and input into a text classification model to obtain the corresponding classification. This classification includes at least normal and sensitive categories. Based on the type of the audio to be detected and the classification of its text information, it is ultimately determined whether the audio to be detected is the target audio. If the audio to be detected is classified as normal and its text information is classified as normal, then the audio to be detected is determined to be non-target audio, i.e., the target audio is considered illegal audio.

[0095] If the type of the audio to be detected is abnormal, and the text information of the audio to be detected is classified as a sensitive category, then the audio to be detected is determined to be the target audio. Furthermore, it is determined that both the sound and content of the audio to be detected violate regulations.

[0096] If the type of the audio to be detected is abnormal, but the text information of the audio to be detected is classified as normal, and the audio to be detected is the target audio, and the sound of the audio to be detected is illegal.

[0097] If the type of the audio to be detected is normal and the text information of the audio to be detected is classified as sensitive, the audio to be detected is determined to be the target audio and the content of the audio to be detected is determined to be illegal.

[0098] Please refer to Figure 5 This application embodiment also provides an application for Figure 1 The audio detection device 110 of the electronic device 100 includes:

[0099] Acquisition module 111 and processing module 112;

[0100] The acquisition module 111 is used to acquire the audio to be detected;

[0101] The processing module 112 is used to determine the type of the audio to be detected; determine the text information corresponding to the audio to be detected; match the text information with each sensitive word in the sensitive word library to obtain a matching result; and determine whether the audio to be detected is the target audio based on the type of the audio to be detected and the matching result.

[0102] Optionally, the processing module 112 is further configured to:

[0103] The text information is segmented to obtain multiple segments, each segment consisting of N characters, with the (N-1)th character serving as a prefix for the Nth character;

[0104] The first character in the first group of segments, which consists of the first character of the text information, is matched with a trie in a sensitive word library, wherein the trie is composed of sensitive words;

[0105] If a node matching the first character exists in the trie, the second character in the first group segment is matched against the trie.

[0106] If no node matching the second character exists in the trie, it is determined that the text information does not match any sensitive words in the sensitive word database.

[0107] Optionally, the processing module 112 is further configured to:

[0108] If a node matching the second character exists in the trie, each target character is matched with a node in the trie in the order of the multiple target characters in the first group segment, excluding the first character and the second character.

[0109] If a node matching the terminal character exists in the trie, the text information is determined to contain a sensitive word, wherein multiple target characters include the terminal character.

[0110] Optionally, the processing module 112 is further configured to:

[0111] If the type of the audio to be detected is a violation type and the matching result is a sensitive word, then the audio to be detected is determined to be the target audio.

[0112] If the type of the audio to be detected is a violation type and the matching result is a non-sensitive word, then the audio to be detected is determined to be the target audio.

[0113] If the type of the audio to be detected is non-violation and the matching result is a sensitive word, then the audio to be detected is determined to be the target audio.

[0114] If the type of the audio to be detected is non-violation type and the matching result is non-sensitive word, the audio to be detected is determined to be normal audio.

[0115] Optionally, the processing module 112 is further configured to:

[0116] The audio to be detected is input into the audio detection model to determine the type of the audio.

[0117] Optionally, the audio detection model includes a CNN model and a residual module.

[0118] In summary, this application acquires the audio to be detected, determines its type, identifies the corresponding text information, matches the text information with sensitive words in a sensitive word database to obtain matching results, and determines whether the audio to be detected is the target audio based on the audio type and the matching results. By combining audio detection and text detection, it automatically detects whether audio violates regulations, improving the accuracy and efficiency of audio detection.

[0119] This application also provides an electronic device 100, which includes a processor 130 and a memory 120. The memory 120 stores computer-executable instructions, which, when executed by the processor 130, implement the audio detection method.

[0120] This application embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor 130, implements the audio detection method.

[0121] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, 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 marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive 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 a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0122] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. If the function is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0123] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0124] The above descriptions are merely various embodiments 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 technical scope 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.

Claims

1. An audio detection method, characterized by, The method comprises: acquiring audio to be detected; determining the type of the audio to be detected; determining text information corresponding to the audio to be detected; matching the text information with each sensitive word in a sensitive word library to obtain a matching result; determining whether the audio to be detected is target audio based on the type of the audio to be detected and the matching result; the step of matching the text information with each sensitive word in the sensitive word library to obtain a matching result comprises: segmenting the text information to obtain multiple segments, wherein each segment comprises N characters, and an (N-1)-th character is a prefix of an N-th character; matching a first character in a first segment composed of a first word of the text information with a dictionary tree in the sensitive word library, wherein the dictionary tree is composed of sensitive words; in a case where a node matching the second character exists in the dictionary tree, matching a second character in the first segment with the dictionary tree; in a case where a node matching the second character does not exist in the dictionary tree, determining that the first segment does not hit a sensitive word in the sensitive word library, and proceeding to the next segment matching.

2. The method of claim 1, wherein, The method further comprises: in a case where a node matching the second character exists in the dictionary tree, sequentially matching each target character with a node of the dictionary tree in the order of multiple target characters other than the first character and the second character in the first segment; in a case where a node matching a terminal character exists in the dictionary tree, determining that the text information contains a sensitive word, wherein the multiple target characters include the terminal character.

3. The method of claim 1, wherein, The step of determining whether the audio to be detected is target audio based on the type of the audio to be detected and the matching result comprises: in a case where the type of the audio to be detected is a violation type and the matching result is a sensitive word, determining that the audio to be detected is target audio; in a case where the type of the audio to be detected is a violation type and the matching result is a non-sensitive word, determining that the audio to be detected is target audio; in a case where the type of the audio to be detected is a non-violation type and the matching result is a sensitive word, determining that the audio to be detected is target audio; in a case where the type of the audio to be detected is a non-violation type and the matching result is a non-sensitive word, determining that the audio to be detected is normal audio.

4. The method of claim 1, wherein, The step of determining the type of the audio to be detected comprises: inputting the audio to be detected into an audio detection model to determine the type of the audio.

5. The method of claim 4, wherein, The audio detection model comprises a CNN model and a residual module.

6. An audio detection apparatus, characterized by, The device comprises an acquisition module and a processing module; the acquisition module is configured to acquire audio to be detected; the processing module is configured to determine the type of the audio to be detected, determine text information corresponding to the audio to be detected, match the text information with each sensitive word in a sensitive word library to obtain a matching result, and determine whether the audio to be detected is target audio based on the type of the audio to be detected and the matching result; the processing module is further configured to: segmenting the text information to obtain a plurality of segments, wherein each segment includes N characters, and an (N-1)th character is a prefix of an Nth character; matching a first character in a first segment composed of a first word of the text information with a dictionary tree in a sensitive word library, wherein the dictionary tree is composed of sensitive words; in a case where a node matching the first character exists in the dictionary tree, matching a second character in the first segment with the dictionary tree; in a case where a node matching the second character does not exist in the dictionary tree, determining that the first segment does not hit a sensitive word in the sensitive word library, and proceeding with matching of a next segment.

7. An electronic device, comprising: a computer program product, comprising a memory storing the computer program and a processor, wherein the processor implements the steps of the method according to any one of claims 1-5 when executing the computer program.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, the computer program product, wherein the computer program is executed by the processor to implement the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Video violation content detection method and device and storage medium

    CN110798703A

  • Content review method based on sensitive marks

    CN110941729A