A sound acquisition data compression and storage method and system based on template technology

Through the voiceprint library and data index table based on template technology, the problem of low storage and retrieval efficiency of large-scale real-time monitoring of sound data is solved, efficient compression and rapid retrieval of data are achieved, and storage costs and network bandwidth requirements are reduced.

CN118800246BActive Publication Date: 2025-02-11ANHUI YUNQING TECH IND DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411283627.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-02-11
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

When storing and processing large-scale real-time monitoring of sound data, the prior art has problems such as large storage overhead, slow retrieval speed, and high network bandwidth requirements, which are difficult to effectively reduce storage costs and retrieval time.

Method used

Using the method of voice acquisition data compression and storage based on template technology, by establishing template voiceprint libraries and machine voiceprint libraries, and using data index tables for data matching and encoding storage, efficient compression and rapid retrieval of data are achieved.

Benefits of technology

It effectively reduces the storage cost and retrieval time of sound data, reduces the data scale and network bandwidth requirements, while maintaining read and write performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118800246B_ABST
    Figure CN118800246B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for compressing and storing sound acquisition data based on template technology, comprising the following steps: S1: establishing a corresponding template voiceprint library according to a machine operation scene, wherein the template voiceprint library stores template sound fragments and their codes; S2: when newly storing sound data, it needs to be matched with the template voiceprint library, and the typical scene data already in the template voiceprint library only needs to be stored in the corresponding data code in the template voiceprint library, and the sound data not in the template voiceprint library is stored in the newly created machine voiceprint library and encoded; at the same time, both codes are stored in a data index table; S3: when data is called, the data index table is called, and data is searched and outputted in the template voiceprint library and the machine voiceprint library according to its index. A sound acquisition data compression and storage system based on template technology is also disclosed. The present invention effectively reduces the data scale and storage cost, and can realize rapid retrieval of machine operation sound data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sound data representation and storage, and in particular to a sound acquisition data compression and storage method and system based on template technology. Background Art

[0002] Machine sounds reflect the operating status of the machine and may indicate equipment problems. Using machine sounds for anomaly detection is a convenient, easy-to-use, non-destructive and non-stop detection method, and is also a hot research direction in the field of industrial intelligence and automation. In order to more accurately analyze the information expressed by machine sounds, it is necessary to collect high-quality and large quantities of sound data, which places high demands on disk storage space and requires a large amount of disk storage space and network bandwidth.

[0003] At present, the methods for storing real-time monitoring data with relatively large data scale mainly include the following:

[0004] (1) Binary data storage: First, the continuous analog signal is converted into discrete amplitude values ​​through sampling, and then quantized to map these amplitude values ​​into binary digits with a fixed number of bits. These digits are stored in a continuous manner in computer memory or on disk, forming sound data in the form of PCM (pulse code modulation). In practical applications, sound files may contain additional metadata, and different encoding methods such as MP3 and AAC introduce more complex algorithms to reduce file size while maintaining audio quality.

[0005] (2) Sound file storage: The sound data collected by the machine can be stored in the local disk of the computer. Different storage formats can be selected, such as WAV, MP3, etc. It can also be stored in a distributed file system, such as Hadoop's HDFS and Google's GFS. Using a distributed storage method, the file is divided into multiple blocks and stored on different nodes, achieving high reliability and high performance data storage.

[0006] (3) Database storage: The sound data collected by the machine is stored in the distributed database system HBase for fast query, analysis and retrieval.

[0007] In the above storage method, the sound data is stored in binary form, and the original PCM data is uncompressed, which cannot fully utilize resources and may introduce delays in real-time transmission applications. In addition, for some special applications such as speech recognition, additional processing or conversion may be required. The disadvantages of storing audio data in files include taking up a large amount of storage space, slow transmission speed, restrictions on real-time access, susceptibility to damage, complex backup and recovery, relatively high power consumption, and data security risks, which affect storage efficiency and read and write performance. Using the data compression function provided by HBase can optimize data storage and access efficiency to a certain extent, but because the compression algorithm needs to occupy CPU resources to compress and decompress data, the use of an algorithm with a higher compression ratio may lead to a decrease in read and write performance, especially for sound detection data with huge data volumes.

[0008] In summary, for large-scale real-time monitoring data, these storage methods have problems such as large storage overhead, slow retrieval speed, and high network bandwidth requirements. Therefore, it is urgent to provide a new sound collection data compression and storage method and system based on template technology to solve the above problems. Summary of the invention

