Method, device and equipment for constructing a universal database of acoustic metamaterials
By building a universal database of acoustic metamaterials, the problem of characterizing the multi-phase and multi-configuration characteristics of acoustic metamaterials has been solved, a comprehensive description of acoustic metamaterial models and cross-configuration data support have been achieved, and the accuracy of design and evaluation has been improved.
Patent Information
- Application Number
- CN202411285346.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-09-13
AI Technical Summary
Existing technologies make it difficult to accurately characterize the multi-phase and multi-configuration characteristics of acoustic metamaterials, resulting in a limited range of configurations covered by the data set, hindering the establishment of a universal characterization method. In addition, existing algorithms learn on data sets of materials with specific configurations, making it difficult to achieve cross-configuration reverse design.
The acoustic metamaterial model is generated by modeling software and saved in the form of a triangular mesh model file. Internal entity object recognition and file rewriting, discretization processing and voxel surface reconstruction are performed. Combined with the material physical parameter information, a point cloud file is constructed to form a general database of acoustic metamaterials.
It realizes the three-dimensional spatial feature aggregation representation of the acoustic metamaterial model, integrates the geometric information of the entity object and the physical parameter information of the material, expands the configuration range covered by the data set, solves the problem of cross-configuration data loss, and provides strong support for performance evaluation and design.
Smart Images

