A pipeline parallel-based Yangtze finless porpoise acoustic data processing and analysis scheduling method and system
By employing a pipelined parallel processing method, the problem of low efficiency in processing massive compressed audio data from multiple Yangtze finless porpoise acoustic monitoring devices was solved, enabling efficient data import, decompression, and analysis, and improving the utilization rate of computing resources and the efficiency of result archiving.
Patent Information
- Application Number
- CN202611254278.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-11-06
AI Technical Summary
In existing technologies, the processing of massive amounts of compressed audio data recovered by multiple Yangtze finless porpoise acoustic monitoring devices suffers from low efficiency in data import, decompression, cache scheduling, and acoustic signal analysis and processing. This is especially problematic when multiple data sources are recovered simultaneously, leading to I/O blocking, insufficient utilization of computing resources, and waiting for decompression results to be analyzed.
A pipelined parallel processing method is adopted, which reads compressed audio data in parallel through multiple data reading channels, processes it in blocks and decompresses it in parallel. A high-speed circular buffer and a thread-safe task queue are used to realize pipelined parallelism of decompression and analysis. The decompression thread rate is adjusted by combining read and write pointers, task description information is generated, and the sound event analysis program is called to generate analysis results and establish result association index.
It improves the efficiency of importing multi-source acoustic monitoring data, shortens decompression time, reduces inter-stage waiting, lowers the risk of buffer overflow, and improves data management and query efficiency.
Smart Images