[0009] The technical problem to be solved by the present invention is to provide a sound collection data compression and storage method and a system based on template technology, which can propose a machine sound data compression and storage method for machine equipment with fixed operating scenarios, and optimize large-scale sound data indexing to reduce the storage cost and retrieval time of sound data without affecting the read and write performance.

[0010] In order to solve the above technical problems, the first technical solution adopted by the present invention is: to provide a sound collection data compression and storage method based on template technology, comprising the following steps:

[0011] S1: Establish a corresponding template voiceprint library according to the machine operation scenario, and the template voiceprint library stores template sound clips and their codes;

[0012] S2: using the template voiceprint library established in step S1 to collect data for the sound data of the machine operation scene; when new sound data is stored, it needs to be matched with the template voiceprint library, and the typical scene data already in the template voiceprint library only needs to be stored in the corresponding data code in the template voiceprint library, and the sound data not in the template voiceprint library is stored in the newly created machine voiceprint library and encoded; at the same time, the code of the data in the template voiceprint library and the code of the data in the machine voiceprint library are both stored in a data index table;

[0013] S3: When data is called, the data index table is called, and data is searched and outputted in the template voiceprint library and the machine voiceprint library according to the index stored in the data index table.

[0014] In a preferred embodiment of the present invention, in step S1, the specific steps of establishing a template voiceprint library include:

[0015] S101: Determine whether the sound sampling data is empty. If it is empty, end the process; if it is not empty, proceed to the next step;

[0016] S102: segmenting the sound sampling data into fixed time segments, and then slicing the segmented data;

[0017] S103: Name, mark and encode each frame of sound data after the segmentation;

[0018] S104: creating a candidate template library, and when the candidate template library is empty, setting the mean square error to infinity, and comparing it with a preset threshold. If the mean square error is obviously greater than the threshold, encoding the first sound segment data and storing it in the candidate template library;

[0019] S105: When the candidate template library is not empty, the mean square error is calculated between the remaining sound segment data and the sound segment data in the candidate template library. If the calculated mean square error is less than or equal to the threshold, the encoding of the sound segment data is obtained, the number of occurrences of the sound segment data n=n+1 is recorded, and the size of n is judged. If the sound segment data appears to reach the set number of times, it is determined that the sound segment data is a typical scene sound, and the sound segment data and the encoding are copied and stored in the template voiceprint library. Otherwise, the number of occurrences of the sound segment data is increased by one, and the candidate template library is updated; if the calculated mean square error is greater than the threshold, the sound segment data is encoded and stored in the candidate template library.

[0020] Furthermore, in step S102, the specific steps of data sharding include:

[0021] S1021: Determine the sound period of the sound sampling data;

[0022] S1022: Setting the length of the fixed-duration sound data to an integer multiple of the sound period as the length of the sliding window;

[0023] S1023: Setting the sliding window step size, that is, the distance of each sliding;

[0024] S1024: Calculate the number of slices required to cover the entire sound data according to the total sound data segment duration and the step length of the sliding window, where the number of slices = ((total sound duration - sliding window length) / step length) + 1;

[0025] S1025: Using a sliding window, starting from the starting position of the sound data, sliding the window with a set sliding window step size, and treating each window as a slice to complete the segmentation of the sound data.

[0026] In a preferred embodiment of the present invention, the specific steps of step S2 include:

[0027] S201: Determine whether the sound sampling data is empty. If it is empty, end the process; if it is not empty, proceed to the next step;

[0028] S202: segmenting the sound sampling data into fixed time segments, and then slicing the segmented data to obtain slicing data;

[0029] S203: Compare the sliced ​​data with the data in the template voiceprint library and calculate the mean square error. If the calculated mean square error is less than or equal to the threshold, obtain the code corresponding to the sliced ​​data in the template voiceprint library and store it in the established data index table; if the calculated mean square error is greater than the threshold, encode the sliced ​​data, store the sliced ​​data and the code in the machine voiceprint library, and store the code of the sliced ​​data in the data index table.

[0030] Furthermore, the code is in the form of a combination of letters and numbers to uniquely represent a piece of sound data.

[0031] In a preferred embodiment of the present invention, the specific steps of step S3 include:

[0032] S301: when performing data call, calling the data index table, and retrieving data according to the data index table;

[0033] S302: Determine whether the index to be searched exists in the template voiceprint library and the machine voiceprint library;

[0034] S303: If it exists, search for the data in the template voiceprint library and the machine voiceprint library, and return the data; if it does not exist, return a NULL value.