Figure CN119201895B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of acoustic metamaterial data characterization, and in particular to a method, device, and apparatus for constructing a universal acoustic metamaterial database. Background Art
[0002] Acoustic metamaterials are artificially engineered materials with unique acoustic properties, enabling them to manipulate sound waves far beyond the capabilities of conventional materials. Their uniqueness lies in the precision engineering of their internal structures, which enables them to exhibit unconventional acoustic responses, such as negative refraction, superlenses, and invisibility cloaking effects. These properties hold great promise for applications in noise control, acoustic imaging, acoustic stealth, and other acoustic engineering fields.
[0003] Acoustic metamaterials have the characteristics of multi-configuration and multi-phase, and usually contain two or more types of materials. The acoustic properties of these materials not only depend on the intrinsic properties of their constituent materials, but are also closely related to the geometric form and arrangement of their internal structure. Therefore, accurately characterizing the structure of acoustic metamaterials is crucial for their design and optimization. At present, when constructing input data for machine learning algorithms, researchers mostly use parameters, images, etc. to characterize the topological structure of acoustic metamaterials. This traditional characterization method can reflect the macroscopic properties of acoustic metamaterials to a certain extent, but it cannot characterize the multi-phase and multi-configuration characteristic information of acoustic metamaterials. It also leads to information loss caused by over-simplification of input, and the data set covers a limited range of configurations, which hinders the establishment of a universal characterization method.
[0004] In addition, when evaluating and designing the performance of acoustic metamaterials, due to the lack of a general database, existing algorithms often learn and generate on material data sets of specific configurations, making it difficult to achieve disruptive and innovative cross-configuration reverse design. Summary of the Invention
[0005] Based on this, it is necessary to provide a method, device and equipment for constructing a universal database of acoustic metamaterials to address the above technical problems.
[0006] A method for constructing a universal database of acoustic metamaterials, the method comprising:
[0007] Generate acoustic metamaterial models in batches using modeling software, and export all acoustic metamaterial models in the form of triangular mesh model files for storage;
[0008] For each acoustic metamaterial model, internal entity object identification and file rewriting are first performed, and each entity object in the acoustic metamaterial model is exported as a separate mesh model file for storage; wherein, each mesh model file records and stores the geometric information of a entity object;
[0009] The mesh model file of each entity object in the acoustic metamaterial model is then discretized, voxel surface reconstructed, and material physical parameter information is appended to construct a point cloud file of each acoustic metamaterial model. A point cloud file records and stores the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model.
[0010] Based on the grid model file and point cloud file corresponding to each acoustic metamaterial model and the sound absorption coefficient table of the acoustic metamaterial model calculated by simulation modeling software, a general acoustic metamaterial database is constructed.
[0011] In one embodiment, the file organization format of the acoustic metamaterial general database consists of a parent folder, a directory, and a subdirectory; multiple directories are created under the parent folder, each directory corresponds to an acoustic metamaterial, and three subdirectories are created under each directory, corresponding to a mesh model file, a point cloud file, and a sound absorption coefficient table that record the acoustic metamaterial model.
[0012] In one embodiment, the acoustic metamaterial models are generated in batches by modeling software, and all acoustic metamaterial models are exported and saved in the form of triangular mesh model files, including:
[0013] Acoustic metamaterial models are generated in batches through the parametric control method of Blender software, and all acoustic metamaterial models are exported and saved in the form of triangular mesh model files in obj format. Among them, the triangular mesh model files can be viewed and displayed through a 3D viewer, and can also be opened in text form and read through programming languages.
[0014] In one embodiment, for each acoustic metamaterial model, internal entity object identification and file rewriting are first performed, and each entity object in the acoustic metamaterial model is exported as a separate mesh model file for storage, including:
[0015] For each acoustic metamaterial model, each line of content in the triangular mesh model file that identifies the acoustic metamaterial model is first read in list form to obtain the starting row index of all entity objects in the acoustic metamaterial model. When the triangular mesh model file records the information of the acoustic metamaterial model, each entity object within the acoustic metamaterial model is identified by a starting row index, and the geometric information of each entity object is recorded starting from its starting row index until the starting row index of the next entity object is reached.
[0016] Secondly, the original list is divided into multiple sublists based on the starting row index of each entity object. The geometric information of each entity object is stored in the sublists. The number of sublists is the same as the number of entity objects. The geometric information of the entity objects includes three types of geometric features: vertex coordinates, normal vectors, and texture coordinates, as well as facet information.
[0017] Finally, the geometric features of the entity objects recorded and stored in each sublist are indexed in sequence, and for each entity object, the geometric feature index compiled for the entity object is corrected based on the total number of geometric features of all entity objects before the entity object to obtain a geometric feature correction index, and each entity object in the acoustic metamaterial model is exported as a separate mesh model file for storage based on the geometric feature correction index.
[0018] In one embodiment, geometric features of entity objects recorded and stored in each sublist are indexed in sequence, and for each entity object, the geometric feature index compiled for the entity object is corrected based on the total number of geometric features of all entity objects preceding the entity object to obtain a corrected geometric feature index, and each entity object in the acoustic metamaterial model is exported as a separate mesh model file for storage based on the corrected geometric feature index, including:
[0019] Indexing the three types of geometric features of the entity objects recorded and stored in each sublist, namely, vertex coordinates, normal vectors, and texture coordinates, according to the row number order of the starting row index of the entity objects, to obtain the three types of geometric feature indexes of each entity object, and the face element of each entity object accesses the geometric feature data through the three types of geometric feature indexes;
[0020] For each entity object, the total number of the three types of geometric features of all entity objects before the row number where the starting row index of the entity object is located is calculated by cumulative summation, and the total number of geometric features of the corresponding category is subtracted from the three types of geometric feature index compiled for the entity object to obtain the three types of geometric feature correction index of the entity object;
[0021] For each entity object after the three types of geometric feature indexes are corrected, a mesh model file in obj format is created, and the three types of geometric features and facet information of the entity object are written into the mesh model file line by line, so as to realize the independent export and storage of each entity object in the acoustic metamaterial model. Each mesh model file supports viewing the model structure through a 3D viewer, and also supports opening it in text form and reading the model structure through a programming language.
[0022] In one embodiment, the mesh model file of each entity object in the acoustic metamaterial model is sequentially discretized, voxel surface reconstructed, and material physical parameter information is appended to construct a point cloud file of each acoustic metamaterial model, including:
[0023] For each acoustic metamaterial model, the mesh model file of each entity object in the acoustic metamaterial model is read through a third-party library, and the maximum side length of the entity object recorded and stored in each mesh model file in a certain direction in three-dimensional space is selected as its size. Based on the size ratio, each mesh model file is discretized into a three-dimensional voxel space of fixed size, and the scaling factor of the entity object recorded and stored in each mesh model file is obtained;
[0024] The vertex coordinates of the facets after the discrete transformation of each solid object are calculated according to the scaling factor. Based on the vertex coordinates of the facets after the discrete transformation, the triangular mesh unit representation of each solid object in the discretized three-dimensional voxel space is obtained. The voxel surface of each triangular mesh unit representation is reconstructed using an open source algorithm to obtain the complete acoustic metamaterial model surface.
[0025] On the basis of obtaining the complete surface of the acoustic metamaterial model, the material physical parameter information of each entity object is further added to construct a point cloud file that integrates the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model. The three-dimensional spatial feature aggregation representation of the acoustic metamaterial model is performed based on the point cloud file.
[0026] In one embodiment, the method further comprises:
[0027] When performing internal entity object recognition and file rewriting, a digital identifier is added to each entity object according to the modeling order of the internal entity objects when the modeling software generates the acoustic metamaterial model;
[0028] On the basis of obtaining the complete surface of the acoustic metamaterial model, based on the digital identification and modeling order of each entity object in the acoustic metamaterial model, the material physical parameter information of each entity object is sequentially added and integrated into the discretized three-dimensional voxel space coordinate points, and a point cloud file is constructed that integrates the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model. The three-dimensional spatial feature aggregation representation of the acoustic metamaterial model is performed based on the point cloud file.
[0029] In one embodiment, the acoustic metamaterial universal database performs file management interaction based on a dictionary file, which is composed of key-value pairs. The dictionary file is used to query and access all files in the acoustic metamaterial universal database for management interaction; wherein the key includes the configuration of the acoustic metamaterial, the material type, the number of material phases, the point cloud file path, and the sound absorption coefficient table path, and the value is the specific data information corresponding to each key.
[0030] A device for constructing a universal database of acoustic metamaterials, comprising:
[0031] The model generation and export module is used to generate acoustic metamaterial models in batches through modeling software, and export all acoustic metamaterial models in the form of triangular mesh model files for storage;
[0032] The entity object recognition module is used to first perform internal entity object recognition and file rewriting for each acoustic metamaterial model, and export each entity object in the acoustic metamaterial model as a separate mesh model file for storage; wherein each mesh model file records and stores the geometric information of a entity object;
[0033] The point cloud file generation module is used to sequentially discretize the mesh model file of each entity object in the acoustic metamaterial model, reconstruct the voxel surface, and append the material physical parameter information to construct a point cloud file for each acoustic metamaterial model. A point cloud file records and stores the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model.
[0034] The database file organization module is used to construct a general acoustic metamaterial database based on the grid model file and point cloud file corresponding to each acoustic metamaterial model and the sound absorption coefficient table of the acoustic metamaterial model calculated by the simulation modeling software.
[0035] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0036] Generate acoustic metamaterial models in batches using modeling software, and export all acoustic metamaterial models in the form of triangular mesh model files for storage;
[0037] For each acoustic metamaterial model, internal entity object identification and file rewriting are first performed, and each entity object in the acoustic metamaterial model is exported as a separate mesh model file for storage; wherein, each mesh model file records and stores the geometric information of a entity object;
[0038] The mesh model file of each entity object in the acoustic metamaterial model is then discretized, voxel surface reconstructed, and material physical parameter information is appended to construct a point cloud file of each acoustic metamaterial model. A point cloud file records and stores the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model.
[0039] Based on the grid model file and point cloud file corresponding to each acoustic metamaterial model and the sound absorption coefficient table of the acoustic metamaterial model calculated by simulation modeling software, a general acoustic metamaterial database is constructed.
[0040] The above-mentioned method, apparatus, and device for constructing a universal acoustic metamaterial database firstly performs internal entity object recognition and file rewriting on each acoustic metamaterial model generated in batches by the modeling software, accurately distinguishing entity objects of different structures and recording the corresponding geometric information, providing more accurate data support for subsequent analysis. Furthermore, the mesh model file recording the geometric information of the entity objects is sequentially discretized, voxel surface reconstructed, and material physical parameter information is appended, ultimately constructing a point cloud file that integrates the geometric information of the entity objects and the material physical parameter information. This not only enables the three-dimensional spatial feature aggregation representation of the acoustic metamaterial model, but also integrates the geometric information of the entity objects and the material physical parameter information to form a more comprehensive and detailed description of the metamaterial structure and performance, avoiding information loss, ensuring the integrity and diversity of the database input data, and expanding the range of configurations covered by the data set. Finally, by aggregating and organizing the mesh model files, point cloud files, and sound absorption coefficient tables of each acoustic metamaterial model, the acoustic metamaterial general database is formed. It is a comprehensive dataset covering the multi-configuration and multi-phase characteristic information of acoustic metamaterials, solving the problem of cross-configuration data loss and providing strong support for the performance evaluation and design of acoustic metamaterials. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 Schematic diagram of a flow chart of a method for constructing a universal database of acoustic metamaterials in one embodiment;
[0042] Figure 2 A schematic diagram of part of the contents of an obj file exported by Blender software in one embodiment;
[0043] Figure 3 Schematic diagram of the file organization of the acoustic metamaterial general database in one embodiment;
[0044] Figure 4 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0046] It should be further noted that the general database construction method provided in this application has broad applicability and is not limited to the application of acoustic metamaterials. It can also be effectively applied to other types of metamaterials, such as mechanical metamaterials, electromagnetic metamaterials, and optical metamaterials. In different metamaterial fields, the method proposed in this application can provide a flexible and efficient general database construction solution for the research and development of various metamaterials. Below, we will use acoustic metamaterials as an example to provide a detailed introduction.
[0047] In one embodiment, Figure 1 As shown, a method for constructing a universal database of acoustic metamaterials is provided, comprising the following steps:
[0048] Step S1: Generate acoustic metamaterial models in batches using modeling software, and export all acoustic metamaterial models in the form of triangular mesh model files for storage.
[0049] The specific implementation process of step S1 includes:
[0050] Acoustic metamaterial models are generated in batches through the parametric control method of Blender software, and all acoustic metamaterial models are exported and saved in the form of triangular mesh model files in the obj (3D model file) format. Among them, the triangular mesh model file supports viewing the model structure through a 3D viewer, and also supports opening it in text form and reading the model structure through programming languages.
[0051] Furthermore, Blender software supports Python script compilation. In Python, enter the path of the triangular mesh model file in obj format exported by Blender software, open the file and return each line of the file in a list form to facilitate subsequent processing.
[0052] As a 3D graphics software, Blender is suitable for a variety of fields, including modeling, rendering, and animation. It supports script-controlled modeling and the export of mesh files in obj format. Mesh files contain the geometric information of all solid objects within the structural model, including vertex coordinates, texture coordinates, normal vectors, and facets. Facets access three geometric features through index positioning. Mesh files can not only display the model structure through a 3D viewer, but can also be opened as text and read using programming languages, facilitating subsequent data conversion and the establishment of material structure characterization methods.
[0053] In step S2, for each acoustic metamaterial model, internal entity object identification and file rewriting are first performed, and each entity object in the acoustic metamaterial model is exported as a separate mesh model file for storage; wherein each mesh model file records and stores geometric information of a entity object.
[0054] The specific implementation process of step S2 includes:
[0055] First, for each acoustic metamaterial model, each line of content in the triangular mesh model file that identifies the acoustic metamaterial model is read in list form to obtain the starting row index of all entity objects in the acoustic metamaterial model; wherein, when the triangular mesh model file records the information of the acoustic metamaterial model, each entity object inside the acoustic metamaterial model is identified by a starting row index, and the geometric information of each entity object is recorded starting from its starting row index until the starting row index of the next entity object.
[0056] Specifically, if Figure 2 As shown in the figure, when recording the information of the acoustic metamaterial model, the triangular mesh model file records each entity object with a line of content starting with the starting line index "o". "o cube" means that from this line on, the following geometric information represents this cube until the next entity object is encountered. Therefore, by judging the content of each line in the original list, the starting line index of all entity objects can be obtained. Figure 2 Where v represents the vertex coordinate, vn represents the normal vector, vt represents the texture coordinate, f represents the face element, s represents the smoothing group, and usemt1 represents the material.
[0057] Secondly, the original list is divided into multiple sub-lists according to the starting row index of each entity object, and the geometric information of each entity object is stored based on the sub-list records; the number of sub-lists is consistent with the number of entity objects, and the geometric information of the entity objects includes three types of geometric features: vertex coordinates, normal vectors and texture coordinates, as well as face information.
[0058] Finally, the geometric features of the entity objects recorded and stored in each sublist are indexed in sequence, and for each entity object, the geometric feature index compiled for the entity object is corrected based on the total number of geometric features of all entity objects before the entity object to obtain a geometric feature correction index, and each entity object in the acoustic metamaterial model is exported as a separate mesh model file for storage based on the geometric feature correction index.
[0059] Specifically, when correcting the index and exporting the mesh model file: First, index the three types of geometric features of the vertex coordinates, normal vectors, and texture coordinates of the entity objects recorded and stored in each sublist according to the row number order of the entity object's starting row index, and obtain the three types of geometric feature indexes of each entity object. The face element of each entity object accesses the geometric feature data through the three types of geometric feature indexes. Specifically, if Figure 2 As shown, the face element f records the information of each entity object and accesses the geometric feature data through the index of "v / vn / vt". If the entity object is divided into a triangular mesh, each face element records three sets of "v / vn / vt" indexes.
[0060] Furthermore, since the next entity object encountered during indexing will continue to count down, and the geometric feature index must start from 1 when the grid model file is read and written independently, before rewriting the file, the beginning of the line (that is, the starting line index of the entity object) is first determined to distinguish the geometric features recorded in the line content, and then all the geometric features of each entity object in the original file are counted.
[0061] Then, for each entity object, the total number of the three types of geometric features of all entity objects before the row number where the starting row index of the entity object is located is obtained by cumulative addition and calculation, and the three types of geometric feature indexes compiled by the entity object are subtracted from the total number of geometric features of the corresponding category to obtain the three types of geometric feature corrected indexes of the entity object.
[0062] Finally, for each entity object after the three types of geometric feature indexes are corrected, a mesh model file in obj format is created, and the three types of geometric features and facet information of the entity object are written into the mesh model file line by line, so as to realize the independent export and storage of each entity object in the acoustic metamaterial model. Each mesh model file supports viewing the model structure through a 3D viewer, and also supports opening it in text form and reading the model structure through a programming language.
[0063] It can be understood that after distinguishing and identifying the various entity objects inside the acoustic metamaterial model, further compiling the correction index and file rewriting export through geometric features, each entity object can be exported and saved separately in the form of a mesh model file. This can fully characterize the geometric information of each entity object in the acoustic metamaterial model and ensure that the geometric information of each entity object is completely and accurately captured and saved, avoiding the problems of information confusion and data loss, and providing a high-quality data foundation for subsequent analysis and simulation.
[0064] In step S3, the mesh model file of each entity object in the acoustic metamaterial model is discretized, the voxel surface is reconstructed, and the material physical parameter information is added in sequence to construct a point cloud file of each acoustic metamaterial model; wherein a point cloud file records and stores the geometric information and material physical parameter information of each entity object in an acoustic metamaterial model.
[0065] The specific implementation process of step S3 includes:
[0066] For each acoustic metamaterial model, the mesh model file for each entity in the acoustic metamaterial model is first read through a third-party library. The maximum side length of the entity in a certain direction in three-dimensional space recorded in each mesh model file is selected as its size. Based on the size ratio, each mesh model file is discretized into a fixed-size three-dimensional voxel space to obtain the scaling factor of the entity recorded in each mesh model file. Specifically, the mesh model file is discretized into a fixed 64*64*64 three-dimensional voxel space.
[0067] Then, the vertex coordinates of the face elements after the discrete transformation of each solid object are calculated according to the scaling factor. Based on the vertex coordinates of the face elements after the discrete transformation, the triangular mesh unit representation of each solid object in the discretized three-dimensional voxel space is obtained. The open source algorithm is applied to reconstruct the voxel surface of each triangular mesh unit representation to obtain the complete acoustic metamaterial model surface.
[0068] Finally, further consideration is given to the fact that when the present application performs internal entity object identification and file rewriting, a digital identifier is added to each entity object based on the modeling order of the internal entity objects when the modeling software generates the acoustic metamaterial model. On the basis of obtaining the complete acoustic metamaterial model surface, based on the digital identifier and modeling order of each entity object in the acoustic metamaterial model, the material physical parameter information of each entity object is sequentially added and integrated into the discretized three-dimensional voxel space coordinate points, and a point cloud file is constructed that integrates the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model. The three-dimensional spatial feature aggregation representation of the acoustic metamaterial model is then performed based on the point cloud file.
[0069] It can be understood that after all the entity objects within an acoustic metamaterial model are converted into separate mesh model files and exported and saved, each mesh model file is further discretized, voxel surface reconstructed, and material physical parameter information is added in turn. Among them, the discretization processing can display the shape, size and other spatial information of the entity objects in the mesh model file in a more intuitive and accurate way, thereby improving the resolution of the entity objects; the voxel surface reconstruction can effectively repair and optimize the complete acoustic metamaterial model surface, ensuring its accuracy and integrity after discretization; the added material physical parameter information can be integrated with the geometric information of the entity object, so that the generated point cloud file not only contains geometric information, but also records the material properties of each entity object in detail. The point cloud file becomes a multidimensional data set that can comprehensively characterize the three-dimensional spatial characteristics and material properties of the acoustic metamaterial model, realize the three-dimensional spatial feature aggregation and comprehensive characterization of the acoustic metamaterial model, improve the accuracy and reliability of the acoustic metamaterial model, and provide important technical support for more complex acoustic design and optimization.
[0070] Step S4: constructing a general acoustic metamaterial database based on the grid model file and point cloud file corresponding to each acoustic metamaterial model and the sound absorption coefficient table of the acoustic metamaterial model calculated by the simulation modeling software.
[0071] Among them, the file organization format of the acoustic metamaterial general database is as follows: Figure 3 As shown in the figure, it consists of a parent folder, directories, and subdirectories. Multiple directories are created under the parent folder "Material Database", each directory corresponds to an acoustic metamaterial, and three subdirectories are created under each directory, corresponding to the mesh model file, point cloud file, and sound absorption coefficient table that record the acoustic metamaterial model. Specifically, Figure 3 The file organization of the acoustic metamaterial general database shown contains ten directories.
[0072] Furthermore, the acoustic metamaterial general database performs file management interaction based on dictionary files. The dictionary files are composed of key-value pairs, and all files in the acoustic metamaterial general database are queried and accessed through key-value pairs for management interaction; among them, the keys include the configuration of the acoustic metamaterial, the type of material, the number of material phases, the point cloud file path, and the sound absorption coefficient table path, and the values are the specific data information corresponding to each type of key.
[0073] Specifically, the dictionary file is created as follows: in Python, the configuration of the acoustic metamaterial, material type, material phase number, point cloud file path, and sound absorption coefficient table path are used as keys, and the corresponding values are filled in according to the actual conditions of each key. A dictionary file is created based on the key-value pair and saved in json format.
[0074] Furthermore, when developing the management of the acoustic metamaterial universal database, a command line interactive program can be developed based on the cmd library in Python (which provides a library for command line interpreters), dictionary files can be read, and basic functions such as adding, querying, listing, deleting, and saving can be designed and developed through key-value pair query and access commands. Database management interaction with the acoustic metamaterial universal database can be carried out through command line input, realizing data entry query and data set generation in the acoustic metamaterial universal database based on tags, as well as users' rapid customized updates of data sets.
[0075] Specifically, the specific process of using the acoustic metamaterial general database and generating the dataset includes:
[0076] (1) Combined with the existing database functions, users can customize and select data objects from the acoustic metamaterial general database to generate a dataset and save it as a dictionary file in json format.
[0077] (2) File path acquisition. In Python, the dictionary file is used as input to obtain the storage path of the point cloud file and the storage path of the sound absorption coefficient table, and the storage path is returned in the form of a storage path list.
[0078] (3) Dataset generation. By inheriting the PyTorch Dataset class method, taking the storage path list as input, loading all data entries, and preprocessing the input point cloud file, the original digital identifiers of each entity object in the point cloud file are deleted, retaining only the spatial coordinates and material physical parameter information, and generating a PyTorch dataset object.
[0079] It can be understood that this application is based on the acoustic metamaterial feature fusion method and generates a universal database of acoustic metamaterials through parametric modeling, which solves the problem of cross-configuration database loss. It also manages the database through dictionary files and develops a data interaction program that can quickly manage database files, support data entry queries and data set generation based on tags, and support users to quickly customize and update data sets. Moreover, with the dictionary file as input, the data entries contained in the dictionary file can be quickly encapsulated as a PyTorch dataset object. Furthermore, by loading the dataset through the Dataloader, the dataset can be encapsulated as an iterable data object for machine learning algorithm training.
[0080] In one embodiment, a device for constructing a universal database of acoustic metamaterials is provided, comprising:
[0081] The model generation and export module is used to generate acoustic metamaterial models in batches through modeling software, and export all acoustic metamaterial models in the form of triangular mesh model files for storage.
[0082] The entity object recognition module is used to first perform internal entity object recognition and file rewriting for each acoustic metamaterial model, and export each entity object in the acoustic metamaterial model as a separate mesh model file for storage; wherein each mesh model file records and stores the geometric information of a entity object.
[0083] The point cloud file generation module is used to discretize, reconstruct the voxel surface, and append the material physical parameter information to the mesh model file of each entity object in the acoustic metamaterial model, thereby constructing a point cloud file for each acoustic metamaterial model. A point cloud file records and stores the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model.
[0084] The database file organization module is used to construct a general acoustic metamaterial database based on the grid model file and point cloud file corresponding to each acoustic metamaterial model and the sound absorption coefficient table of the acoustic metamaterial model calculated by the simulation modeling software.
[0085] The specific definitions of the acoustic metamaterial universal database construction device can be found in the definitions of the acoustic metamaterial universal database construction method described above and will not be repeated here. Each module in the aforementioned acoustic metamaterial universal database construction device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of these modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0086] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for constructing a universal database of acoustic metamaterials is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0087] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0088] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0089] Generate acoustic metamaterial models in batches using modeling software, and export all acoustic metamaterial models in the form of triangular mesh model files for storage;
[0090] For each acoustic metamaterial model, internal entity object identification and file rewriting are first performed, and each entity object in the acoustic metamaterial model is exported as a separate mesh model file for storage; wherein, each mesh model file records and stores the geometric information of a entity object;
[0091] The mesh model file of each entity object in the acoustic metamaterial model is then discretized, voxel surface reconstructed, and material physical parameter information is appended to construct a point cloud file of each acoustic metamaterial model. A point cloud file records and stores the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model.
[0092] Based on the grid model file and point cloud file corresponding to each acoustic metamaterial model and the sound absorption coefficient table of the acoustic metamaterial model calculated by simulation modeling software, a general acoustic metamaterial database is constructed.
[0093] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0094] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for constructing a universal database of acoustic metamaterials, characterized in that: The method comprises: Generate acoustic metamaterial models in batches using modeling software, and export all acoustic metamaterial models in the form of triangular mesh model files for storage; For each acoustic metamaterial model, internal entity object identification and file rewriting are first performed, and each entity object in the acoustic metamaterial model is exported as a separate mesh model file for storage; wherein, each mesh model file records and stores the geometric information of a entity object; The mesh model file of each entity object in the acoustic metamaterial model is then discretized, voxel surface reconstructed, and material physical parameter information is appended to construct a point cloud file of each acoustic metamaterial model. A point cloud file records and stores the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model. Based on the grid model file and point cloud file corresponding to each acoustic metamaterial model and the sound absorption coefficient table of the acoustic metamaterial model calculated by simulation modeling software, a general acoustic metamaterial database is constructed.
2. The method according to claim 1, characterized in that The file organization of the acoustic metamaterial general database consists of a parent folder, a directory, and a subdirectory. Multiple directories are created under the parent folder, each directory corresponds to an acoustic metamaterial, and three subdirectories are created under each directory, corresponding to the grid model file, point cloud file, and sound absorption coefficient table recording the acoustic metamaterial model.
3. The method according to claim 1, characterized in that Generate acoustic metamaterial models in batches using modeling software, and export all acoustic metamaterial models as triangular mesh model files for storage, including: Acoustic metamaterial models are generated in batches through the parametric control method of Blender software, and all acoustic metamaterial models are exported and saved in the form of triangular mesh model files in obj format; wherein, the triangular mesh model file supports viewing and displaying the model structure through a 3D viewer, and also supports opening it in text form and reading the model structure through a programming language.
4. The method according to claim 3, characterized in that For each acoustic metamaterial model, first perform internal entity object identification and file rewriting, and export each entity object in the acoustic metamaterial model as a separate mesh model file for storage, including: For each acoustic metamaterial model, each line of content in a triangular mesh model file that identifies the acoustic metamaterial model is first read in list form to obtain the starting row index of all entity objects in the acoustic metamaterial model; wherein, when recording information of the acoustic metamaterial model in the triangular mesh model file, each entity object within the acoustic metamaterial model is identified by a starting row index, and the geometric information of each entity object is recorded starting from its starting row index until the starting row index of the next entity object is reached; Secondly, the original list is divided into multiple sublists based on the starting row index of each entity object, and the geometric information of each entity object is recorded and stored in the sublists. The number of sublists is the same as the number of entity objects. The geometric information of the entity objects includes three types of geometric features: vertex coordinates, normal vectors, and texture coordinates, as well as facet information. Finally, the geometric features of the entity objects recorded and stored in each sublist are indexed in sequence, and for each entity object, the geometric feature index compiled for the entity object is corrected based on the total number of geometric features of all entity objects before the entity object to obtain a geometric feature correction index, and each entity object in the acoustic metamaterial model is exported as a separate mesh model file for storage based on the geometric feature correction index.
5. The method according to claim 4, characterized in that The geometric features of the entity objects recorded and stored in each sublist are indexed in sequence, and for each entity object, the geometric feature index compiled for the entity object is corrected based on the total number of geometric features of all entity objects before the entity object to obtain a geometric feature correction index, and each entity object in the acoustic metamaterial model is exported as a separate mesh model file for storage based on the geometric feature correction index, including: Indexing the three types of geometric features of the entity objects recorded and stored in each sublist, namely, vertex coordinates, normal vectors, and texture coordinates, according to the row number order of the starting row index of the entity objects, to obtain the three types of geometric feature indexes of each entity object, and the face element of each entity object accesses the geometric feature data through the three types of geometric feature indexes; For each entity object, the total number of the three types of geometric features of all entity objects before the row number where the starting row index of the entity object is located is calculated by cumulative summation, and the total number of geometric features of the corresponding category is subtracted from the three types of geometric feature index compiled for the entity object to obtain the three types of geometric feature correction index of the entity object; For each entity object after the three types of geometric feature indexes are corrected, a mesh model file in obj format is created, and the three types of geometric features and facet information of the entity object are written into the mesh model file line by line, so as to realize the independent export and storage of each entity object in the acoustic metamaterial model. Each mesh model file supports viewing the model structure through a 3D viewer, and also supports opening it in text form and reading the model structure through a programming language.
6. The method according to claim 5, characterized in that The mesh model file of each entity object in the acoustic metamaterial model is discretized, the voxel surface is reconstructed, and the material physical parameter information is added in sequence to construct a point cloud file of each acoustic metamaterial model, including: For each acoustic metamaterial model, the mesh model file of each entity object in the acoustic metamaterial model is read through a third-party library, and the maximum side length of the entity object recorded and stored in each mesh model file in a certain direction in three-dimensional space is selected as its size. Based on the size ratio, each mesh model file is discretized into a three-dimensional voxel space of fixed size, and the scaling factor of the entity object recorded and stored in each mesh model file is obtained; Calculating the vertex coordinates of the facets after the discrete transformation of each entity object according to the scaling factor, and obtaining a triangular mesh unit representation of each entity object in the discretized three-dimensional voxel space based on the vertex coordinates of the facets after the discrete transformation, and applying an open source algorithm to perform voxel surface reconstruction on each triangular mesh unit representation to obtain a complete acoustic metamaterial model surface; On the basis of obtaining a complete acoustic metamaterial model surface, the material physical parameter information of each entity object is further added to construct a point cloud file that integrates the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model. Based on the point cloud file, the three-dimensional spatial feature aggregation representation of the acoustic metamaterial model is performed.
7. The method according to claim 6, characterized in that The method further comprises: When performing internal entity object recognition and file rewriting, a digital identifier is added to each entity object according to the modeling order of the internal entity objects when the modeling software generates the acoustic metamaterial model; On the basis of obtaining a complete acoustic metamaterial model surface, based on the digital identification and modeling order of each entity object in the acoustic metamaterial model, the material physical parameter information of each entity object is sequentially added and integrated into the discretized three-dimensional voxel space coordinate points, and a point cloud file that integrates the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model is constructed. Based on the point cloud file, the three-dimensional spatial feature aggregation representation of the acoustic metamaterial model is performed.
8. The method according to claim 1, characterized in that The acoustic metamaterial universal database performs file management interaction based on a dictionary file. The dictionary file is composed of key-value pairs, and all files in the acoustic metamaterial universal database are queried and accessed through key-value pairs for management interaction. The keys include the configuration of the acoustic metamaterial, the material type, the number of material phases, the point cloud file path, and the sound absorption coefficient table path, and the values are the specific data information corresponding to each key.
9. A device for constructing a universal database of acoustic metamaterials, characterized in that: The device comprises: The model generation and export module is used to generate acoustic metamaterial models in batches through modeling software, and export all acoustic metamaterial models in the form of triangular mesh model files for storage; The entity object recognition module is used to first perform internal entity object recognition and file rewriting for each acoustic metamaterial model, and export each entity object in the acoustic metamaterial model as a separate mesh model file for storage; wherein each mesh model file records and stores the geometric information of a entity object; The point cloud file generation module is used to sequentially discretize the mesh model file of each entity object in the acoustic metamaterial model, reconstruct the voxel surface, and append the material physical parameter information to construct a point cloud file for each acoustic metamaterial model. A point cloud file records and stores the geometric information and material physical parameter information of each entity object in the acoustic metamaterial model. The database file organization module is used to construct a general acoustic metamaterial database based on the grid model file and point cloud file corresponding to each acoustic metamaterial model and the sound absorption coefficient table of the acoustic metamaterial model calculated by the simulation modeling software.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Building method of acoustic material CAE simulation parameter database
CN107563063A
Method for generating point cloud model based on two-phase composite material mesoscopic model
CN107886464A