Figure CN123048208A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of acoustic data processing and ecological monitoring technology, and more specifically, to a method and system for acoustic data processing and analysis scheduling of Yangtze finless porpoises based on pipeline parallelism. Background Technology
[0002] As an important indicator species of the health of the Yangtze River ecosystem, the Yangtze finless porpoise can be monitored and analyzed over a long period of time to obtain information on its activity distribution, behavioral status, and habitat utilization. This is of great significance for scientifically supporting conservation decisions, optimizing habitat protection and management, and eliminating potential risks.
[0003] As the activity range of the Yangtze finless porpoise gradually expands and the demand for conservation and research continues to increase, it is typically necessary to deploy multiple acoustic monitoring devices for the Yangtze finless porpoise in different sections of the river or at different locations within the same section to conduct long-term continuous recording of the target waters. Due to the high sampling rate, long recording time, and large number of devices, the scale of the collected monitoring audio data is enormous. A single device can generate terabytes of data within a monitoring cycle, and the amount of data generated by multiple devices simultaneously increases further. To reduce storage pressure, the aforementioned monitoring devices usually use compressed formats to store audio data. Therefore, before analyzing the acoustic signals of the Yangtze finless porpoise, it is necessary to read and decompress the compressed audio data first.
[0004] Existing research on acoustic monitoring of cetaceans primarily focuses on underwater acoustic acquisition equipment, acoustic signal detection, acoustic event identification, pulse signal screening, and monitoring result display, which can achieve a certain degree of identification and analysis of cetacean acoustic signals. However, after multiple Yangtze finless porpoise acoustic monitoring devices continuously collect massive amounts of compressed audio data over long periods, the efficiency of data import, decompression, buffer scheduling, and acoustic signal analysis and processing remains low. Especially when multiple data sources are collected simultaneously, the number of compressed files is large, and the duration of a single file is long, traditional serial reading, decompression, and analysis methods easily lead to I / O blocking, insufficient utilization of computing resources, and problems such as decompression results waiting for analysis or analysis threads waiting for data, making it difficult to meet the needs of rapid processing and result archiving of massive amounts of Yangtze finless porpoise acoustic data. Therefore, how to provide a pipelined parallel processing and analysis scheduling scheme for multi-source Yangtze finless porpoise compressed acoustic data to achieve multi-source parallel reading, parallel decompression, buffer scheduling, interface-based calling of analysis programs, and result association archiving has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, the present invention proposes a pipeline-parallel method and system for acoustic data processing and analysis of Yangtze finless porpoises to solve the urgent problems existing in the prior art.
[0006] To achieve the above objectives, this invention proposes a pipelined parallel method for acoustic data processing and analysis scheduling of Yangtze finless porpoises, comprising: Compressed audio data is read in parallel from the storage medium corresponding to the acoustic monitoring equipment for Yangtze finless porpoises through several data reading channels; the compressed audio data is divided into blocks according to a preset data block size or a preset time window to obtain several compressed data segments, and segment metadata is generated for each compressed data segment. The segment metadata includes data source identifier, file identifier, block sequence number, start and end time, data length and sampling parameters. By using several decompression threads to decompress different compressed data segments in parallel, the original Yangtze finless porpoise acoustic signal data block corresponding to the compressed data segment is obtained. Based on the block number or start and end time in the fragment metadata, the original Yangtze finless porpoise acoustic signal data block is written into the corresponding buffer unit of the high-speed circular buffer, and the write position and read position of the high-speed circular buffer are recorded by the circular write pointer and the circular read pointer. For the original Yangtze finless porpoise acoustic signal data block written into the high-speed circular buffer, task description information is generated and written into the thread-safe task queue. The task description information includes at least one or more of the following: buffer index or offset address, data length, data source identifier, block number, start and end time, sampling parameters, and task status. The system obtains task description information from the thread-safe task queue through several analysis threads, and reads the corresponding original Yangtze finless porpoise acoustic signal data block from the high-speed circular buffer according to the task description information. The system then calls a preset acoustic event analysis program to process the original Yangtze finless porpoise acoustic signal data block and generate Yangtze finless porpoise acoustic signal data analysis results. The preset acoustic event analysis program receives the original Yangtze finless porpoise acoustic signal data block and corresponding segment metadata through a unified input interface, and returns the structured analysis results through a unified output interface. The acoustic signal data analysis results include at least one or more of the following: acoustic event category, event start and end time, data source identifier, acoustic characteristic parameters, spectrogram index, and acoustic signal segment index. The process of the decompression thread writing data to the high-speed circular buffer overlaps with the process of the analysis thread reading and processing data from the high-speed circular buffer in time. The data writing rate of the decompression thread is adjusted according to the read / write pointer position or cache occupancy rate of the high-speed circular buffer to achieve pipeline parallelism between compressed audio data decompression processing and sound signal analysis processing.
[0007] Optionally, after obtaining the acoustic signal data analysis results of the Yangtze finless porpoise, the following may also be included: The analysis results of the Yangtze finless porpoise acoustic signal data are stored in a database, and an association index is established between the analysis results and the corresponding data source identifier, file identifier, start and end time, spectrogram file, Yangtze finless porpoise acoustic signal segments, and task description information.
[0008] Optionally, adjusting the data write rate of the decompression thread based on the read / write pointer position or cache occupancy rate of the high-speed circular buffer includes: Based on the total capacity of the high-speed ring buffer, the data length of a single raw Yangtze finless porpoise acoustic signal data block, the average write rate of the decompression thread, the average read processing rate of the analysis thread, and the thread adjustment response time, a first preset threshold and a second preset threshold are set. When the remaining space of the high-speed ring buffer is lower than a first preset threshold, the rate at which at least one decompression thread writes data to the high-speed ring buffer is paused or reduced. When the remaining space in the high-speed ring buffer is higher than the second preset threshold, the rate at which at least one decompression thread writes data to the high-speed ring buffer is restored or increased. Wherein, the first preset threshold is less than the second preset threshold.
[0009] Optionally, the compressed audio data is compressed audio data generated after the acoustic monitoring equipment for Yangtze finless porpoises collects and monitors acoustic signals. The compressed audio data is read from the local storage medium, mobile storage medium, network storage device, distributed file system, or object storage system of the acoustic monitoring equipment.
[0010] Optionally, the high-speed circular buffer includes several cache units. The circular write pointer is used to indicate the cache unit to be written to, and the circular read pointer is used to indicate the cache unit to be read from or the cache unit that meets the release condition. Each cache unit is set with a task completion status flag or a reference count. When the task completion status flag corresponding to the cache unit indicates that the analysis thread has not yet finished processing, or when the reference count is not zero, it is prohibited to overwrite the original Yangtze finless porpoise acoustic signal data block in the cache unit.
[0011] Optionally, the task queue is a thread-safe queue used to store task description information. The task description information does not directly copy the original Yangtze finless porpoise acoustic signal data block, but records one or more of the following in the high-speed circular buffer: index position of the original Yangtze finless porpoise acoustic signal data block, data length, data source identifier, start and end time, block sequence number, and task status.
[0012] Optionally, the step of calling a preset acoustic event analysis program to process the original Yangtze finless porpoise acoustic signal data block includes: The original Yangtze finless porpoise acoustic signal data block and its corresponding segment metadata are input into a preset acoustic event analysis program through a unified input interface. The preset acoustic event analysis program outputs the acoustic signal data analysis results of the Yangtze finless porpoise through a unified output interface; The analysis results of the Yangtze finless porpoise acoustic signal data include one or more of the following: sound event category, acoustic characteristic parameters, event start and end time, data source identifier, spectrogram index, and acoustic signal segment index.
[0013] Optionally, the step of dividing the compressed audio data into blocks according to a preset data block size or a preset time window includes: determining the start and end positions of the compressed data segments based on the encoded frame boundaries, timestamp information, or sampling parameters of the compressed audio data, so that each compressed data segment is decompressed independently; setting a preset overlap time between adjacent compressed data segments; and after generating the Yangtze finless porpoise acoustic signal data analysis results, removing duplicate analysis results in the overlapping area based on the data source identifier, event start and end time, and block sequence number.
[0014] On the other hand, the present invention provides a pipelined parallel acoustic data processing and analysis scheduling system for Yangtze finless porpoises, including: a data acquisition module, a block management module, a parallel decompression module, a high-speed ring buffer module, a task queue module, a multi-threaded analysis module, and a result storage module; The data acquisition module is used to read compressed audio data in parallel from multiple Yangtze finless porpoise acoustic data sources through several data reading channels; The block management module is used to divide the compressed audio data into blocks according to a preset data block size, preset time window, encoding frame boundary, timestamp information or sampling parameters to obtain compressed data segments and generate segment metadata corresponding to the compressed data segments. The parallel decompression module is used to decompress different compressed data segments in parallel through several decompression threads to obtain the original Yangtze finless porpoise acoustic signal data block, and to maintain the association between the original Yangtze finless porpoise acoustic signal data block and the corresponding segment metadata. The high-speed ring buffer module is used to cache the original Yangtze finless porpoise acoustic signal data block, and manages the writing, reading and releasing of the cache unit through a circular write pointer, a circular read pointer, a task completion status flag or a reference count; The task queue module is used to generate task description information for the original Yangtze finless porpoise acoustic signal data block written to the high-speed circular buffer module, and write the task description information into the thread-safe task queue. The multi-threaded analysis module is used to obtain task description information from the thread-safe task queue through several analysis threads, read the corresponding original Yangtze finless porpoise acoustic signal data block from the high-speed ring buffer module according to the task description information, and call the preset acoustic event analysis program to generate Yangtze finless porpoise acoustic signal data analysis results. The result storage module is used to store the analysis results of the Yangtze finless porpoise acoustic signal data and to establish an association index between the analysis results of the Yangtze finless porpoise acoustic signal data and the data source identifier, file identifier, start and end time, spectrogram file, acoustic signal segment file and task description information.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention improves the import efficiency of multi-source acoustic monitoring data by reading compressed audio data in parallel through multiple data reading channels; it shortens the decompression time of massive compressed audio data by decompressing compressed data segments in parallel; it enables the decompression processing stage and the acoustic signal analysis stage to overlap in time through a high-speed circular buffer, task description information, and thread-safe task queue, reducing inter-stage waiting; it reduces the risk of buffer overflow and data overwriting by adjusting the write rate of the decompression thread through read / write pointers and cache occupancy thresholds; and it improves the efficiency of subsequent querying, verification, and monitoring data management by establishing an association index between the analysis results and the data source identifier, time information, spectrogram, and acoustic signal segments. Attached Figure Description
[0016] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. In the drawings: Figure 1 This is a flowchart illustrating the pipeline-parallel acoustic data processing and analysis scheduling method for Yangtze finless porpoises in an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of the Yangtze finless porpoise acoustic data processing and analysis scheduling system based on pipeline parallelism in an embodiment of the present invention. Figure 3 This is a schematic diagram of a data processing structure in an embodiment of the present invention that uses a high-speed circular buffer to achieve pipelined parallelism between decompression processing and analysis processing. Figure 4 This is a schematic diagram of high-speed circular buffer data reading and writing, cache occupancy feedback and task scheduling in an embodiment of the present invention. Detailed Implementation
[0017] Exemplary embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. It should be understood that the following embodiments are used to illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention. Unless otherwise specified, the embodiments and technical features in the embodiments of the present invention can be combined with each other.
[0018] This invention relates to a pipelined parallel method and system for processing and analyzing acoustic data of the Yangtze finless porpoise. The method addresses the massive amounts of compressed audio data generated after long-term continuous acquisition by multiple Yangtze finless porpoise acoustic monitoring devices. It achieves pipelined parallel processing of compressed acoustic data from import, decompression, caching, task scheduling to analysis result archiving through parallel reading via multiple data reading channels, fragmented management of compressed data, parallel decompression, high-speed circular buffering, thread-safe task queues, multi-threaded analysis calls, and result association storage.
[0019] The improvement of this invention does not focus on limiting a specific Yangtze finless porpoise acoustic event recognition algorithm, but rather on providing a data processing and analysis scheduling mechanism that can integrate a preset acoustic event analysis program into a pipelined parallel scheduling structure. The preset acoustic event analysis program can be an existing acoustic analysis program, rule recognition program, classifier recognition program, or manual verification auxiliary program. It serves as a task processing unit called by the analysis thread to receive raw Yangtze finless porpoise acoustic signal data blocks and output the acoustic signal data analysis results.
[0020] To address the pressing issues in existing technologies, such as low reading efficiency of multi-source compressed audio data, poor connection between decompression and analysis stages, long stage waiting time, I / O blocking, and insufficient utilization of computing resources, the present invention aims to provide a pipelined parallel method and system for processing and analyzing acoustic data of Yangtze finless porpoises, thereby improving the processing throughput and result archiving efficiency of massive amounts of Yangtze finless porpoise acoustic data.
[0021] To achieve the above objectives, this invention provides a pipelined parallel method for the acoustic data processing and analysis scheduling of Yangtze finless porpoises. The method reads compressed audio data in parallel through multiple data reading channels, divides the compressed audio data into blocks and generates segment metadata, decompresses the data in parallel using multiple decompression threads to obtain raw Yangtze finless porpoise acoustic signal data blocks, writes these raw Yangtze finless porpoise acoustic signal data blocks into a high-speed circular buffer, generates task description information based on the written data blocks and writes it into a thread-safe task queue, then multiple analysis threads read the corresponding data blocks based on the task description information and call a preset acoustic event analysis program to generate analysis result data, and finally establishes an association index between the analysis result data and the data source identifier, time information, spectrogram file, acoustic signal segment file, and task description information.
[0022] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0023] Figure 1 The first embodiment of the present invention is shown in the figure. Figure 1 The method for processing and analyzing acoustic data of the Yangtze finless porpoise based on pipeline parallelism, shown in the figure, includes the following steps.
[0024] S1, through multiple data reading channels, reads compressed audio data in parallel from multiple Yangtze finless porpoise acoustic data sources, and generates a data source identifier for each data source. The Yangtze finless porpoise acoustic data sources include one or more of the following: Yangtze finless porpoise acoustic monitoring equipment, storage media corresponding to the acoustic monitoring equipment, mobile storage media, network storage devices, distributed file systems, or object storage systems.
[0025] In the Yangtze finless porpoise acoustic monitoring system, multiple underwater acoustic monitoring devices typically collect acoustic data continuously over long periods and store the collected audio data in a compressed format on local storage media. Due to the high sampling rate, long monitoring cycle, and large number of devices, the scale of collected data is enormous; a single device can generate terabytes of data within a single monitoring cycle. Therefore, it is necessary to improve data import efficiency by using multiple data reading channels to read data in parallel.
[0026] In this embodiment, multiple monitoring device storage media, such as USB, SATA, or network storage interfaces, can be connected simultaneously through multiple high-speed interfaces to achieve parallel reading of multi-source compressed audio data.
[0027] S2, the compressed audio data is divided into blocks according to a preset data block size or a preset time window to obtain multiple compressed data segments, and segment metadata is generated for each compressed data segment. The segment metadata includes at least one or more of the following: data source identifier, file identifier, block number, start and end time, data length, and sampling parameters.
[0028] Since a single compressed audio file typically contains a long period of continuous acoustic recording data, direct decompression would affect the efficiency of parallel processing. Therefore, this embodiment divides the compressed audio data into blocks according to a preset data block size or time length, so that each data block can be used as an independent processing unit.
[0029] Preferably, the compressed audio data can be divided according to a fixed time window, for example, every 5 minutes or 10 minutes is a data segment, and an overlap area of 0.5 seconds to 5 seconds is set between adjacent data segments. When the analysis results are archived, duplicates are removed according to the start and end time of the event and the data source identifier, thereby ensuring that the data segments maintain temporal continuity.
[0030] S3, start multiple decompression threads to perform parallel decompression processing on different compressed data segments to obtain the corresponding original Yangtze finless porpoise acoustic signal data blocks, and maintain the association between the original Yangtze finless porpoise acoustic signal data blocks and the corresponding segment metadata.
[0031] In this embodiment, multiple decompression threads can process different data segments simultaneously, thereby achieving parallel decompression of compressed audio data. Compared with traditional serial decompression methods, this method can significantly shorten the decompression time for large-scale compressed audio data.
[0032] Preferably, each decompression thread can be responsible for processing one or more compressed data segments, thereby improving the system's resource utilization.
[0033] S4. Based on the block number or start and end time in the fragment metadata, the original Yangtze finless porpoise acoustic signal data block is written into the corresponding buffer unit in the high-speed circular buffer, and the write position and read position of the high-speed circular buffer are recorded by the circular write pointer and the circular read pointer.
[0034] In this embodiment, the high-speed circular buffer serves not only as an intermediate buffer structure between decompression processing and signal analysis, but also as a means to implement pipelined scheduling between decompression processing and acoustic signal analysis. The circular buffer uses circular write pointers and circular read pointers to achieve cyclic writing and reading of data, thereby avoiding frequent data copying and memory allocation.
[0035] Preferably, the high-speed ring buffer can be implemented using high-speed storage devices or memory space, such as high-speed memory or NVMe solid-state drive arrays.
[0036] S5, the write status of the high-speed circular buffer is monitored by the buffer management thread, and after a new raw Yangtze finless porpoise acoustic signal data block is detected being written, task description information corresponding to the data block is generated and written to the thread-safe task queue. The task description information includes at least one or more of the following: buffer index or offset address, data length, data source identifier, block sequence number, start and end time, sampling parameters, and task status.
[0037] In this embodiment, the buffer management thread monitors the data status in the circular buffer. When new audio data is written to the buffer, the buffer management thread generates task description information based on the corresponding data block and writes the task description information as a task to be processed into the thread-safe task queue.
[0038] The task queue is preferably a thread-safe queue to support concurrent access by multiple analysis threads.
[0039] S6, multiple analysis threads obtain task description information from the thread-safe task queue, and read the corresponding original Yangtze finless porpoise acoustic signal data block from the high-speed circular buffer according to the buffer index or offset address, data length, sampling parameters and start and end time in the task description information.
[0040] In this embodiment, multiple analysis threads can execute in parallel, thereby processing multiple audio data segments simultaneously. After each analysis thread retrieves a task from the task queue, it reads the corresponding data from the high-speed circular buffer according to the task information.
[0041] S7, invoke the preset acoustic event analysis program to process the original Yangtze finless porpoise acoustic signal data block to generate analysis result data.
[0042] The preset acoustic event analysis program serves as the task processing unit called by the analysis thread. Its input is the original Yangtze finless porpoise acoustic signal data block and its corresponding segment metadata, and its output is the Yangtze finless porpoise acoustic signal data analysis result. The Yangtze finless porpoise acoustic signal data analysis result includes at least one or more of the following: sound event category, event start and end time, data source identifier, acoustic characteristic parameters, spectrogram index, and acoustic signal segment index.
[0043] In this embodiment, the multi-threaded analysis module is not limited to improving specific sound event recognition algorithms, but rather connects a preset sound event analysis program to a pipelined parallel scheduling structure through a unified input interface and a unified output interface. The preset sound event analysis program can be replaced or configured according to actual monitoring needs, and it can be connected to the pipelined parallel scheduling structure through the unified input / output interface.
[0044] S8. Write the analysis results data into the database, and save the generated spectrogram and / or Yangtze finless porpoise acoustic signal fragments to the archive storage medium. At the same time, establish an association index between the analysis results data and the data source identifier, start and end time, task description information, spectrogram file and acoustic signal fragment file.
[0045] In this embodiment, the structured analysis results can be stored in a database for subsequent querying and statistical analysis. Simultaneously, important detected acoustic signal segments or spectrograms can be saved to a file storage system for later manual review or scientific research.
[0046] S9, by monitoring the read / write pointer position or cache occupancy rate of the high-speed circular buffer, the data write rate of the decompression thread is adjusted to achieve pipelined parallelism between decompression and analysis processing. Specifically, when the remaining space of the high-speed circular buffer is lower than a first preset threshold, the data write rate of at least one decompression thread is paused or reduced; when the remaining space of the high-speed circular buffer is higher than a second preset threshold, the data write rate of at least one decompression thread is restored or increased. The first and second preset thresholds are determined based on one or more of the following: the capacity of the high-speed circular buffer, the size of a single data block, the write rate of the decompression thread, and the read processing rate of the analysis thread.
[0047] Figure 3 The diagram illustrates a pipeline structure that uses a high-speed circular buffer to connect the decompression stage and the acoustic signal analysis stage, allowing the two processing stages to overlap in time.
[0048] Figure 4 This diagram illustrates the read / write pointer positions, cache occupancy feedback, and task scheduling of a high-speed circular buffer. By monitoring the circular write pointer, circular read pointer, and cache occupancy of the high-speed circular buffer, the data write rate of the decompression thread can be dynamically adjusted based on a first preset threshold and a second preset threshold. When the buffer space is insufficient, the decompression write operation is paused to avoid buffer overflow.
[0049] The above mechanism allows the decompression process and the acoustic signal analysis process to overlap in time, thereby improving the overall processing throughput.
[0050] like Figure 2 As shown, a second embodiment of the present invention provides a pipelined parallel acoustic data processing and analysis scheduling system for Yangtze finless porpoises, the system comprising the following modules: (1) Data acquisition module 1; (2) Block Management Module 2; (3) Parallel decompression module 3; (4) High-speed ring buffer module 4; (5) Task queue module 5; (6) Multithreaded analysis module 6; (7) Result storage module 7.
[0051] in: The data acquisition module 1 is used to read compressed audio data in parallel from the storage media corresponding to multiple Yangtze finless porpoise acoustic monitoring devices through several data reading channels, and to generate data source identifiers for different data sources.
[0052] The block management module 2 is used to divide the compressed audio data into blocks according to a preset data block size or a preset time window to obtain several compressed data segments, and to generate segment metadata for each compressed data segment. The segment metadata includes at least one or more of the following: data source identifier, file identifier, block number, start and end time, data length, and sampling parameters.
[0053] The parallel decompression module 3 is used to decompress different compressed data segments in parallel through several decompression threads to obtain the original Yangtze finless porpoise acoustic signal data block corresponding to the compressed data segment, and to maintain the association between the original Yangtze finless porpoise acoustic signal data block and the corresponding segment metadata.
[0054] The high-speed circular buffer module 4 is used to cache the original Yangtze finless porpoise acoustic signal data block, and manages the data write and read positions through circular write pointers and circular read pointers. The high-speed circular buffer module includes multiple cache units, each of which is configured with a task completion status flag or a reference count. When the task completion status flag corresponding to the cache unit indicates that the analysis thread has not yet completed processing, or when the reference count is not zero, it is prohibited to overwrite the original Yangtze finless porpoise acoustic signal data block in the cache unit.
[0055] Task queue module 5 is used to generate task description information for the original Yangtze finless porpoise acoustic signal data block written to the high-speed circular buffer module, and write the task description information to the thread-safe task queue. The task description information does not directly copy the original Yangtze finless porpoise acoustic signal data block, but records one or more of the following in the high-speed circular buffer module: index position of the original Yangtze finless porpoise acoustic signal data block, data length, data source identifier, start and end time, block sequence number, and task status.
[0056] The multi-threaded analysis module 6 is used to obtain task description information from the thread-safe task queue through several analysis threads, read the corresponding original Yangtze finless porpoise acoustic signal data block from the high-speed ring buffer module according to the task description information, and call the preset acoustic event analysis program to generate Yangtze finless porpoise acoustic signal data analysis results.
[0057] The results storage module 7 is used to store the analysis results of the Yangtze finless porpoise acoustic signal data and to establish an association index between the analysis results and the corresponding data source identifier, start and end time, spectrogram file, acoustic signal segment file and task description information.
[0058] In this embodiment, the parallel decompression module and the multi-threaded analysis module operate in parallel. The high-speed circular buffer module feeds back the cache occupancy status to the parallel decompression module based on the positions of the circular write pointer and circular read pointer, or the cache occupancy rate. When the remaining space of the high-speed circular buffer module is lower than a first preset threshold, the parallel decompression module pauses or reduces the data write rate of at least one decompression thread; when the remaining space of the high-speed circular buffer module is higher than a second preset threshold, the parallel decompression module resumes or increases the data write rate of at least one decompression thread.
[0059] The beneficial effects of this invention are as follows: (1) Improve the import efficiency of multi-source acoustic monitoring data by reading compressed audio data in parallel through multiple data reading channels.
[0060] (2) By decompressing compressed data segments in parallel, the decompression time of massive compressed audio data is shortened.
[0061] (3) Maintain the correspondence between compressed data fragments, original acoustic signal data blocks and analysis results through fragment metadata, which facilitates data backtracking and result verification.
[0062] (4) By using a high-speed circular buffer, task description information and thread-safe task queue, the decompression processing stage and the acoustic signal analysis stage can overlap in time, reducing waiting between stages.
[0063] (5) Adjust the write rate of the decompression thread by reading and writing pointers and cache occupancy threshold to reduce the risk of buffer overflow and data overwriting.
[0064] (6) By establishing an association index between the analysis results and the data source identifier, time information, spectrum diagram and acoustic signal segment, the efficiency of subsequent query, verification and monitoring data management can be improved.
[0065] (7) By storing only task description information in the task queue instead of copying the original audio signal data block, data copying and memory usage are reduced, and the system's processing throughput is improved.
[0066] In other embodiments, the high-speed circular buffer can be implemented using high-speed memory, high-speed non-volatile storage devices, or a combination of both; the task queue can be implemented using a linked queue, circular queue, blocking queue, or other thread-safe queue structures; the number of decompression threads and analysis threads can be configured according to the number of processor cores, buffer capacity, data block size, and data throughput requirements. The first and second preset thresholds can be statically set or dynamically adjusted based on the total cache capacity, the size of a single data block, the average write rate of the decompression thread, and the average processing rate of the analysis thread. The preset acoustic event analysis program can be replaced or configured according to actual monitoring needs, and its specific recognition algorithm does not affect the pipelined parallel processing and analysis scheduling structure of this invention.
[0067] Furthermore, the functional modules in the embodiments of the present invention can be implemented using software, hardware, or a combination of both. For example, each module can be implemented by a processor executing computer program instructions stored in a storage medium, or it can be implemented using dedicated hardware circuits. Those skilled in the art will understand that the specific implementation of the above modules can be adjusted according to actual application requirements without departing from the technical concept of the present invention.
[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A pipelined parallel acoustic data processing and analysis scheduling method for Yangtze finless porpoises, characterized in that, include: Compressed audio data is read in parallel from the storage medium corresponding to the acoustic monitoring equipment for Yangtze finless porpoises through several data reading channels; The compressed audio data is divided into blocks according to a preset data block size or a preset time window to obtain several compressed data segments. Segment metadata is generated for each compressed data segment, including data source identifier, file identifier, block number, start and end time, data length and sampling parameters. By using several decompression threads to decompress different compressed data segments in parallel, the original Yangtze finless porpoise acoustic signal data block corresponding to the compressed data segment is obtained. Based on the block number or start and end time in the fragment metadata, the original Yangtze finless porpoise acoustic signal data block is written into the corresponding buffer unit of the high-speed circular buffer, and the write position and read position of the high-speed circular buffer are recorded by the circular write pointer and the circular read pointer. For the original Yangtze finless porpoise acoustic signal data block written into the high-speed circular buffer, task description information is generated and written into the thread-safe task queue. The task description information includes at least one or more of the following: buffer index or offset address, data length, data source identifier, block number, start and end time, sampling parameters, and task status. The system obtains task description information from the thread-safe task queue through several analysis threads, and reads the corresponding original Yangtze finless porpoise acoustic signal data block from the high-speed circular buffer according to the task description information. The system then calls a preset acoustic event analysis program to process the original Yangtze finless porpoise acoustic signal data block and generate Yangtze finless porpoise acoustic signal data analysis results. The preset acoustic event analysis program receives the original Yangtze finless porpoise acoustic signal data block and corresponding segment metadata through a unified input interface, and returns the structured analysis results through a unified output interface. The acoustic signal data analysis results include at least one or more of the following: acoustic event category, event start and end time, data source identifier, acoustic feature parameters, spectrogram index, and acoustic signal segment index. The process of the decompression thread writing data to the high-speed circular buffer overlaps with the process of the analysis thread reading and processing data from the high-speed circular buffer in time. The data writing rate of the decompression thread is adjusted according to the read / write pointer position or cache occupancy rate of the high-speed circular buffer to achieve pipeline parallelism between compressed audio data decompression processing and sound signal analysis processing.
2. The method according to claim 1, characterized in that, After obtaining the acoustic signal data analysis results of the Yangtze finless porpoise, the following also includes: The analysis results of the Yangtze finless porpoise acoustic signal data are stored in a database, and an association index is established between the analysis results and the corresponding data source identifier, file identifier, start and end time, spectrogram file, Yangtze finless porpoise acoustic signal segments, and task description information.
3. The method according to claim 1, characterized in that, The method of adjusting the data write rate of the decompression thread based on the read / write pointer position or cache occupancy rate of the high-speed circular buffer includes: Based on the total capacity of the high-speed ring buffer, the data length of a single raw Yangtze finless porpoise acoustic signal data block, the average write rate of the decompression thread, the average read processing rate of the analysis thread, and the thread adjustment response time, a first preset threshold and a second preset threshold are set. When the remaining space of the high-speed ring buffer is lower than a first preset threshold, the rate at which at least one decompression thread writes data to the high-speed ring buffer is paused or reduced. When the remaining space in the high-speed ring buffer is higher than the second preset threshold, the rate at which at least one decompression thread writes data to the high-speed ring buffer is restored or increased. Wherein, the first preset threshold is less than the second preset threshold.
4. The method according to claim 1, characterized in that, The compressed audio data is audio data in a compressed format generated after the acoustic monitoring equipment for Yangtze finless porpoises collects and monitors acoustic signals. The compressed audio data is read from the local storage medium, mobile storage medium, network storage device, distributed file system, or object storage system of the acoustic monitoring equipment.
5. The method according to claim 1, characterized in that, The high-speed circular buffer includes several cache units. The circular write pointer is used to indicate the cache unit to be written to, and the circular read pointer is used to indicate the cache unit to be read from or the cache unit that meets the release condition. Each cache unit is set with a task completion status flag or reference count. When the task completion status flag corresponding to the cache unit indicates that the analysis thread has not yet finished processing, or when the reference count is not zero, it is prohibited to overwrite the original Yangtze finless porpoise acoustic signal data block in the cache unit.
6. The method according to claim 1, characterized in that, The task queue is a thread-safe queue used to store task description information. The task description information does not directly copy the original Yangtze finless porpoise acoustic signal data block, but records one or more of the following in the high-speed circular buffer: index position of the original Yangtze finless porpoise acoustic signal data block, data length, data source identifier, start and end time, block number, and task status.
7. The method according to claim 1, characterized in that, The process of calling a preset acoustic event analysis program to process the raw Yangtze finless porpoise acoustic signal data block includes: The original Yangtze finless porpoise acoustic signal data block and its corresponding segment metadata are input into a preset acoustic event analysis program through a unified input interface. The preset acoustic event analysis program outputs the acoustic signal data analysis results of the Yangtze finless porpoise through a unified output interface; The analysis results of the Yangtze finless porpoise acoustic signal data include one or more of the following: sound event category, acoustic characteristic parameters, event start and end time, data source identifier, spectrogram index, and acoustic signal segment index.
8. The method according to claim 1, characterized in that, The step of dividing the compressed audio data into blocks according to a preset data block size or a preset time window includes: determining the start and end positions of the compressed data segments based on the encoded frame boundaries, timestamp information, or sampling parameters of the compressed audio data, so that each compressed data segment is decompressed independently; setting a preset overlap time between adjacent compressed data segments; and after generating the Yangtze finless porpoise acoustic signal data analysis results, removing duplicate analysis results in the overlapping area based on the data source identifier, event start and end time, and block sequence number.
9. A scheduling system based on the pipelined parallel acoustic data processing and analysis scheduling method for Yangtze finless porpoises according to any one of claims 1-8, characterized in that, include: The module includes a data acquisition module, a block management module, a parallel decompression module, a high-speed circular buffer module, a task queue module, a multi-threaded analysis module, and a result storage module. The data acquisition module is used to read compressed audio data in parallel from multiple Yangtze finless porpoise acoustic data sources through several data reading channels; The block management module is used to divide the compressed audio data into blocks according to a preset data block size, preset time window, encoding frame boundary, timestamp information or sampling parameters to obtain compressed data segments and generate segment metadata corresponding to the compressed data segments. The parallel decompression module is used to decompress different compressed data segments in parallel through several decompression threads to obtain the original Yangtze finless porpoise acoustic signal data block, and to maintain the association between the original Yangtze finless porpoise acoustic signal data block and the corresponding segment metadata. The high-speed ring buffer module is used to cache the original Yangtze finless porpoise acoustic signal data block, and manages the writing, reading and releasing of the cache unit through a circular write pointer, a circular read pointer, a task completion status flag or a reference count; The task queue module is used to generate task description information for the original Yangtze finless porpoise acoustic signal data block written to the high-speed circular buffer module, and write the task description information into the thread-safe task queue. The multi-threaded analysis module is used to obtain task description information from the thread-safe task queue through several analysis threads, read the corresponding original Yangtze finless porpoise acoustic signal data block from the high-speed ring buffer module according to the task description information, and call the preset acoustic event analysis program to generate Yangtze finless porpoise acoustic signal data analysis results. The result storage module is used to store the analysis results of the Yangtze finless porpoise acoustic signal data and to establish an association index between the analysis results of the Yangtze finless porpoise acoustic signal data and the data source identifier, file identifier, start and end time, spectrogram file, acoustic signal segment file and task description information.