[0035] In order to solve the above technical problems, the second technical solution adopted by the present invention is to provide a sound collection data compression and storage system based on template technology, comprising:

[0036] The template voiceprint library establishment module is used to establish a corresponding template voiceprint library according to the machine operation scenario, and the template voiceprint library stores template sound clips and their codes;

[0037] A data storage module is used to collect data for the sound data of the machine operation scene using the template voiceprint library established by the template voiceprint library; when new sound data is stored, it needs to be matched with the template voiceprint library, and the typical scene data already in the template voiceprint library only needs to be stored in the corresponding data code in the template voiceprint library, and the sound data not in the template voiceprint library is stored in the newly created machine voiceprint library and encoded; at the same time, the encoding of the data in the template voiceprint library and the encoding of the data in the machine voice database are both stored in a data index table;

[0038] The data calling module is used to call the data index table when making a data call, and search and output the data in the template voiceprint library and the machine voiceprint library according to the index stored in the data index table.

[0039] In a preferred embodiment of the present invention, the specific steps of the template voiceprint library establishment module establishing the corresponding template voiceprint library according to the machine operation scenario include:

[0040] S101: Determine whether the sound sampling data is empty. If it is empty, end the process; if it is not empty, proceed to the next step;

[0041] S102: segmenting the sound sampling data into fixed time segments, and then slicing the segmented data;

[0042] S103: Name, mark and encode each frame of sound data after the segmentation;

[0043] S104: creating a candidate template library, and when the candidate template library is empty, setting the mean square error to infinity, and comparing it with a preset threshold. If the mean square error is obviously greater than the threshold, encoding the first sound segment data and storing it in the candidate template library;

[0044] S105: When the candidate template library is not empty, the mean square error is calculated between the remaining sound segment data and the sound segment data in the candidate template library. If the calculated mean square error is less than or equal to the threshold, the encoding of the sound segment data is obtained, the number of occurrences of the sound segment data n=n+1 is recorded, and the size of n is judged. If the sound segment data appears to reach the set number of times, it is determined that the sound segment data is a typical scene sound, and the sound segment data and the encoding are copied and stored in the template voiceprint library. Otherwise, the number of occurrences of the sound segment data is increased by one, and the candidate template library is updated; if the calculated mean square error is greater than the threshold, the sound segment data is encoded and stored in the candidate template library.

[0045] To solve the above technical problems, the third technical solution adopted by the present invention is: to provide a device for compressing and storing sound acquisition data based on template technology, including a memory and a processor, the memory is used to store at least one program, and the processor is used to load the at least one program to execute any of the above methods.

[0046] In order to solve the above technical problems, the fourth technical solution adopted by the present invention is: to provide a computer-readable storage medium, in which processor-executable instructions are stored, and the processor-executable instructions are used to execute any of the methods described above when executed by the processor.

[0047] The beneficial effects of the present invention are as follows: in view of the problem that when acoustic equipment modeling and analysis requires large-scale sound data, a large amount of storage space and network bandwidth will be consumed when performing multi-channel real-time data acquisition, a data compression and storage method is proposed. The machine sound acquisition data is compressed and represented and stored, which can effectively reduce the data scale, storage cost and network bandwidth, and can realize rapid retrieval of machine operation sound data. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flow chart of the sound collection data compression and storage method based on template technology of the present invention;

[0049] Figure 2 It is a flowchart of establishing a template voiceprint library;

[0050] Figure 3 It is a flowchart of data storage;

[0051] Figure 4 It is a flowchart of data calling;

[0052] Figure 5 It is a structural block diagram of a sound acquisition data compression and storage system based on template technology. DETAILED DESCRIPTION

[0053] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0054] See also Figure 1 , the embodiment of the present invention includes:

[0055] A method for compressing and storing sound collection data based on template technology comprises the following steps:

[0056] S1: Establish a corresponding template voiceprint library according to the machine operation scenario, and the template voiceprint library stores template sound fragments and their encodings; Figure 2, the specific steps include:

[0057] S101: When sampling machine sound data in a certain scenario, a fixed standard is required, and settings such as sampling rate, number of channels, bit depth, etc. are set according to requirements, and it is determined whether the sound sampling data is empty. If it is empty, the process ends; if it is not empty, the next step is entered;

[0058] S102: segment the sound sampling data into fixed time segments, and then slice the segmented data. The specific steps of data slicing include:

