Borborygmus recognition device and method based on audio technology
By introducing the sliding window attention mechanism module in the Densnet-121 model, the problem of low accuracy of intestinal rumbling recognition is solved, better feature extraction and recognition effect is achieved, and the accuracy and efficiency of intestinal rumbling recognition is improved. .
Patent Information
- Application Number
- CN202410948962.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-26
AI Technical Summary
The accuracy of the recognition of intestinal rumbling sounds in the prior art is not high and the understanding of features is limited, resulting in unsatisfactory recognition effect.
Using the intestinal rumbling recognition device and method based on audio technology, using the improved Densnet-121 model, the sliding window attention mechanism module is added in dense blocks, and the spectral diagram is fully understood through the channel connection of the feature matrix and the window self-attention mechanism. feature connections in improve the feature extraction ability of the recognition model.
It improves the accuracy and effect of intestinal rumbling recognition, overcomes the problem of limited understanding of features in the prior art, improves the ability of the identification model to understand the spectrum map, and saves computing resources.
Smart Images

Figure CN119028374A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of biological signal processing, and in particular to a bowel sound recognition device and method based on audio technology. Background Art
[0002] Bowel sounds refer to the intermittent gurgling sound or the sound of gas passing through water produced by the flow of gas and liquid in the intestines when the intestines move. It has important clinical value. Under normal circumstances, bowel sounds occur about 4-5 times per minute. However, due to the strong randomness and large individual differences of bowel sounds, the identification of bowel sounds is a relatively difficult task.
[0003] At present, the recognition of bowel sounds mainly relies on doctors using a stethoscope, which not only requires doctors to have rich experience, but is also time-consuming and labor-intensive. Although there are now some solutions that use recognition algorithms to analyze bowel sounds, the understanding of the features is limited during the processing, resulting in less than ideal recognition accuracy and effect, and lack of good reference value. Summary of the invention
[0004] In view of the technical defects mentioned in the background technology, the purpose of the embodiments of the present invention is to provide a bowel sound recognition device and method based on audio technology to improve the understanding of features and thus improve the recognition accuracy.
[0005] To achieve the above objectives, in a first aspect, an embodiment of the present invention provides a bowel sound recognition device based on audio technology, the device comprising:
[0006] An acquisition module, used to acquire bowel sound data to be identified input by the front end; wherein the bowel sound data includes a plurality of short sound segments;
[0007] A conversion module, used to convert each short sound clip into a spectrogram containing frequency domain information;
[0008] Processing modules for:
[0009] The spectrum graph is transmitted to a pre-trained recognition model for recognition processing to obtain a corresponding recognition result: wherein the recognition model is trained based on an improved Densnet-121 model; the improved Densnet-121 model is used to extract features of the frequency domain information in the spectrum graph, and the improved Densnet-121 model includes a dense block, and a sliding window attention mechanism module is added to the dense block, so that the recognition model can fully understand the potential connection between the features.
[0010] As a specific implementation of the present application, the recognition model uses a sound segment data set annotated with data labels for supervised learning training to establish an association between sound features and data labels.
[0011] As a specific implementation of the present application, a sliding window attention mechanism module is added to the dense block, specifically:
[0012] On the basis of channel connection of the feature matrix of the dense block, the self-attention mechanism operation of the window is introduced, and the window size is set; then, a layer of feature matrix after channel connection is selected, and the window area is divided based on the window size, and the feature reorganization of the attention mechanism is performed inside the window area to obtain the reorganized feature vector after the attention mechanism is performed;
[0013] Then, the reorganized feature vector replaces the feature vector of the original window area;
[0014] Finally, the window is moved in the direction of the length and width of the feature matrix to perform the next round of attention mechanism operations and feature updates until the window moves through the entire feature matrix.
[0015] As a specific implementation of the present application, during the recognition process, the trained recognition model encodes and reorganizes the transmitted spectrum graph, wherein the recognition model includes four improved dense block stacks, each dense block is connected by a standard transition layer, and the specific processing includes:
[0016] Obtain the feature representation of the improved Densnet-121 model;
[0017] Finally, the feature representation is mapped to the corresponding category space through two fully connected layers to obtain the final feature vector of the model.
[0018] As a specific implementation of the present application, the sliding window attention mechanism module is inserted into the dense block.
[0019] In a second aspect, an embodiment of the present invention further provides a method for recognizing bowel sounds based on audio technology, the method comprising:
[0020] Obtaining bowel sound data to be identified from a front-end input; wherein the bowel sound data includes a plurality of short sound segments;
[0021] Convert each short sound clip into a spectrogram containing frequency domain information;
[0022] The spectrum graph is transmitted to a pre-trained recognition model for recognition processing to obtain a corresponding recognition result: wherein the recognition model is trained based on an improved Densnet-121 model; the improved Densnet-121 model is used to extract features of the frequency domain information in the spectrum graph, and the improved Densnet-121 model includes a dense block, and a sliding window attention mechanism module is added to the dense block, so that the recognition model can fully understand the potential connection between the features.
[0023] In a third aspect, an embodiment of the present invention further provides a bowel sound recognition device based on audio technology, including a memory and a processor;
[0024] The memory is used to store executable instructions;
[0025] The processor is used to execute the executable instructions stored in the memory to implement the bowel sound recognition method based on audio technology as described in the second aspect.
[0026] The technical solution provided by the embodiment of the present invention uses an improved Densnet-121 model to extract features from the frequency domain information in the spectrogram, and adds a sliding window attention mechanism module to the dense block, so that the recognition model can fully understand the potential connection between the features;
[0027] At the same time, by introducing the application of windows, while saving computing resources, the recognition model's understanding of the spectrum diagram is further improved; thereby overcoming the limited understanding of features in the existing technology, which results in the recognition accuracy and effect being unsatisfactory and lacking good reference. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the specific implementation of the present invention or the technical solution in the prior art, the drawings required for use in the specific implementation or the description of the prior art are briefly introduced below.
[0029] Figure 1 It is a principle block diagram of a bowel sound recognition device based on audio technology provided by an embodiment of the present invention;
[0030] Figure 2 is an overall schematic diagram of an improved dense block provided by an embodiment of the present invention;
[0031] Figure 3 is a schematic diagram of a sliding window attention mechanism provided by an embodiment of the present invention;
[0032] Figure 4 It is a flow chart of a bowel sound recognition method based on audio technology provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0035] Please refer to Figures 1 to 3 , an embodiment of the present invention provides a bowel sound recognition device based on audio technology, the device comprising:
[0036] An acquisition module, used to acquire bowel sound data to be identified input by the front end; wherein the bowel sound data includes a plurality of short sound segments;
[0037] The conversion module is used to convert each short sound clip into a spectrogram containing frequency domain information; when applied, the corresponding audio is also preprocessed, such as Mel-spectrogram, etc.
[0038] Processing modules for:
[0039] The spectrum graph is transmitted to a pre-trained recognition model for recognition processing to obtain a corresponding recognition result: wherein the recognition model is trained based on an improved Densnet-121 model; the improved Densnet-121 model is used to extract features of the frequency domain information in the spectrum graph, and the improved Densnet-121 model includes a dense block, and a sliding window attention mechanism module is added to the dense block, so that the recognition model can fully understand the potential connection between the features.
[0040] During implementation, the bowel sound data is collected based on a digital stethoscope and transmitted to the front end by communication; the digital stethoscope has good auscultation effect and can be easily recorded; the front end includes a web page or a smart terminal, which will not be elaborated here; the features recorded in the article can be understood as feature vectors.
[0041] DenseNet-121 consists of 121 weight layers, including 4 Dense blocks, totaling 2×(6+12+24+16)=116 weight layers, plus 1 convolution layer of initial input + 3 transition layers + the final fully connected layer of output, totaling 121 layers;
[0042] It should be noted that the internal operation of the dense block of the original Densnet-121 model is: after the feature matrix passes through the convolution layer, the output feature matrix and the original feature matrix are connected in the channel dimension. The original feature matrix not only contains the previous layer, but also all the upper layers in a single dense block.
[0043] In this embodiment, the recognition model is constructed by performing supervised learning training using a sound segment data set annotated with data labels to establish an association between sound features and data labels.
[0044] Specifically, the dataset used for training is desensitized to extract the corresponding short sound segments with corresponding annotated data labels; for example, the data label of a segment is enhanced / weakened / normal bowel sounds; the dataset can be divided into a training set, a test set, and a validation set;
[0045] By converting the time domain information of the audio into the frequency domain for processing, it is easier to recognize and learn when the recognition model is trained; by conducting supervised training on the recognition model, AI model parameters that can handle medical tasks are obtained.
[0046] In this embodiment, a sliding window attention mechanism module is added to the dense block, specifically:
[0047] On the basis of channel connection of the feature matrix of the dense block, the self-attention mechanism operation of the window is introduced, and the window size is set; then, a layer of feature matrix after channel connection is selected, and the window area is divided based on the window size, and the feature reorganization of the attention mechanism is performed inside the window area to obtain the reorganized feature vector after the attention mechanism is performed;
[0048] For example, the window size is defined as a window h*w, where h is the height of the window and w is the width of the window;
[0049] Then, the reorganized feature vector replaces the feature vector of the original window area;
[0050] Finally, the window is moved in the direction of the length and width of the feature matrix to perform the next round of attention mechanism operations and feature updates until the window moves through the entire feature matrix.
[0051] It should be noted that, except for the feature matrix extracted by frequency domain analysis of the audio, the remaining feature matrices exist inside the model and are hidden features inside the model, such as the feature matrix containing the above window area.
[0052] At the same time, the sliding window attention mechanism module is inserted into the dense block; the dense block includes channel connection and convolution, which can be inserted after a channel connection;
[0053] When applied, the number of the inserted sliding window attention mechanism modules can be adjusted based on the configuration of computing resources.
[0054] In this embodiment, during the recognition process, the trained recognition model encodes and reorganizes the transmitted spectrum graph, wherein the recognition model includes four improved dense block stacks, each dense block is connected by a standard transition layer, and the specific process includes:
[0055] 1. Obtain the feature representation of the improved Densnet-121 model;
[0056] In order to further extract the high-level features of bowel sound events and improve the accuracy of bowel sound recognition, this model uses 4 improved dense blocks to stack, and each dense block is connected with a standard transition layer. The specific operations are as follows:
[0057] First, the spectrogram is input into the model and passes through conventional convolutional and pooling layers to change the dimension and size of the feature matrix, which facilitates the feature extraction of dense blocks in the future;
[0058] Then, the convolution and pooling feature matrix is passed through 4 layers of improved Densnet-121 dense blocks and multiple layers of standard transition layers to obtain a better hidden feature matrix; the improved Densnet-121 dense block can better capture the potential connection between feature vectors, allowing the model to focus on feature vectors that can help complete the task, and improving the ability of the model's subsequent network layers to process feature matrices;
[0059] 2. Finally, the feature representation is mapped to the corresponding category space through two fully connected layers to obtain the final feature vector of the model, thereby establishing an association with the data label.
[0060] Specifically, the feature representation obtained in the above step 1 is mapped to the corresponding category space through two fully connected layers to obtain the final feature vector of the model; thereby establishing an association with the data label; in the dimension of the final feature vector, the audio recognition result is usually the category corresponding to the largest probability, and finally the result is returned to the user for corresponding reference.
[0061] The above scheme uses an improved Densnet-121 model to extract features from the frequency domain information in the spectrogram, and adds a sliding window attention mechanism module to the dense block, so that the recognition model can fully understand the potential connection between the features;
[0062] At the same time, by introducing the application of windows, while saving computing resources, the recognition model's understanding of the spectrum diagram is further improved; thereby overcoming the limited understanding of features in the existing technology, which results in the recognition accuracy and effect being unsatisfactory and lacking good reference.
[0063] Reference Figure 4 Based on the same inventive concept, an embodiment of the present invention further provides a method for recognizing bowel sounds based on audio technology, the method comprising:
[0064] S101 obtains bowel sound data to be identified input by a front end; wherein the bowel sound data includes a plurality of short sound segments;
[0065] S102, converting each short sound clip into a spectrogram containing frequency domain information;
[0066] S103, transmitting the spectrum graph to a pre-trained recognition model for recognition processing to obtain a corresponding recognition result: wherein the recognition model is trained based on an improved Densnet-121 model; using the improved Densnet-121 model to extract features of the frequency domain information in the spectrum graph, the improved Densnet-121 model includes a dense block, and a sliding window attention mechanism module is added to the dense block, so that the recognition model can fully understand the potential connection between the features.
[0067] Furthermore, a sliding window attention mechanism module is added to the dense block, specifically:
[0068] On the basis of channel connection of the feature matrix of the dense block, the self-attention mechanism operation of the window is introduced, and the window size is set; then, a layer of feature matrix after channel connection is selected, and the window area is divided based on the window size, and the feature reorganization of the attention mechanism is performed inside the window area to obtain the reorganized feature vector after the attention mechanism is performed;
[0069] Then, the reorganized feature vector replaces the feature vector of the original window area;
[0070] Finally, the window is moved in the direction of the length and width of the feature matrix to perform the next round of attention mechanism operations and feature updates until the window moves through the entire feature matrix.
[0071] When applied, the sliding window attention mechanism module is inserted into the dense block.
[0072] During the recognition process, the trained recognition model encodes and reorganizes the transmitted spectrum graph, wherein the recognition model includes four improved dense block stacks, each dense block is connected by a standard transition layer, and the specific processing includes:
[0073] Obtain the feature representation of the improved Densnet-121 model;
[0074] Finally, the feature representation is mapped to the corresponding category space through two fully connected layers to obtain the final feature vector of the model.
[0075] It should be noted that for a more specific description of the workflow of the method embodiment, please refer to the aforementioned device embodiment part, which will not be repeated here.
[0076] The entire scheme uses an improved Densnet-121 model to extract features from the frequency domain information in the spectrogram, and adds a sliding window attention mechanism module to the dense block, so that the recognition model can fully understand the potential connection between the features;
[0077] At the same time, by introducing the application of windows, while saving computing resources, the recognition model's understanding of the spectrum diagram is further improved; thereby overcoming the limited understanding of features in the existing technology, which results in the recognition accuracy and effect being unsatisfactory and lacking good reference.
[0078] The embodiment of the present invention also provides a bowel sound recognition device based on audio technology, including a memory and a processor;
[0079] The memory is used to store executable instructions;
[0080] The processor is used to execute the executable instructions stored in the memory to implement the bowel sound recognition method based on audio technology as described above.
[0081] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0082] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0083] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0084] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A bowel sound recognition device based on audio technology, It is characterized in that The device comprises: An acquisition module, used to acquire bowel sound data to be identified input by the front end; wherein the bowel sound data includes a plurality of short sound segments; A conversion module, used to convert each short sound clip into a spectrogram containing frequency domain information; Processing modules for: The spectrum graph is transmitted to a pre-trained recognition model for recognition processing to obtain a corresponding recognition result: wherein the recognition model is trained based on an improved Densnet-121 model; the improved Densnet-121 model is used to extract features of the frequency domain information in the spectrum graph, and the improved Densnet-121 model includes a dense block, and a sliding window attention mechanism module is added to the dense block, so that the recognition model can fully understand the potential connection between the features.
2. A bowel sound recognition device based on audio technology as claimed in claim 1, It is characterized in that The recognition model uses a sound segment data set annotated with data labels for supervised learning training to establish an association between sound features and data labels.
3. A bowel sound recognition device based on audio technology as claimed in claim 2, It is characterized in that A sliding window attention mechanism module is added to the dense block, specifically: On the basis of channel connection of the feature matrix of the dense block, the self-attention mechanism operation of the window is introduced, and the window size is set; then, a layer of feature matrix after channel connection is selected, and the window area is divided based on the window size, and the feature reorganization of the attention mechanism is performed inside the window area to obtain the reorganized feature vector after the attention mechanism is performed; Then, the reorganized feature vector replaces the feature vector of the original window area; Finally, the window is moved in the direction of the length and width of the feature matrix to perform the next round of attention mechanism operations and feature updates until the window moves through the entire feature matrix.
4. A bowel sound recognition device based on audio technology as claimed in claim 3, It is characterized in that During the recognition process, the trained recognition model encodes and reorganizes the transmitted spectrum graph, wherein the recognition model includes four improved dense block stacks, each dense block is connected by a standard transition layer, and the specific processing includes: Obtain the feature representation of the improved Densnet-121 model; Finally, the feature representation is mapped to the corresponding category space through two fully connected layers to obtain the final feature vector of the model.
5. A bowel sound recognition device based on audio technology as claimed in any one of claims 1 to 4, It is characterized in that The sliding window attention mechanism module is inserted into the dense block.
6. A method for bowel sound recognition based on audio technology, It is characterized in that The method comprises: Obtaining bowel sound data to be identified from a front-end input; wherein the bowel sound data includes a plurality of short sound segments; Convert each short sound clip into a spectrogram containing frequency domain information; The spectrum graph is transmitted to a pre-trained recognition model for recognition processing to obtain a corresponding recognition result: wherein the recognition model is trained based on an improved Densnet-121 model; the improved Densnet-121 model is used to extract features of the frequency domain information in the spectrum graph, and the improved Densnet-121 model includes a dense block, and a sliding window attention mechanism module is added to the dense block, so that the recognition model can fully understand the potential connection between the features.
7. A method for recognizing bowel sounds based on audio technology as claimed in claim 6, It is characterized in that A sliding window attention mechanism module is added to the dense block, specifically: On the basis of channel connection of the feature matrix of the dense block, the self-attention mechanism operation of the window is introduced, and the window size is set; then, a layer of feature matrix after channel connection is selected, and the window area is divided based on the window size, and the feature reorganization of the attention mechanism is performed inside the window area to obtain the reorganized feature vector after the attention mechanism is performed; Then, the reorganized feature vector replaces the feature vector of the original window area; Finally, the window is moved in the direction of the length and width of the feature matrix to perform the next round of attention mechanism operations and feature updates until the window moves through the entire feature matrix.
8. A method for recognizing bowel sounds based on audio technology as claimed in claim 7, It is characterized in that During the recognition process, the trained recognition model encodes and reorganizes the transmitted spectrum graph, wherein the recognition model includes four improved dense block stacks, each dense block is connected by a standard transition layer, and the specific processing includes: Obtain the feature representation of the improved Densnet-121 model; Finally, the feature representation is mapped to the corresponding category space through two fully connected layers to obtain the final feature vector of the model.
9. A method for recognizing bowel sounds based on audio technology as claimed in claim 6, It is characterized in that The sliding window attention mechanism module is inserted into the dense block.
10. A bowel sound recognition device based on audio technology, It is characterized in that including memory and processor; The memory is used to store executable instructions; The processor is used to execute the executable instructions stored in the memory to implement the bowel sound recognition method based on audio technology as described in any one of claims 6 to 9.