[0059] S1021: Determine the sound period of the sound sampling data; preferably, the sound period can be calculated by calculating a waveform diagram or a spectrum diagram of the observed sound data.

[0060] S1022: Setting the length of the fixed-duration sound data to an integer multiple of the sound period as the length of the sliding window;

[0061] S1023: Setting the sliding window step size, that is, the distance of each slide; usually, the step size can be set to a part of the sound cycle to ensure that there is overlap between the sliding windows.

[0062] S1024: Calculate the number of slices required to cover the entire sound data according to the total sound data segment duration and the step length of the sliding window, where the number of slices = ((total sound duration - sliding window length) / step length) + 1;

[0063] S1025: Using a sliding window, starting from the starting position of the sound data, sliding the window with a set sliding window step size, and treating each window as a slice to complete the segmentation of the sound data.

[0064] S103: Name, mark and encode each frame of sound data after the segmentation;

[0065] The code is in the form of a combination of letters and numbers to uniquely represent a piece of sound data, such as MDP, where M represents the machine ID used to identify the machine; D represents the data segment after the sound data is segmented; and P represents the number of the fragmented sound data in the data segment.

[0066] S104: Create a candidate template library. When the candidate template library is empty, the MSE (Mean-square error) is set to infinity and compared with the preset threshold. If the MSE value is obviously greater than the threshold, the first sound segment data is encoded and stored in the candidate template library; the candidate template library stores the sound segment data, the code corresponding to the segment data, and the number of times this segment data appears (n).

[0067] S105: When the candidate template library is not empty, the remaining sound fragment data and the sound fragment data in the candidate template library are used to calculate the MSE. If the calculated MSE value is less than or equal to the threshold j, and the threshold j is set according to the machine operation scenario, the encoding of the sound fragment data is obtained, the number of occurrences of the sound fragment data n=n+1 is recorded, and the size of n is judged. If the sound fragment data appears a certain number of times, such as n=i, i is the minimum number of times the sound fragment data meets the template requirements, then the sound data fragment is determined to be a typical scene sound, and the sound fragment data and the encoding are copied and stored in the template voiceprint library, otherwise the number of occurrences of the sound fragment data is increased by one, and the candidate template library is updated; if the calculated MSE value is greater than the threshold, the sound fragment data is encoded and stored in the candidate template library.

[0068] S2: Use the template voiceprint library established in step S1 to collect data for the sound data of the machine operation scene; establish a machine voiceprint library and a data index table. The machine voiceprint library is used to store sound fragmentation data and codes that are not in the template voiceprint library. The data index table is convenient for indexing according to the data code later. When new sound data is stored, it needs to be matched with the template voiceprint library. The typical scene data already in the template voiceprint library only needs to be stored in the corresponding data code in the template voiceprint library. The sound data that is not in the template voiceprint library is stored in the machine voiceprint library and encoded; at the same time, the code of the data in the template voiceprint library and the code of the data in the machine voiceprint library are both stored in the data index table; combined Figure 3 , the specific steps include:

[0069] S201: Determine whether the sound sampling data is empty. If it is empty, end the process; if it is not empty, proceed to the next step;

[0070] S202: segmenting the sound sampling data into fixed time segments, and then slicing the segmented data to obtain slicing data;

[0071] The specific method of this step is the same as the step of establishing a template voiceprint library in step 1, and will not be repeated here.

[0072] S203: Compare the sliced ​​data with the data in the template voiceprint library and calculate the MSE. If the calculated MSE value is less than or equal to the threshold (consistent with the threshold when the template voiceprint library is established), obtain the code corresponding to the sliced ​​data in the template voiceprint library and store it in the established data index table; if the calculated MSE value is greater than the threshold, encode the data slice, store the sliced ​​data and the code in the machine voiceprint library, and store the code of the sliced ​​data in the data index table, wherein the coding form is a combination of letters and numbers, such as NDP, where N represents the machine ID used to identify the machine; D represents the data segment after the sound data is segmented; and P represents the number of the sliced ​​sound data in the data segment.

[0073] S3: When data is called, the data index table is called, and data is searched and outputted in the template voiceprint library and the machine voiceprint library according to the index stored in the data index table. Figure 4 The specific steps of step S3 include:

[0074] S301: when performing data call, calling the data index table, and retrieving data according to the data index table;

[0075] S302: Determine whether the index to be searched exists in the template voiceprint library and the machine voiceprint library;

[0076] S303: If it exists, search for the data in the template voiceprint library and the machine voiceprint library, and return the data; if it does not exist, return a NULL value.

[0077] The method described in the present invention is aimed at a certain machine, and a template voiceprint library of the machine's operating sound data is pre-established. When new operating sound data of the machine is collected, it is no longer necessary to store all the data. Instead, the error is calculated by comparing it with the existing sound data in the template voiceprint library. When the error is less than a certain threshold, it means that the sound data can be replaced by the data in the template voiceprint library. It is only necessary to store the index code of the data in the template voiceprint library into a data index table, which reduces the amount of data storage. In addition, the data index table also optimizes the search, which is convenient for later analysis and information mining of the sound data.

[0078] See also Figure 5 , the example of the present invention also provides a sound collection data compression and storage system based on template technology, including a template voiceprint library establishment module, a data storage module, and a data calling module;

[0079] The template voiceprint library establishment module is used to establish a corresponding template voiceprint library according to the machine operation scenario, and the template voiceprint library stores template sound clips and their codes;

[0080] The data storage module is used to collect data for the sound data of the machine operation scene using the template voiceprint library established by the template voiceprint library; when new sound data is stored, it needs to be matched with the template voiceprint library, and the typical scene data already in the template voiceprint library only needs to be stored in the corresponding data code in the template voiceprint library, and the sound data not in the template voiceprint library is stored in the newly created machine voiceprint library and encoded; at the same time, the code of the data in the template voiceprint library and the code of the data in the machine voiceprint library are both stored in a data index table;

[0081] The data calling module is used to call the data index table when making a data call, and search and output the data in the template voiceprint library and the machine voiceprint library according to the index stored in the data index table.

[0082] The sound collection data compression and storage system based on template technology in this example can execute the sound collection data compression and storage method based on template technology provided by the present invention, and can execute any combination of implementation steps of the method example, and has the corresponding functions and beneficial effects of the method.

[0083] An embodiment of the present invention further provides a sound collection data compression and storage device based on template technology, comprising a memory and a processor, wherein the memory is used to store at least one program, and the processor is used to load the at least one program to execute the above method.

[0084] An embodiment of the present invention further provides a computer-readable storage medium, in which processor-executable instructions are stored. When the processor-executable instructions are executed by the processor, they are used to execute the method described above.

[0085] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0086] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0087] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does 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 method for compressing and storing sound collection data based on template technology, characterized in that: The following steps are involved: S1: Establish a corresponding template voiceprint library according to the machine operation scenario, and the template voiceprint library stores template sound clips and their codes; The specific steps to establish a template voiceprint library include: S101: Determine whether the sound sampling data is empty. If it is empty, end the process; if it is not empty, proceed to the next step; S102: segment the sound sampling data into fixed time segments, and then slice the segmented data. The specific steps of data slicing include: S1021: Determine the sound period of the sound sampling data; S1022: Setting the length of the fixed-duration sound data to an integer multiple of the sound period as the length of the sliding window; S1023: Setting the sliding window step size, that is, the distance of each sliding; S1024: Calculate the number of slices required to cover the entire sound data according to the total sound data segment duration and the step length of the sliding window, where the number of slices = ((total sound duration - sliding window length) / step length) + 1; S1025: Using a sliding window, starting from the start position of the sound data, sliding the window with a set sliding window step length, and treating each window as a slice to complete the segmentation of the sound data; S103: Name, mark and encode each frame of sound data after the segmentation; S104: creating a candidate template library, and when the candidate template library is empty, setting the mean square error to infinity, and comparing it with a preset threshold. If the mean square error is obviously greater than the threshold, encoding the first sound segment data and storing it in the candidate template library; S105: When the candidate template library is not empty, the remaining sound fragment data and the sound fragment data in the candidate template library are calculated for mean square error. If the calculated mean square error is less than or equal to the threshold, the code of the sound fragment data is obtained, the number of occurrences of the sound fragment data n=n+1 is recorded, and the size of n is judged. If the sound fragment data appears to reach the set number of times, it is determined that the sound fragment data is a typical scene sound, and the sound fragment data and the code are copied and stored in the template voiceprint library. Otherwise, the number of occurrences of the sound fragment data is increased by one, and the candidate template library is updated; if the calculated mean square error is greater than the threshold, the sound fragment data is encoded and stored in the candidate template library; S2: using the template voiceprint library established in step S1 to collect data for the sound data of the machine operation scene; when new sound data is stored, it needs to be matched with the template voiceprint library, and the typical scene data already in the template voiceprint library only needs to be stored in the corresponding data code in the template voiceprint library, and the sound data not in the template voiceprint library is stored in the newly created machine voiceprint library and encoded; at the same time, the code of the data in the template voiceprint library and the code of the data in the machine voiceprint library are both stored in a data index table; S3: When data is called, the data index table is called, and data is searched and outputted in the template voiceprint library and the machine voiceprint library according to the index stored in the data index table.

2. The method for compressing and storing sound collection data based on template technology according to claim 1, characterized in that: The specific steps of step S2 include: S201: Determine whether the sound sampling data is empty. If it is empty, end the process; if it is not empty, proceed to the next step; S202: segmenting the sound sampling data into fixed time segments, and then slicing the segmented data to obtain slicing data; S203: Compare the sliced ​​data with the data in the template voiceprint library and calculate the mean square error. If the calculated mean square error is less than or equal to the threshold, obtain the code corresponding to the sliced ​​data in the template voiceprint library and store it in the established data index table; if the calculated mean square error is greater than the threshold, encode the sliced ​​data, store the sliced ​​data and the code in the machine voiceprint library, and store the code of the sliced ​​data in the data index table.

3. The method for compressing and storing sound collection data based on template technology according to claim 1 or 2, characterized in that: The code is in the form of a combination of letters and numbers, and is used to uniquely represent a piece of sound data.

4. The method for compressing and storing sound collection data based on template technology according to claim 1, characterized in that: The specific steps of step S3 include: S301: when performing data call, calling the data index table, and retrieving data according to the data index table; S302: Determine whether the index to be searched exists in the template voiceprint library and the machine voiceprint library; S303: If it exists, search for the data in the template voiceprint library and the machine voiceprint library, and return the data; if it does not exist, return a NULL value.

5. A sound collection data compression and storage system based on template technology, characterized in that: include: The template voiceprint library establishment module is used to establish a corresponding template voiceprint library according to the machine operation scenario, and the template voiceprint library stores template sound clips and their codes; The specific steps to establish the corresponding template voiceprint library include: S101: Determine whether the sound sampling data is empty. If it is empty, end the process; if it is not empty, proceed to the next step; S102: segmenting the sound sampling data into fixed time segments, and then slicing the segmented data; S103: Name, mark and encode each frame of sound data after the segmentation; S104: creating a candidate template library, and when the candidate template library is empty, setting the mean square error to infinity, and comparing it with a preset threshold. If the mean square error is obviously greater than the threshold, encoding the first sound segment data and storing it in the candidate template library; S105: When the candidate template library is not empty, the remaining sound fragment data and the sound fragment data in the candidate template library are calculated for mean square error. If the calculated mean square error is less than or equal to the threshold, the code of the sound fragment data is obtained, the number of occurrences of the sound fragment data n=n+1 is recorded, and the size of n is judged. If the sound fragment data appears to reach the set number of times, it is determined that the sound fragment data is a typical scene sound, and the sound fragment data and the code are copied and stored in the template voiceprint library. Otherwise, the number of occurrences of the sound fragment data is increased by one, and the candidate template library is updated; if the calculated mean square error is greater than the threshold, the sound fragment data is encoded and stored in the candidate template library; A data storage module is used to collect data for the sound data of the machine operation scene using the template voiceprint library established by the template voiceprint library; when new sound data is stored, it needs to be matched with the template voiceprint library, and the typical scene data already in the template voiceprint library only needs to be stored in the corresponding data code in the template voiceprint library, and the sound data not in the template voiceprint library is stored in the newly created machine voiceprint library and encoded; at the same time, the encoding of the data in the template voiceprint library and the encoding of the data in the machine voice database are both stored in a data index table; The data calling module is used to call the data index table when making a data call, and search and output the data in the template voiceprint library and the machine voiceprint library according to the index stored in the data index table.

6. The sound collection data compression and storage system based on template technology according to claim 5 is characterized in that: The template voiceprint library establishment module is based on the machine operation scenario.

7. A device for compressing and storing sound collection data based on template technology, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store at least one program, and the processor is used to load the at least one program to execute the method according to any one of claims 1 to 4.

8. A computer-readable storage medium storing instructions executable by a processor, characterized in that: The processor-executable instructions are used to perform the method according to any one of claims 1 to 4 when executed by the processor.

Citation Information

Patent Citations

  • Data storage method, data query method and electronic equipment

    CN112084250A

  • Judgment method for duplicate checking of similar test questions

    CN114238737A